I didn't get the idea very clearly ...

(1) Do you want to send the path of the image as input into your C++ exe or something else ???
(2) Do you want to send it, when the button is pressed ?

Please, be a bit more clear.