Context: Years of VBA developing and considerable experience with compiled environments, but almost no C++ experience
Problem: Installed eMbedded C++ ver 4.0 and successsfully created an "Hello Wolrd" program via wizard and ran it on iPAQ H4150. I then made a few minor changes and the code run as expected. Next I want to call and run a program on the iPAQ so I made a function called callEXE which in turn called CeCreateProcess. Just to be sure all was well I tried a build. The code compiles 0 errors and 0 warnings, but generates the following link error
TCard.obj : error LNK2019: unresolved external symbol "int __cdecl CeCreateProcess(unsigned short const *,unsigned short const *,struct _SECURITY_ATTRIBUTES *,struct _SECURITY_ATTRIBUTES *,int,unsigned long,void *,unsigned short *,struct _STARTUPIN
OW *,struct _PROCESS_INFORMATION *)" (?CeCreateProcess@@YAHPBG0PAU_SECURITY_ATTRIBUTES@@1HKPAXPAGPAU_STARTUPINFOW@@PAU_PROCESS_INFORMATION@@@Z) referenced in function "int __cdecl callExe(void)" (?callExe@@YAHXZ
ARMV4Rel/TCard.exe : fatal error LNK1120: 1 unresolved external
I have done a string search on both rapi.h and rapi.lib and found CeCreatePorcess and the complier tells me it checked in rapi.lib as well
Searching C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\lib\ARMV4\aygshell.lib
Searching C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Activesync\Lib\rapi.lib
Finished searching librarie
Finished pass
The relevant code snipits follow
#include <rapi.h
//------------------------
BOOL CeCreateProcess
LPCWSTR , LPCWSTR , PSECURITY_ATTRIBUTES , LPSECURITY_ATTRIBUTES ,
BOOL ,
DWORD ,
LPVOID ,
LPWSTR ,
LPSTARTUPINFO ,
LPPROCESS_INFORMATION
);
BOOL CallExe(void)
//---------------------------
BOOL callExe(
BOOL bRet;
LPCWSTR lpApplicationName
LPCWSTR lpCommandLine;
_PROCESS_INFORMATION pi
_PROCESS_INFORMATION *ppi
ppi = &pi
lpApplicationName = TEXT ("\\Windows\\calendar.exe")
lpCommandLine = TEXT ("")
bRet = CeCreateProcess(lpApplicationName, lpCommandLine, NULL, NULL, FALSE, 0, 0, NULL, NULL, ppi)
return 0
Any help will be much appreciate
Thank