I am using Visual C++ 2003,
Previously i am using this to call test.dll stored in the root directory folder name root1 and in the sub folder root2
HINSTANCE result = NULL;
result = LoadLibrary(L"..\\root1\\root2\\test.dll");
It work fine in normal OS. When i run in Win XP regional language setting to japanese, it can't work
Then i test with this and it work!
result = LoadLibrary(L"C:\\debug\\root1\\root2\\test.dll");
so i come out with an idea to use the getcwd() which return the current directory path.
char* buffer = _getcwd( NULL, 0);
strcat(buffer,"\\root1\\root2\\test.dll")
result = LoadLibrary((LPTSTR)buffer);
it is not working. I found the issue is:
buffer contain : "C:\debug\root1\root2\test.dll"
instead i think it will working find if:
buffer contain :"C:\\debug\\root1\\root2\\test.dll"
Any suggestion on my prob?? Your help is very needed, Thanks in advance!