解决 VS提示C28251:“WinMain“批注不一致,此实例包含 无批注:

需要 _In_ 检测,将 WinMain 修改如下:

int WINAPI WinMain(
    _In_ HINSTANCE hInstance,      // handle to current instance
    _In_opt_ HINSTANCE hPrevInstance,  // handle to previous instance
    _In_ LPSTR lpCmdLine,          // command line
    _In_ int nCmdShow              // show state
)

各参数的含义如下

  • _In_:输入参数
  • _Out_:输出参数
  • _In_opt_:可选的输入参数

猜你喜欢

转载自blog.csdn.net/hfy1237/article/details/130574956