エクスポート (0) 印刷
すべて展開
EN
このコンテンツは設定された言語で表示できません。英語版のページが表示されます。

SetLastErrorEx function

Sets the last-error code.

Currently, this function is identical to the SetLastError function. The second parameter is ignored.

Syntax


void WINAPI SetLastErrorEx(
  _In_  DWORD dwErrCode,
  _In_  DWORD dwType
);

Parameters

dwErrCode [in]

The last-error code for the thread.

dwType [in]

This parameter is ignored.

Return value

This function does not return a value.

Remarks

The last-error code is kept in thread local storage so that multiple threads do not overwrite each other's values.

Most functions call SetLastError or SetLastErrorEx only when they fail. However, some system functions call SetLastError or SetLastErrorEx under conditions of success; those cases are noted in each function's documentation.

Applications can optionally retrieve the value set by this function by using the GetLastError function immediately after a function fails.

Error codes are 32-bit values (bit 31 is the most significant bit). Bit 29 is reserved for application-defined error codes; no system error code has this bit set. If you are defining an error code for your application, set this bit to indicate that the error code has been defined by the application and to ensure that your error code does not conflict with any system-defined error codes.

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Error Handling Functions
GetLastError
Last-Error Code

 

 

コミュニティの追加

追加
表示:
© 2014 Microsoft