Overview
The RAPI library (Remote API) is a desktop-only library which allows communication
between the desktop and the device using ActiveSync.
Using RAPI library you can transfer files between the device and the desktop, launch
applications on the device from the desktop, and do other file operations.
The RAPI library - RAPIDesktop.dll is based on OpenNETCF.Desktop.Communication
library.
To use these features both dll files: RAPIDesktop.dll and
OpenNETCF.Desktop.Communcation.dll should be copied to the application folder
(source code or compiled application).
The OpenNETCF.Desktop.Communcation library and its license agreement are included
in this package.
Note that the device must be connected to the desktop using ActiveSync.
Example:
'Add a RAPIDesktop object named rapi.
Sub Globals
End Sub
Sub App_Start
Form1.Show
rapi.New1
rapi.Connect
t = now '3
seconds timeout.
do until rapi.IsConnected = true
doevents
if (now - t)/cTicksPerSecond > 3 then
msgbox("Cannot
connect to device.")
appclose
end if
loop
if rapi.DeviceFileExists("\My Documents\MyApp.exe") = true then
rapi.CopyFileToDevice1(AppPath &
"\data.dat","\My
Documents")
rapi.DeviceShell("MyApp.exe","")
end if
End Sub