Share via


CeRapiGetError (RAPI)

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function reports errors that occur during RAPI method calls.

Syntax

HRESULT CeRapiGetError(void);

Parameters

None.

Return Value

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.

Code Example

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(); 
   } 
}

Requirements

Header rapi.h
Library rapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

RAPI Functions
CeGetLastError (RAPI)