当前位置:编程学习 > VC++ >>

用VC生成最小的EXE文件

#include <windows.h>
#pragma comment(   linker,   "/subsystem:"windows"   /entry:"mainCRTStartup""   )   //   设置入口地址隐藏运行!
#pragma comment(linker, "/OPT:NOWIN98")
#pragma comment(lib,    "user32.lib")
#pragma comment(linker, "/ENTRY:main")
#pragma comment(linker, "/merge:.data=.text")
#pragma comment(linker, "/merge:.rdata=.text")
#pragma comment(linker, "/align:512")
#pragma comment(linker, "/subsystem:windows")

void main()
{
    char* Msg = "你好";
    char* Title = "Hello";
    MessageBox(0, Msg, Title, 1); // MB_OK
}
补充:软件开发 , Vc ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,