int GetLastError( )
The function returns the last occurred error, then the value of special last_error variable where the last error code is stored will be zeroized. So, the
next call for GetLastError() will return 0.
この関数は最後に発生したエラーを返し、最後のエラーコードが格納されている特殊な last_error 変数の値がゼロ初期化されます。そのため、GetLastError()を次に呼び出すと、0 を返します。
Sample:
サンプル:
int err;
int handle=FileOpen("somefile.dat", FILE_READ|FILE_BIN);
if(handle<1)
{
err=GetLastError();
Print("error(",err,"): ",ErrorDescription(err));
return(0);
}
|