Hi again,
Now that I can get my program to compile, I always get 0 returned from GetDllDirectory() and the string parameter is an empty string. When I do GetLastError() it reports "The operation completed successfully".
If I replace the GetDllDirectory() with GetModuleFileName(), it actually returns the whole path & filename of the executing program.
So:
1. Why is GetDllDirectory() returning 0 (meaning an error), but then GetLastError() says everything is fine?
2. Why am I getting back an empty string instead of something like "C:\Program Files\..."?
Now that I can get my program to compile, I always get 0 returned from GetDllDirectory() and the string parameter is an empty string. When I do GetLastError() it reports "The operation completed successfully".
If I replace the GetDllDirectory() with GetModuleFileName(), it actually returns the whole path & filename of the executing program.
So:
1. Why is GetDllDirectory() returning 0 (meaning an error), but then GetLastError() says everything is fine?
2. Why am I getting back an empty string instead of something like "C:\Program Files\..."?