INFO: GetLastError() Differs Between Windows 95 and Windows NT
ID: Q127991
|
The information in this article applies to:
-
Microsoft Win32 Software Development Kit (SDK), used with:
-
Microsoft Windows NT versions 3.51, 4.0
-
Microsoft Windows 95
-
Microsoft Windows 2000
SUMMARY
The extended error codes returned by the GetLastError() API are not
guaranteed to be the same under Windows 95, Windows 2000, and Windows NT. This difference
applies to extended error codes generated by calls to GDI, Window
Management, and System Services APIs.
The set of potential error codes returned by any particular Win32 API
depends on many underlying components, including system kernel-mode
components and loaded drivers. The extended error codes are not a part of
the Win32 specification. Therefore, they can change as operating system and
driver code is changed.
It is impossible to get the error codes for each API in synch across
operating system and platforms. Windows NT, Windows 95, and Windows 2000 have different
code bases. Third-party drivers return error codes that are mapped to Win32
error codes. In addition, it would be difficult to accurately maintain
error code information in the Win32 Programmer's Reference. Therefore, this
information is not included in the documentation.
In general, you should not rely on GetLastError() returning the same values
under Windows 95 and Windows NT. Sometimes, an API will fail and
GetLastError() will return 0 (ERROR_SUCCESS) under Windows 95. This is
because some of the APIs do not set error codes under Windows 95.
Additional query words:
Keywords : kbAPI kbGDI kbKernBase kbNTOS351 kbNTOS400 kbWinOS2000 kbSDKWin32 kbGrpUser kbWinOS95 kbDSupport kbGrpKernBase
Version : WINDOWS:95
Platform : WINDOWS
Issue type : kbinfo