I hate it when Visual Studio does this to me...
I'm trying to use GetDllDirectory() in my MFC DLL app.
I have this code in my function:
When I compile it, I get this compile error:
I added the SDK include and lib directories to my project settings.
I tried including <windows.h> and even <winbase.h> but no luck.
If I add this function declaration to my code (copied from <winbase.h>:
I get this link error:
If I try using the GetCurrentDirectory() function right above it in <winbase.h> it compiles and links with no problem.
Why does Visual Studio hate me? :-(
I'm trying to use GetDllDirectory() in my MFC DLL app.
I have this code in my function:
Code:
char dllDir[MAX_PATH];
DWORD ret = GetDllDirectoryA( (DWORD)MAX_PATH, (LPSTR)dllDir );
Code:
error C3861: 'GetDllDirectoryA': identifier not found, even with argument-dependent lookup
I tried including <windows.h> and even <winbase.h> but no luck.
If I add this function declaration to my code (copied from <winbase.h>:
Code:
WINBASEAPI
DWORD
WINAPI
GetDllDirectoryA(
IN DWORD nBufferLength,
OUT LPSTR lpBuffer
);
Code:
error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned long __stdcall GetDllDirectoryA(unsigned long,char *)"
If I try using the GetCurrentDirectory() function right above it in <winbase.h> it compiles and links with no problem.
Why does Visual Studio hate me? :-(