Last active
June 13, 2017 13:25
-
-
Save myfreeer/cc7377306ac7809592e310412f2f17a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
wchar_t *getCurrentDirW(void) | |
{ | |
static wchar_t buffer[MAX_PATH]; | |
GetCurrentDirectoryW(MAX_PATH, buffer); | |
return buffer; | |
} | |
char *getCurrentDirA(void) | |
{ | |
static char buffer[MAX_PATH]; | |
GetCurrentDirectoryA(MAX_PATH, buffer); | |
return buffer; | |
} | |
#ifdef UNICODE | |
#define getCurrentDir getCurrentDirW | |
#else | |
#define getCurrentDir getCurrentDirA | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment