PC Review


Reply
Thread Tools Rate Thread

Bug/restriction in RAPI

 
 
Glyn Meek
Guest
Posts: n/a
 
      28th Nov 2004
Some background...We develop an application that runs on desktop computers
that may or may not have ActiveSync installed. If it does, and the user also
has our Pocket PC version of the application, then we provide a way for
users to transfer our specific type of data file backwards and forwards
between PC and Pocket PC. Works perfectly with the RAPI code in Opennetcf so
long as the user has Activesync loaded on the PC. It doesn;t have to be
running, and we can detect that, it just has to be loaded!

RAPI requires ActiveSync to facilitate the interprocessor communication
(which makes perfect sense), but we have a lot of our users who don't have a
Pocket PC, and consequently won't require or use our interface...BUT...they
still have access to the forms in our application that initiate and handle
this file transfer. When a user enters this part of the application, the
first thing we try to do is a

Dim myRAPI as new RAPI

statement, and our users who do not have ActiveSync may still,
inadvertently, enter this part of the program. We just want to be able to
detect that ActiveSync is not running or that the 'link' is not functioning
and if they try to do anything, just tell them that (as we do with folks who
have ActiveSync installed, but perhaps not running, or where the Pocket PC
is not in the cradle). The problem is that the 'Dim' statement causes a
hard and untrappable crash in the standard RAPI .dll that we use.

Is there a way in VB to detect if ActiveSync is present and installed on the
PC, BEFORE making any RAPI calls, declarations, etc...? Is there, for
example, a particula file that is present when ActiveSync installed that we
could test for?

We have tried adding a bunch of try...catches, but in VB we don't know how
to catch the 'inescapable exception' that gets thrown up when calling RAPI
when ActiveSync is not present...

Grateful thanks in advance for any thoughts, comments or ideas...

Glyn Meek




 
Reply With Quote
 
 
 
 
Ginny Caughey [MVP]
Guest
Posts: n/a
 
      28th Nov 2004
Glynn,

I'm not a VB programmer so I don't know for sure, but I handle a similar
situation in an unmanaged app by attempting a LoadLibrary call on
"rapi.dll". If that fails, then I can handle the situation gracefully.
Here's an example of using LoadLibrary in VB.Net that may be helpful:
http://www.dotnetinterop.com/faq/?q=LoadLibrary

--
Ginny Caughey
..Net Compact Framework MVP



"Glyn Meek" <(E-Mail Removed)> wrote in message
news:qFrqd.5929$(E-Mail Removed)...
> Some background...We develop an application that runs on desktop computers
> that may or may not have ActiveSync installed. If it does, and the user
> also has our Pocket PC version of the application, then we provide a way
> for users to transfer our specific type of data file backwards and
> forwards between PC and Pocket PC. Works perfectly with the RAPI code in
> Opennetcf so long as the user has Activesync loaded on the PC. It doesn;t
> have to be running, and we can detect that, it just has to be loaded!
>
> RAPI requires ActiveSync to facilitate the interprocessor communication
> (which makes perfect sense), but we have a lot of our users who don't have
> a Pocket PC, and consequently won't require or use our
> interface...BUT...they still have access to the forms in our application
> that initiate and handle this file transfer. When a user enters this part
> of the application, the first thing we try to do is a
>
> Dim myRAPI as new RAPI
>
> statement, and our users who do not have ActiveSync may still,
> inadvertently, enter this part of the program. We just want to be able to
> detect that ActiveSync is not running or that the 'link' is not
> functioning and if they try to do anything, just tell them that (as we do
> with folks who have ActiveSync installed, but perhaps not running, or
> where the Pocket PC is not in the cradle). The problem is that the 'Dim'
> statement causes a hard and untrappable crash in the standard RAPI .dll
> that we use.
>
> Is there a way in VB to detect if ActiveSync is present and installed on
> the PC, BEFORE making any RAPI calls, declarations, etc...? Is there, for
> example, a particula file that is present when ActiveSync installed that
> we could test for?
>
> We have tried adding a bunch of try...catches, but in VB we don't know how
> to catch the 'inescapable exception' that gets thrown up when calling RAPI
> when ActiveSync is not present...
>
> Grateful thanks in advance for any thoughts, comments or ideas...
>
> Glyn Meek
>
>
>
>



 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      29th Nov 2004
rapi.dll I believe is in the \Windows\System32 folder of the PC. You should
be able to look in the registry as well to see if the app is installed.

--
<ctacke/>
www.OpenNETCF.org
Your CF searches start and end here


"Glyn Meek" <(E-Mail Removed)> wrote in message
news:qFrqd.5929$(E-Mail Removed)...
> Some background...We develop an application that runs on desktop computers
> that may or may not have ActiveSync installed. If it does, and the user
> also has our Pocket PC version of the application, then we provide a way
> for users to transfer our specific type of data file backwards and
> forwards between PC and Pocket PC. Works perfectly with the RAPI code in
> Opennetcf so long as the user has Activesync loaded on the PC. It doesn;t
> have to be running, and we can detect that, it just has to be loaded!
>
> RAPI requires ActiveSync to facilitate the interprocessor communication
> (which makes perfect sense), but we have a lot of our users who don't have
> a Pocket PC, and consequently won't require or use our
> interface...BUT...they still have access to the forms in our application
> that initiate and handle this file transfer. When a user enters this part
> of the application, the first thing we try to do is a
>
> Dim myRAPI as new RAPI
>
> statement, and our users who do not have ActiveSync may still,
> inadvertently, enter this part of the program. We just want to be able to
> detect that ActiveSync is not running or that the 'link' is not
> functioning and if they try to do anything, just tell them that (as we do
> with folks who have ActiveSync installed, but perhaps not running, or
> where the Pocket PC is not in the cradle). The problem is that the 'Dim'
> statement causes a hard and untrappable crash in the standard RAPI .dll
> that we use.
>
> Is there a way in VB to detect if ActiveSync is present and installed on
> the PC, BEFORE making any RAPI calls, declarations, etc...? Is there, for
> example, a particula file that is present when ActiveSync installed that
> we could test for?
>
> We have tried adding a bunch of try...catches, but in VB we don't know how
> to catch the 'inescapable exception' that gets thrown up when calling RAPI
> when ActiveSync is not present...
>
> Grateful thanks in advance for any thoughts, comments or ideas...
>
> Glyn Meek
>
>
>
>



 
Reply With Quote
 
Jan Yeh_eMVP
Guest
Posts: n/a
 
      30th Nov 2004
Hello, Glyn

As Ginny and Chris said, you can use LoadLibrary() and to see if it's
successful or failed to determine whether ActiveSync exists or not.
Another way is to get the find the process "wcescomm.exe" in PC,
if it exists, that means this pc has ActiveSync.
Btw, I believe that "wcescomm.exe" is the background program
to detect if Pocket PC requests to connect.

You can run your RAPI code after your program confirmed the
existence of ActiveSync.

--

Best Regards,

Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
http://blog.mvpcn.net/janyeh


"Chris Tacke, eMVP" <(E-Mail Removed)> ¼¶¼g©ó¶l¥ó·s»D:(E-Mail Removed)...
> rapi.dll I believe is in the \Windows\System32 folder of the PC. You
> should be able to look in the registry as well to see if the app is
> installed.
>
> --
> <ctacke/>
> www.OpenNETCF.org
> Your CF searches start and end here
>
>
> "Glyn Meek" <(E-Mail Removed)> wrote in message
> news:qFrqd.5929$(E-Mail Removed)...
>> Some background...We develop an application that runs on desktop
>> computers that may or may not have ActiveSync installed. If it does, and
>> the user also has our Pocket PC version of the application, then we
>> provide a way for users to transfer our specific type of data file
>> backwards and forwards between PC and Pocket PC. Works perfectly with the
>> RAPI code in Opennetcf so long as the user has Activesync loaded on the
>> PC. It doesn;t have to be running, and we can detect that, it just has
>> to be loaded!
>>
>> RAPI requires ActiveSync to facilitate the interprocessor communication
>> (which makes perfect sense), but we have a lot of our users who don't
>> have a Pocket PC, and consequently won't require or use our
>> interface...BUT...they still have access to the forms in our application
>> that initiate and handle this file transfer. When a user enters this part
>> of the application, the first thing we try to do is a
>>
>> Dim myRAPI as new RAPI
>>
>> statement, and our users who do not have ActiveSync may still,
>> inadvertently, enter this part of the program. We just want to be able
>> to detect that ActiveSync is not running or that the 'link' is not
>> functioning and if they try to do anything, just tell them that (as we do
>> with folks who have ActiveSync installed, but perhaps not running, or
>> where the Pocket PC is not in the cradle). The problem is that the 'Dim'
>> statement causes a hard and untrappable crash in the standard RAPI .dll
>> that we use.
>>
>> Is there a way in VB to detect if ActiveSync is present and installed on
>> the PC, BEFORE making any RAPI calls, declarations, etc...? Is there, for
>> example, a particula file that is present when ActiveSync installed that
>> we could test for?
>>
>> We have tried adding a bunch of try...catches, but in VB we don't know
>> how to catch the 'inescapable exception' that gets thrown up when calling
>> RAPI when ActiveSync is not present...
>>
>> Grateful thanks in advance for any thoughts, comments or ideas...
>>
>> Glyn Meek
>>
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
are rapistub.dll, rapi.dll and the other rapi*.dll files req'd 70f9 Windows Vista Hardware 0 13th Feb 2008 08:13 PM
Using RAPI in ASP.NET Stephen Microsoft ASP .NET 0 7th Sep 2004 02:08 AM
RAPI in C Hilton Microsoft Dot NET Compact Framework 5 25th Mar 2004 05:15 PM
rapi.h Lloyd Dupont Microsoft Dot NET Compact Framework 1 15th Dec 2003 11:26 PM
system restriction message where no restriction implemented Zack Windows XP Security 0 12th Jul 2003 11:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:15 AM.