I have an instrument card, along with source code supplied by the manufacturer. I wanted to use the manufacturer's self test code as part of my application startup, so I tried running their code in CVI 7.1 (which is what the code was originally developed in). I created a new project and imported their source code. When I tried to run the code in debug mode, I got the following error:
"WINBASE.H"(1080,6) Illegal type for symbol 'WinMain': "int function(HINSTANCE,HINSTANCE,LPSTR,int)"
The portion of the winbase.h file that appears to be the problem is:
#ifndef _MAC
int
WINAPI
#else
int
CALLBACK
#endif
WinMain
(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd
);
My code is as follows:
#include <stdio.h>
#include <string.h>
#include "galahad.h"
#include <conio.h>
int main (void)
{
int status;
status = Init_Module_Px((usint)0, EXC_PCMCIA_MODULE);
return 0;
}
Galahad.h is the manufacturer's supplied header file, and Init_Module_Px is a function contained within.
I do not understand why I am getting this WinBase.h error. I have previously tried their code in Visual C++ 2005, and I did not get this error. I wanted to compile this code in CVI 7.1, then create a DLL that I could call from Visual C++ 2005, but obviously, I can't get there if it doesn't work in CVI first.
Any thoughts?
Message Edited by PSciotto on 02-01-2007 01:57 PM