Group: Remote Application Programming (RAPI) - Library: rapi
This function attempts to initialize the Windows CE remote application programming interface (RAPI).
HRESULT CeRapiInit(void); DECLARE INTEGER CeRapiInit IN rapi None.
S_OK (0) indicates success. E_FAIL indicates failure.
The functions CeRapiInit or CeRapiInitEx must be called before any remote API calls can be performed. They initialize the underlying communications layers between the desktop computer and the target device.
A call to CeRapiInit does not return until the connection is made, an error occurs, or another thread calls CeRapiUninit.
I see no reason of using the CeRapiInit in FoxPro code because of its blocking nature. Once you call this function with no mobile device connected -- your application is frozen forever. The non-blocking CeRapiInitEx followed by the WaitForSingleObject call works very good.
Call CeRapiUninit even if the connection failed.
Home