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.