// only.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include windows.h#pragma data_seg("Shared")//创建自定义段,编译器解释volatile long Run=0;#pragma data_seg()//自定义段创建至此#pragma
// only.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#pragma data_seg("Shared")//创建自定义段,编译器解释
volatile long Run=0;
#pragma data_seg()//自定义段创建至此
#pragma comment(linker,"/Section:Shared,RWS")//读(R)写(W)共享(S)自定义段
int main(int argc, char* argv[])
{
if(!Run)
{
Run=1;
}
else
{
MessageBox(0,0,0,0);
return -1;
}
Sleep(INFINITE);
return 0;
}
【文章原创作者:建湖网站制作公司 http://www.1234xp.com/jianhu.html 欢迎留下您的宝贵建议】