CeRapiGetError (RAPI)

Windows Mobile 6.5
A version of this page is also available for

This function reports errors that occur during RAPI method calls.

HRESULT CeRapiGetError(void);


This function returns a HRESULT with errors that are be specific to RAPI function calls. This function should be used in conjuction with CeGetLastError that checks for errors that are not related to RAPI.

The following code example illustrates how to use CeRapiGetError and CeGetLastError to get error information after a RAPI function call.

      HRESULT hr = S_OK; 
BOOL bRet = CeCheckPassword(TEXT("Password")); 
if (!bRet) 
   hr = CeRapiGetError(); 
   if(SUCCEEDED(hr)) // If no RAPI errors, call CeGetLastError for the error on device 
      DWORD dwErr = CeGetLastError(); 

Windows Embedded CEWindows CE 3.0 and later
Windows MobilePocket PC 2002 and later, Smartphone 2002 and later

Community Additions