#include <windows.h>

#pragma comment(linker,"/ENTRY:__CRTStartup")

#ifdef _CONSOLE
#    ifdef _UNICODE
     extern "C" int wmainCRTStartup();
#    else
     extern "C" int mainCRTStartup();
#    endif
#else
#    ifdef _UNICODE
     extern "C" int wWinMainCRTStartup();
#    else
     extern "C" int WinMainCRTStartup();
# endif
#endif

int __CRTStartup()
{

#ifdef _CONSOLE
#    ifdef UNICODE
     wmainCRTStartup();
#    else  
     mainCRTStartup();
#    endif
#else
#    ifdef UNICODE
     wWinMainCRTStartup();
#    else  
     WinMainCRTStartup();
#    endif
#endif 

     return 0;
}

 

动态链接库版本: 

#pragma comment(linker,"/ENTRY:__CRTStartup")


extern "C" BOOL WINAPI _DllMainCRTStartup(HINSTANCE hDllHandle, DWORD dwReason, LPVOID lpReserved);

int __CRTStartup(HINSTANCE hDllHandle, DWORD dwReason, LPVOID lpReserved)

{

return _DllMainCRTStartup( (HINSTANCE)hDllHandle,dwReason,0);

相关文章:

  • 2021-09-29
  • 2021-12-11
  • 2022-01-22
  • 2021-09-19
  • 2022-12-23
  • 2021-11-04
  • 2021-07-25
  • 2021-12-08
猜你喜欢
  • 2022-01-19
  • 2021-12-15
  • 2021-05-26
  • 2021-06-12
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案