Skip to content

Instantly share code, notes, and snippets.

@jdferrell3
Created April 4, 2019 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdferrell3/74629354f483f20def46e1156dbb0291 to your computer and use it in GitHub Desktop.
Save jdferrell3/74629354f483f20def46e1156dbb0291 to your computer and use it in GitHub Desktop.
#ifndef UNICODE
#define UNICODE
#endif
#include<windows.h>
int WINAPI wWinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, PWSTR szCmdLine, int nCmdShow)
{
wchar_t path[256];
DWORD size = 256;
GetModuleFileNameW(
NULL,
path,
size);
MessageBox(NULL, path, L"Full Path", MB_OK);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment