|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.cardon.nativecall.LastError
public class LastError
Wrapped class for GetLastError
Windows API function.
This class is used in your JNI C or C++ code when a API function failed,
returning FALSE
. Your JNI code must call setLastError
.
This class was created because the GetLastError()
function must
be called in the same thread as that generated the error. But two calls to
native function are made in separated thread. So the called to
GetLastError()
must be made directly in the exception handling
function.
The error number is documented in WinError.h
. This file is
available in the Microsoft Plateform SDK for Windows 2003 or other version.
The description of these errors with a particular function is documented in
the MSDN library (online or distributed with SDK's).
Constructor Summary | |
---|---|
LastError()
|
Method Summary | |
---|---|
static int |
getLastError()
Get the last error number. |
static java.lang.String |
getLastErrorHex()
Get the last error number in decimal if 0 < error < 13884 ,
otherwise in hexadecimal. |
static void |
reset()
Reset the last error number to zero. |
static void |
setLastError(int errorNumber)
Set the last error number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LastError()
Method Detail |
---|
public static void setLastError(int errorNumber)
public static int getLastError()
reset
method after reading the last error number.
public static java.lang.String getLastErrorHex()
0 < error < 13884
,
otherwise in hexadecimal.
public static void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |