Windows CE 6.0 - Visual Studio 2005 - WinMain insists it is being overloaded

  • Thread starter Thread starter Steven4755
  • Start date Start date
S

Steven4755

Guest
Hello everyone, I cant 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;
}

Continue reading...
 
Back
Top