I am simply trying to make a C++ dll, which opens a folder and allows user to select one of the files in this directory (via a mouse click), then the path of this file shall be passed to another program (which uses this dll).
I am using Visual Studio Express 2017.
Operating system is windows.
I am total newbie in C++ (but I have good programming experience in C programming language).
"As a first step", I am trying to write a simple C++ program which can perform the functionality mentioned above.
I made a search and found the examples in this page:
But when I tried to use the code from "closed account (j3Rz8vqX)", it throws an exception at the function "GetOpenFileName".
The exception says --> Unhandled exception at 0x75876344 (comdlg32.dll) in Open_folder_select_file.exe: 0xC0000005: Access violation reading location 0xCCCCCCCC.
Can you please help me to solve this issue?