Sunday, January 29, 2006
Using CeRapiInvoke RAPI function
Remote Application Programming Interface or RAPI is a mechanism by which a desktop application can call routines on a windows ce or pocket pc device. There are many RAPI functions but one of the most powerful is CeRapiInvoke function. By using CeRapiInvoke function, your application can virtually do everything possible on the terminal.
For using CeRapiInvoke a dll targetted for the device needs to be created. This dll executes calls on the device on behalf of the desktop application. It can take parameters and can send back return values to desktop app. The signature of CeRapiInvoke function is:
For using CeRapiInvoke a dll targetted for the device needs to be created. This dll executes calls on the device on behalf of the desktop application. It can take parameters and can send back return values to desktop app. The signature of CeRapiInvoke function is:
HRESULT CeRapiInvoke(The dll is remotely loaded when CeRapiInvoke call is made by the desktop application. Then remote function with name pFunctionName is called. If value of ppIRAPIStream is NULL then the function is blocked and hence desktop application is blocked till the remote function returns.
LPCWSTR pDllPath,
LPCWSTR pFunctionName,
DWORD cbInput,
BYTE* pInput,
DWORD* pcbOutput,
BYTE** ppOutput,
IRAPIStream** ppIRAPIStream,
DWORD dwReserved
);