I'm using SetDllDirectory (SetDllDirectoryW actually) to make some delay-loaded libraries load from a specific directory.
It goes like
if (SetDllDirectory(directory.c_str()) == 0)
{
ERROR_MSG("Failed to set the current dll directory [%d]\n", GetLastError());
}
So everything works fine, most of the time, "f:/source/trunk 11" is fine and so on
But when it's called with "f:/source/trunk Gest hieß es !№;%()_@#$^&", i get ERROR_INVALID_PARAMETER from GetLastError. I am able to create a directory with such a name and i can work with it.
But what's so special with SetDllDirectory and "Gest hieß es !№;%()_@#$^&"? How can i fix it?