IRAPISession::CeRapiGetError
This method reports errors that occur during RAPI2 method calls.
HRESULT CeRapiGetError(void);
Parameters
None.
Return Values
This method returns a HRESULT with errors that are be specific to RAPI2 method calls. This method should be used in conjuction with IRAPISession::CeGetLastError that checks for errors that are not related to RAPI.
Code Example
The following code example illustrates how to use IRAPISession::CeRapiGetError and IRAPISession::CeGetLastError to get error information after a RAPI function call.
HRESULT hr = S_OK;
BOOL bRet = pIRapiSession->CeCheckPassword(TEXT("Password"));
if (!bRet)
{
hr = pIRapiSession->CeRapiGetError();
if(SUCCEEDED(hr)) // If no RAPI errors, call CeGetLastError for the error on device
{
DWORD dwErr = pIRapiSession->CeGetLastError();
}
}
Requirements
OS Versions: Windows CE 5.01 and later.
Header: Rapi2.h.
Link Library: Ole32.lib, Rapiuuid.lib
See Also
IRAPISession::IUnknown | IRAPISession::CeGetLastError
Send Feedback on this topic to the authors