Windows CE 6.0 - Visual Studio 2005 - WinMain坚持认为它正在过载 [英] Windows CE 6.0 - Visual Studio 2005 - WinMain insists it is being overloaded

查看:73
本文介绍了Windows CE 6.0 - Visual Studio 2005 - WinMain坚持认为它正在过载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由项目属性解决>配置属性>链接器>系统>子系统窗口ce

Solved by Project Properties>Configuration Properties>Linker>System>Subsystem windows ce

大家好,我似乎无法弄清楚为什么Visual C ++编译器认为我在重载WinMain。也许你可以帮助我。我正在为运行CE 6.0的Advantech x86板编译,这是我的代码。

Hello everyone, I can't seem to figure out why the Visual C++ compiler thinks that I am overloading WinMain. Perhaps you can help me. I am compiling for an Advantech x86 board running CE 6.0 here is my code.

int WINAPI WinMain(	HINSTANCE hInstance,
					HINSTANCE hPrevInstance,
					LPTSTR    lpCmdLine,
					int       nCmdShow)
{
	//Parameter for timer 0
	UINT uDelay=100;						// 100 ms
	UINT uResolution=0;						// as accurate as possible....
	LPTIMECALLBACK fptc = measuring;		// your function; see below
	DWORD dwUser=42;						// some data you can pass to your function
	UINT fuEvent = (TIME_PERIODIC|TIME_CALLBACK_FUNCTION);

	//Parameter for timer 1
	UINT uDelay1 =1000;						// 1000 ms
	UINT uResolution1 =0;					// as accurate as possible....
	LPTIMECALLBACK fptc1 = dens_function;	// your function; see below
	DWORD dwUser1 =42;						// some data you can pass to your function
	UINT fuEvent1 = (TIME_PERIODIC|TIME_CALLBACK_FUNCTION);

	//Parameter for timer 2
	UINT uDelay2 =500;						// 500 ms
	UINT uResolution2 =0;					// as accurate as possible....
	LPTIMECALLBACK fptc2 = displ_function;	// your function; see below
	DWORD dwUser2 =42;						// some data you can pass to your function
	UINT fuEvent2 = (TIME_PERIODIC|TIME_CALLBACK_FUNCTION);


	//Initialize function calls------------------------------------------
	init_board();							//Initialize the DM6430 board
	dis->save_datainstance(dat);			//save Data Class in Display class
	out->save_datainstance(dat);			//save Data Class in Output class
	ak->save_datainstance(dat);				//save Data Class in ak_commands class
	Sleep(2500);
	if(InitPorts())							//Init COM1 for read and write
	{//Error at init ports
		exit(1);
	}
	if(dis->Initialize())					//Initialize display
	{//Error at display init
		exit(1);
	}
	
	if(read_calibration_values())			//reading calibration_values
	{//Error at reading calibration values
		dis->errormessage(1);
		exit(1);
	}
	if(dat->read_settings()) 				//reads output type from data
	{//Error at reading settings
		dis->errormessage(2);
		exit(1);
	}
	dis->versionmessage();
	Sleep(2000);
	dis->clear_display();					//Clears the display
	if(dat->init_KD_info())					//read date and sn
	{//Error at reading kd info
		dis->errormessage(3);
		exit(1);
	}
	if(dat->init_Kd_array())				//initialize KD array
	{//Error at reading kd data
		dis->errormessage(4);
		exit(1);
	}
	if(dat->read_specific_gravity())		//Read specific gravity from data
	{//Error at reading specific_gravity
		dis->errormessage(5);
		exit(1);
	}
	if(dat->read_alpha())					//read Alphas for different fuel
	{//Error at reading alpha
		dis->errormessage(6);
		exit(1);
	}
	
	dis->select_display_mask();						//Write the display mask on the display
	set_output();									//Set the Output ( CAN or RS232/485)
	dat->select_alpha();
	Set_CAN_baud();
	//-------------------------------------------------------------------
	
	//Timerfunctions
	MMRESULT mr = timeSetEvent(uDelay, uResolution, fptc, dwUser, fuEvent);			//Output and Input (is set to 100ms)
	MMRESULT mr1 = timeSetEvent(uDelay1, uResolution1, fptc1, dwUser1, fuEvent1);	//Dens input (1000ms)
	MMRESULT mr2 = timeSetEvent(uDelay2, uResolution2, fptc2, dwUser2, fuEvent2);	//Display out and touchpad in (500ms)

	// Main message loop:
	while (running) 
	{
		
	}

	CloseDM6430(0);
	return 0;
}







推荐答案

什么是你的申请类型。使用Win32应用程序代替Win32控制台应用程序。

What is your application type . Use Win32 Application for your development instead of Win32 Console Application.

谢谢


这篇关于Windows CE 6.0 - Visual Studio 2005 - WinMain坚持认为它正在过载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆