CmGetLastErrorCode
Description
CmGetLastErrorCode returns the last set error code. Every API function/method call sends a request from the calling driver (on Windows: WibuCm32.dll) directly to CodeMeter License Server (on Windows: CodeMeter.exe). With the answer CodeMeter License Server always sends the last occurred error code back to the calling driver.
At this location the error code is stored in a global variable declared as Thread Local Storage (TLS). CmGetLastErrorCode returns this variable. If a problem in the calling driver occurs, an error code is also set at this global variable. Because of using Thread Local Storage the calling driver is thread safe.
|
Please note that with CodeMeter Version 6.10 for programming in C# the function CmGetLastErrorCode has become obsolete. Please use the new function CmGetLastErrorCode2 instead. If using a CodeMeter Version smaller than 6.10 please use function CmGetLastErrorCode. |
Syntax
int CMAPIENTRY CmGetLastErrorCode()
Return
The return value contains the error code set from the last called API function.