N
Neville Lang
Hi all,
I have a CF app that has been developed for a few years now and has been
working perfectly on PPC 2002, WinMobile 2003 and WinMobile 2003 SE
operating systems.
I distribute my app on a CD and have a customized installer using Windows
Installer. My installer installs my app's files and registry settings onto
both the Desktop computer and onto the Pocket PC. Over the last few years,
this installer has worked on every Pocket PC device.
Now, I have a new customer who has just recently purchased the i-mate JasJar
(a HTC Universal) device that has Windows Mobile 5.0 and ActiveSync 4.0. The
problem they are getting is that they cannot install my app from the CD
since they are getting an error message that the Pocket PC is not in its
cradle.
The i-mate JasJar does not actually have a cradle but has a USB cable for
synch'ing, which they are using. My installer code relies on RAPI and at
this point in my code, tests if the Pocket PC is actually connected by using
CeRapiInitEx() in the following code snippet:
RAPIINIT rapiStructure = new RAPIINIT();
rapiStructure.cbSize = 12;
uint hResult = CeRapiInitEx(ref rapiStructure);
if (hResult == E_FAIL)
{
MessageBox.Show("Unable to initialize connection to device !!");
return false;
}
uint hWait = WaitForSingleObject(rapiStructure.heRapiInit,
MillisecondsToWait);
if (hWait == WAIT_FAILED) // <==== This tests TRUE for the scenario
with i-mate JasJar
{
MessageBox.Show("Unable to wait for device: " +
Marshal.GetLastWin32Error().ToString());
return false;
}
....
....
The problem occurs at the WaitForSingleObject call where it returns a
WAIT_FAILED, and the Win32 error code = 6, indicating an "Invalid Handle",
if I am not mistaken.
Does anyone know if there has been any changes to RAPI calls associated with
ActiveSync 4.0, like CeRapiInitEx()? Or has there been a change to the
"rapiStructure", which may cause an invalid handle?
I have looked at Microsoft's site where I saw details of the RAPI calls for
Windows CE .NET but I could not see anything on RAPI for Windows CE 5.0.
Regards,
Neville Lang
I have a CF app that has been developed for a few years now and has been
working perfectly on PPC 2002, WinMobile 2003 and WinMobile 2003 SE
operating systems.
I distribute my app on a CD and have a customized installer using Windows
Installer. My installer installs my app's files and registry settings onto
both the Desktop computer and onto the Pocket PC. Over the last few years,
this installer has worked on every Pocket PC device.
Now, I have a new customer who has just recently purchased the i-mate JasJar
(a HTC Universal) device that has Windows Mobile 5.0 and ActiveSync 4.0. The
problem they are getting is that they cannot install my app from the CD
since they are getting an error message that the Pocket PC is not in its
cradle.
The i-mate JasJar does not actually have a cradle but has a USB cable for
synch'ing, which they are using. My installer code relies on RAPI and at
this point in my code, tests if the Pocket PC is actually connected by using
CeRapiInitEx() in the following code snippet:
RAPIINIT rapiStructure = new RAPIINIT();
rapiStructure.cbSize = 12;
uint hResult = CeRapiInitEx(ref rapiStructure);
if (hResult == E_FAIL)
{
MessageBox.Show("Unable to initialize connection to device !!");
return false;
}
uint hWait = WaitForSingleObject(rapiStructure.heRapiInit,
MillisecondsToWait);
if (hWait == WAIT_FAILED) // <==== This tests TRUE for the scenario
with i-mate JasJar
{
MessageBox.Show("Unable to wait for device: " +
Marshal.GetLastWin32Error().ToString());
return false;
}
....
....
The problem occurs at the WaitForSingleObject call where it returns a
WAIT_FAILED, and the Win32 error code = 6, indicating an "Invalid Handle",
if I am not mistaken.
Does anyone know if there has been any changes to RAPI calls associated with
ActiveSync 4.0, like CeRapiInitEx()? Or has there been a change to the
"rapiStructure", which may cause an invalid handle?
I have looked at Microsoft's site where I saw details of the RAPI calls for
Windows CE .NET but I could not see anything on RAPI for Windows CE 5.0.
Regards,
Neville Lang