RAPI Example/General Problems

S

Sean Patterson

Greetings All!

I'm starting a simple inventory checking application on a mobile device
that will export data into a CSV format to the desktop for futher
processing. Ideally, I'd like to have a "Synchronize" button or the line
on the mobile device that the user can click once the machine is docked
in the cradle to send the files over. In addition, it will download a
couple CSV files onto the mobile device which contain reference material
for room numbers and user information.

I know there are the OpenNETCF libraries to help assist with some of
this, so I'm taking that route to make my solution happen.

To this point, I've downloaded and installed the Smart Device Framework
1.2 as well as the Desktop.Communications library. I downloaded the
RAPI-VB example package and created a new OpenNETCF Application using
the RAPI code. I fire up debug mode, which instantiates a new Windows CE
..NET emulator and synchs all the code to it. Once I click the "Connect"
button, the application dies, saying there is a NullReference/Object
does not exist error at the m_RAPI = New RAPI statement. I've tried
adding a InitializeComponent() statment as well as do a full library
reference to the RAPI class, but I still have had no luck. This leads me
to a few questions regarding it:

1) Can the RAPI methods ONLY be invoked on the desktop and not on the
mobile machine?

2) If RAPI can only be invoked on the desktop, does this mean I will
have to write a "listener" app on the desktop to handle this transfer?
Or is there some basic options I can configure into ActiveSync itself to
copy this file over?

3) Can the Smart Device Framework be run on the Visual Studio 2003
emulator machines, or do I need to wait until the machines actually
arrive to do some testing?

4) Is there some simple solution I've missed to my initial problem and
I've typed out all this for nothing?! 8^D If so let me know the answer,
or point me in the right direction! I've been through most of these
threads and the Microsoft CompactFramework discussions without much luck.

Thanks in advance for ANY assistance you can provide!

- Sean

Peace out homeskillets!
 
E

Ercan Turkarslan [MSFT]

Hi Sean,

1) RAPI (Remote API) functions are provided on the desktop. It is not
possible to use RAPI functions from the mobile device. I would recommend
using RAPI, only if you need to do something on the device from your
desktop application.

2) If your goal is to sync a file with the desktop you can just use
ActiveSync's file sync capability.

You can find more information if you look at "CEUTIL Helper library" and
"ActiveSync Registry Settings" from MSDN.

If you need to launch an application on the desktop when ActiveSync
connection establishes, please look at "Registry-based Notification".

3) There should not be any hardware dependency for SDF. Although I do not
have experience with it, I expect that it should run on the emulator.

4) Using file sync should work in your case. But if you really need to copy
the file yourself, write a desktop .NET Framework application which uses
OpenNETCF's Desktop.Communications library. Registry that application to
"Registry-based Notification" of ActiveSync. When your application is
launched, open a RAPI session, open and read the file from the device.

Thanks

Ercan Turkarslan [MSFT]
Microsoft Mobile Devices Developer Support

(e-mail address removed)


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

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