i-mate JasJar Pocket PC Phone Edition with Windows Mobile 5.0 and ActiveSync 4.0

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

Ilya Tumanov [MS]

Most likely reason is described here:


http://msdn.microsoft.com/library/d...us/dnppcgen/html/migration_developers_faq.asp

Please search for "Why can't I use RAPI with my Windows Mobile device?"

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
N

Neville Lang

Ilya,

Thank you for that link. I was looking in that area at the MS site,
specifically for ActiveSync, and missed the FAQs heading.

I will report back on how I resolved this issue for others who might find
this thread.

Regards,
Neville Lang
 
N

Neville Lang

Illya and others,

I have now read about the security policies within Windows Mobile 5.0.
However, I must admit that after all of the reading, I am still a little
confused as to what I need to do practically.

My main query is what do I need to do to get my current CF app installed
onto any Windows Mobile 5.0 device using RAPI? My app is a .NET CF one and
the current version is compiled under VS .NET 2003.

From what I have read, RAPI's security has changed. It would seem that
Pocket PC devices with Windows Mobile 5.0, like Dell's X51, may allow my app
to be installed since RAPI is allowed (I think?). However, devices that have
the Windows Mobile 5.0 Phone Edition, like i-mate's JASJAR, may need me to
either contact each phone company to allow a RAPI installation for my Pocket
PC app or to have my app registered for Mobile2Market. Is my understanding
correct?

I am assuming of course that once I get past the installation issue that the
present code will run on Windows Mobile 5.0. I assume this is true because I
seem to remember that code written for Windows Mobile 2003 will run on
Windows Mobile 5.0. Is this statement still true?

My present app has been working successfully on PPC 2002 and Windows Mobile
2003, including Second Edition. Currently, I want to be able to allow my
customers to install the current version of my app onto this new operating
system. I am working on major update to my app that will be released next
year and will take advantage of the newer features. With this background, I
am sure you can appreciate that I do not want to make too many changes to
this present version in order to get it to install and run on Windows Mobile
5.0.

Regards,
Neville Lang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top