![background image](http://html1.mh-extra.com/html/xantech/crm-wic/crm-wic_reference-manual_3156372051.webp)
51
Note on Error Checking
The HRESULT, referred to in the Syntax of each method, ALWAYS returns "S_OK", so it is not useful
in error checking.
Instead, use the error checking values described in the HTTP Post and Visual Basic above, and the Error
Information Methods below
[[]]
to perform meaningful error checks.
Errors are based on the type of a function’s
out/retval
value. On error, a string
retval
is returned
as a null string, an integer
retval
returns -1, and Booleans will return FALSE.
Error Information Methods
GetLastErrorCode ( )
Returns the fault code from the last failed method call.
Syntax
HRESULT GetLastErrorCode(
[out, retval] long* Code
);
Parameters
Code
[out, retval] Integer representing fault code.
Remarks
The value of
Code
corresponds to
faultCode
of an HTTP Post response when
status
is 0 (failure).
See {Fault Codes, page 48} for a list of defined codes.
GetLastErrorString ( )
Returns the description of the error from the last failed method call.
Syntax
HRESULT GetLastErrorString(
[out, retval] BSTR* ErrorString
);
Summary of Contents for CRM-WIC
Page 1: ...Reference Manual Programming Guide Room Monitor Web Intelligent Controller Model CRM WIC...
Page 8: ...8 Hardware User Interface Hardware User Interface for the CRM WIC...
Page 16: ...16 For full details see the RPC section at the end of this manual...
Page 43: ...43 This expression resolves to this value 0 1 4 3 1 Hello Hello 0...
Page 98: ...98 Index...