Hello. I am trying to create a directory with the function SHCreateDerectoryExA (); regarding the directory of the application being launched: so far unsuccessfully. Thus, all thought and thought, what is the problem.
string str_log_dir ( "..\\user\\log\\" ); SHCreateDerectoryExA ( NULL, str_log_gir.c_str(), NULL );
ShlObj.h connected to the project. Yes, and there is hardly a problem in converting string to const char *. As you can see, the points do not help, even here. But when creating a single file through fstream, for example, ". \ Test_file.txt", such a chip rolls. WinAPI, as I see it does not work with this. Or I don't know something.
fstream log_file; log_file.open( ".\\engine.log", ios::binary, ios::out );
The directory is not created when you start the exe-shnik, but the file - please. In any case, I hope that I clearly described my lack of knowledge in WinAPI, or how else this can be called. I ask to help, I sit for 2 hours, google, but all to no avail.