获取应用程序实例句柄

 char path[512];
 HINSTANCE hInstance;

 

 ::GetModuleFileName(NULL, path, sizeof(path));

 

 hInstance = (HINSTANCE)GetModuleHandle(path);

 

 ultoa((ULONG)hInstance, path, 10);
 MessageBox(path, "程序实例句柄");

你可能感兴趣的:(null,Path)