Where do I find RAPI header files and libs?

November 15, 2008

To use Remote API (RAPI) calls in your desktop application, you must include rapi.h or rapi2.h and link to rapi.lib. But these are not referred by standard paths of the Windows Mobile SDK.

Locations of these files has changed over time with SDK releases.

WM 6.0 SDK:

\Program Files\Windows Mobile 6 SDK\Activesync\inc
\Program Files\Windows Mobile 6 SDK\Activesync\Lib

WM 5.0 SDK R2

\Program Files\Windows Mobile 5.0 SDK R2\Samples\PocketPC\ActiveSync\Inc
\Program Files\Windows Mobile 5.0 SDK R2\Samples\PocketPC\ActiveSync\Lib

WM 5.0 SDK

\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc
\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Lib

As you see rapi header and lib files are always located under ActiveSync subfolder. It is because ActiveSync must be installed on the target computer for RAPI functions to work.  Installation of ActiveSync installs rapi.dll which actually implements all RAPI functions. It’s always good to confirm the presence of rapi.dll before making any RAPI calls.