Win32 API

Purpose

The Microsoft® Win32® application programming interface (API) provides building blocks used by applications written for Microsoft Windows NT®, Windows® 2000, and Windows 95/98. You can provide your application with a graphical user interface; display graphics and formatted text; and manage system objects such as memory, files, and processes.

Where Applicable

The Win32 API can be used in all Windows-based applications.

Developer Audience

The Win32 API is designed for use by C/C++ programmers. Familiarity with the Windows graphical user interface and message-driven architecture is required.

Run-time Requirements

Applications that use the Win32 API require Windows NT, Windows 2000, Whistler, or Windows 95/98/Me. For information on which operating systems are required to use a particular function, see the Requirements section of the documentation for the function.

See Also

Windows GDI

Windows User Interface

Overview

General information about the Win32 API.

Reference

Documentation of specific functions, interfaces, and messages.

Feedback

Make error reports and feature requests directly to Microsoft.

Microsoft Platform SDK, February 2001 Edition.
This content last built on Thursday, February 01, 2001.


Overview of the Win32 API

The Microsoft® Win32® application programming interface (API) allows applications to exploit the power of the 32-bit Windows family of operating systems. Using the Win32 API, you can develop applications that run successfully on all 32-bit versions of Windows while taking advantage of the features and capabilities unique to each version.

Differences in the implementation of the programming elements depend on the capabilities of the underlying features of the platform. The most notable difference is that some functions are supported only on the more powerful platforms. For example, service functions are available only on Windows NT. Some functions have options that are supported on a subset of platforms. For example, PeekMessage supports additional flags on Windows 98/Me and Windows 2000. Most other differences are due to system limitations, such as restrictions on the range of values or the number of items a given function can manage. For example, there is a size limit on the cbString parameter of the TextOut function on Windows 95/98/Me.

For general information about system limitations in Windows 95/98/Me, see Windows 95/98/Me Limitations.

The Win32 API consists of the following functional categories:

  • Base Services
  • Common Control Library
  • Graphics Device Interface
  • Network Services
  • User Interface
  • Windows Shell


Base Services

The base services functions give applications access to the resources of the computer and the features of the underlying operating system, such as memory, file systems, devices, processes, and threads. An application uses these functions to manage and monitor the resources it needs to complete its work. For example, an application uses memory management functions to allocate and free memory. Process management and synchronization functions start and coordinate the operation of multiple applications or multiple threads of execution within a single application.

The file I/O functions provide access to files, directories, and input and output (I/O) devices. These functions give applications access to files and directories on disks and other the storage devices on a specified computer and on computers in a network. The file I/O functions support a variety of file systems, including the FAT file system, the CD-ROM file system (CDFS), and NTFS.

Applications can share code or information with other applications. For example, they can make useful procedures available to all applications by placing these procedures in DLLs. Applications access these procedures by using DLL functions to load the libraries and retrieve the addresses of the procedures. Communications functions read from and write to communications ports as well as control the operating modes of these ports. For interprocess communication (IPC), there are DDE, pipe, mailslot, and file mapping functions.

Registry and initialization functions let applications store application-specific information in system files so that new instances of the application or even other applications can retrieve and use the information.

Applications handle special conditions during execution. For example, they can handle errors, log events, and handle exceptions. Applications can also use special functions to debug code and improve its performance. For example, the debugging functions permit single-step control of the execution of other processes, and the performance monitoring functions provide detailed information on process execution.

For more information, see the following overviews.

Atoms
Clipboard
Communications
Consoles and Character-Mode Support
Data Decompression Library
Debugging
Device Input and Output
Device Management
Dynamic Data Exchange
Dynamic Data Exchange Management Library
Dynamic-Link Libraries
Error Handling
Event Logging
File I/O
File Mapping
File Systems
Handles and Objects
Hooks
Interprocess Communications
Mailslots
Memory Management
Network DDE
Performance Monitoring
Pipes
Power Management
Processes and Threads
PSAPI
Registry
Services
Structured Exception Handling
Synchronization
System Information
System Shutdown
Tape Backup
Time
Time Provider
Tool Help


Common Control Library

The shell incorporates a number of controls that help give Windows its distinctive look and feel. Because these controls are supported by DLLs that are a part of the operating system, they are available to all applications. Using the common controls helps keep an application's user interface consistent with that of the shell and other applications. Because developing a control can be a substantial undertaking, using the common controls can also save you a significant amount of development time.

The common controls are a set of control windows supported by the common control library Comctl32.dll. Like other controls, a common control is a child window that an application uses in conjunction with another window to perform I/O tasks. The common control DLL includes a programming interface that applications use to create and manipulate the controls as well as to receive user input.

For more information, see Common Controls


Graphics Device Interface

The graphics device interface (GDI) provides functions and related structures that an application can use to generate graphical output for displays, printers, and other devices. Using GDI functions, you can draw lines, curves, closed figures, paths, text, and bitmap images. The color and style of the items you draw depends on the drawing objects — that is, pens, brushes, and fonts — that you create. You can use pens to draw lines and curves, brushes to fill the interiors of closed figures, and fonts to write text.

Applications direct output to a specified device by creating a device context (DC) for the device. The device context is a GDI-managed structure containing information about the device, such as its operating modes and current selections. An application creates a DC by using device context functions. GDI returns a device context handle, which is used in subsequent calls to identify the device. For example, using the handle, an application can retrieve information about the capabilities of the device, such as its technology type (display, printer, or other device) and the dimensions and resolution of the display surface.

Applications can direct output to a physical device, such as a display or printer, or to a "logical" device, such as a memory device or metafile. Logical devices give applications the means to store output in a form that is easy to send subsequently to a physical device. After an application records output in a metafile, it can play that metafile any number of times, sending the output to any number of physical devices.

Applications use attribute functions to set the operating modes and current selections for the device. The operating modes include the text and background colors, the mixing mode (also called the binary raster operation) that specifies how colors in a pen or brush combine with colors already on the display surface, and the mapping mode that specifies how GDI maps the coordinates used by the application to the coordinate system of the device. The current selections identify which drawing objects are used when drawing output.

For more information, see the following overviews.

Bitmaps
Brushes
Clipping
Colors
Coordinate Spaces and Transformations
Device Contexts
Filled Shapes
Fonts and Text
Lines and Curves
Metafiles
Multiple Display Monitors
Painting and Drawing
Paths
Pens
Printing and Print Spooler
Rectangles
Regions


Network Services

The network functions allow communication between applications on different computers on a network. You can use these functions to create and manage connections to shared resources, such as directories and network printers, on computers in the network.

The network interfaces include Windows Networking and Network Management. Windows 95/98 supports a subset of these functions. To determine whether a function is supported on Windows 95/98, see the Requirements section in the documentation for the function.

For more information, see the following overviews.

Network Management
Windows Networking (WNet)


User Interface

The user interface functions give applications the means to create and manage a user interface. You use these functions to create and use windows to display output, prompt for user input, and carry out the other tasks necessary to support interaction with the user. Most applications create at least one window.

Applications define the general behavior and appearance of their windows by creating window classes and corresponding window procedures. A window class identifies default characteristics such as whether the window processes mouse button clicks or has a menu. The corresponding window procedure contains code that defines the behavior of the window, carries out requested tasks, and processes user input.

Applications generate output for a window by using the GDI functions. Because all windows share the display screen, applications do not receive access to the entire screen. Instead, the system aligns and clips all output to fit within the corresponding window. Applications can draw in a window in response to a request from the system or while processing input messages. When the size or position of a window changes, the system typically sends a message to the application requesting that it paint any previously unexposed area of its window.

Applications receive mouse and keyboard input in the form of messages. The system translates mouse movement, mouse button clicks, and keystrokes into input messages and places these messages in the message queue for the application. The system automatically provides a queue for each application. The application uses message functions to extract messages from the queue and dispatch them to the appropriate window procedure for processing.

Applications can process the mouse and keyboard input directly or let the system translate this low-level input into command messages by using menus and keyboard accelerators. You use menus to present a list of commands to the user. The system manages all actions required to let the user choose a command and then sends a message to the window identifying the choice. Keyboard accelerators are application-defined combinations of keystrokes that the system translates into messages. Accelerators typically correspond to commands in a menu and generate the same messages.

Applications often respond to command messages by prompting the user for additional information with dialog boxes. A dialog box is a temporary window that displays information or requests input. A dialog box typically includes controls — small, single-purpose windows — that represent buttons and boxes through which the user provides information. There are controls for typing text, scrolling text, selecting items from a list of items, and so on. Dialog boxes manage and process the input from these controls, making this information available to the application so that it can complete the requested command.

You can share useful data, such as bitmaps, icons, fonts, and strings, by adding this data as "resources" to the file for an application or DLL. Applications retrieve the data by using the resource functions to locate the resources and load them into memory.

Window management functions provide other features related to windows, such as carets, the clipboard, cursors, hooks, icons, and menus.

For more information, see the following overviews.

Buttons
Carets
Combo Boxes
Common Dialog Box Library
Controls
Cursors
Dialog Boxes
Edit Controls
Icons
Keyboard Accelerators
Keyboard Input
List Boxes
Menus
Messages and Message Queues
Mouse Input
Multiple Document Interface
Raw Input
Resources
Rich Edit Controls
Scroll Bars
Static Controls
Strings
Text Object Model
Timers
Version Information
Window Classes
Window Procedures
Window Properties
Window Stations and Desktops
Windowless Rich Edit Controls
Windows


Windows Shell

Your applications can use the shell interfaces and functions to enhance various aspects of the Windows shell.

A namespace is a collection of symbols, such as file and directory names or database keys. The shell uses a single hierarchical namespace to organize all objects of interest to the user, including files, storage devices, printers, and network resources. The namespace is similar to the directory structure of a file system, except that the namespace contains objects other than files and directories.

A shortcut (also called a shell link) is a data object that contains information used to access another object located anywhere in the shell's namespace. A shortcut allows an application to access an object without having to know the current name and location of the object. Objects that are accessible through shortcuts include files, folders, disk drives, printers, and network resources.

There are several ways to extend the shell. The system uses icons to represent files in the shell's namespace. By default, the system displays the same icon for all files that have the same file name extension. An icon handler can override the default and set the icon for a particular file. A context menu handler is a shell extension that modifies the contents of a context menu. The system displays a context menu when the user clicks or drags an object using mouse button 2. The context menu contains commands that apply specifically to the object that was clicked or dragged. Most context menus have a Properties command that displays the property sheet for the selected item. A property sheet contains information about an object in a set of overlapping windows called pages. A property sheet handler is a shell extension that adds pages to a system-defined property sheet or replaces pages in a Control Panel application's property sheet. A copy hook handler is a shell extension that approves or disapproves the moving, copying, deleting, or renaming of a file object.

The shell includes a Quick View command that allows the user to view the contents of a file without having to run the application that created it. A file viewer provides a user interface for viewing a file. The shell uses the file name extension to determine which viewer to run. You can provide file viewers for new file formats or replace an existing viewer with one that includes more functionality. A file viewer works in conjunction with a file parser, which provides the parsing needed to generate the Quick View of a file of a specified type. You can provide additional file parsers to support new file types.

For more information, see Shell Basics


A Generic Win32 Sample Application

This section introduces the source code components of a generic Win32®-based application, named GENERIC. They closely resemble their counterparts in a generic 16-bit Windows-based application. This section assumes that you have used Win32-based applications and therefore are already familiar with windows, menus, and dialog boxes.

The GENERIC application described here consists of the following parts:

  • The entry-point function
  • The menu
  • The window procedure
  • The About dialog box

The complete code is shown in Source Code.


The Entry-Point Function

Every Win32®-based application must have an entry-point function. The name commonly given to the entry point is the WinMain function.

As in most Win32-based applications, the WinMain function for the GENERIC application completes the following steps:

  • Registering the window class
  • Creating the main window
  • Entering the message loop


Registering the Window Class

Every window must have a window class. A window class defines the attributes of a window, such as its style, its icon, its cursor, the name of the menu, and the name of the window procedure.

The first step is to fill in a WNDCLASS structure with class information. Next, you pass the structures to the RegisterClass function. The GENERIC application registers the GenericAppClass window class as follows:

wc.lpszClassName = "GenericAppClass";
wc.lpfnWndProc = MainWndProc;
wc.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon( NULL, IDI_APPLICATION );
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = (HBRUSH)( COLOR_WINDOW+1 );
wc.lpszMenuName = "GenericAppMenu";
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;

RegisterClass( &wc );

For more information on the menu, see The Menu. For more information on the window procedure, see The Window Procedure.


Creating the Main Window

You can create the window by calling the CreateWindow function. The GENERIC application creates the window as follows:

hWnd = CreateWindow( "GenericAppClass",
   "Generic Application",
   WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
   0,
   0,
   CW_USEDEFAULT,
   CW_USEDEFAULT,
   NULL,
   NULL,
   hInstance,
   NULL
);

The first parameter is the name of the class that we registered. The remaining parameters specify other window attributes. This call creates the window, but the system does not display a window until the application calls the ShowWindow function. The GENERIC application displays the window as follows:

ShowWindow( hWnd, nCmdShow );


Entering the Message Loop

Once the main window is created and displayed, the WinMain function can begin its primary task, which is to read messages from the application queue and dispatch them to the appropriate window.

The system does not send input directly to an application. Instead, it places all mouse and keyboard input from the user into a message queue, along with messages posted by the system and other application. The application must read the message queue, retrieve the messages, and dispatch them so that the window procedure can process them.

The GENERIC application uses the following message loop:

while( GetMessage( &msg, NULL, 0, 0 ) ) {
   TranslateMessage( &msg );
   DispatchMessage( &msg );
}

The GetMessage function retrieves a message from the queue. The DispatchMessage function sends each message to the appropriate window procedure. The TranslateMessage function translates virtual-key message into character messages. In GENERIC, this is necessary to implement menu access keys.


The Menu

Most applications include a menu to provide a means for the user to select commands. The most common way to create a menu is to define it as a resource in the resource-definition file. The GENERIC application has a single menu, named Help, with a single command, About. The resource is defined as follows:

GenericAppMenu MENU
{
   POPUP "&Help"
   {
      MENUITEM "&About",         IDM_ABOUT
   }
}

The name of the menu resource is specified when registering the window class.

Selecting the About command causes GENERIC to display the about dialog box.


The Window Procedure

Every window must have a window procedure. The name of the window procedure is user-defined. The GENERIC application uses the following window procedure for the main window:

LRESULT WINAPI MainWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

The WINAPI modifier is used because the window procedure must be declared with the standard call calling convention.

The window procedure receives messages from the system. These may be input messages or window-management messages. You can optionally handle a message in your window procedure or pass the message to the system for default processing by calling the DefWindowProc function. The GENERIC application processes the WM_PAINT, WM_COMMAND, and WM_DESTROY messages, using a switch statement that is structured as follows:

   switch( uMsg ) {
      case WM_PAINT:
      ...
      case WM_COMMAND:
      ...
      case WM_DESTROY:
      ...
      default:
         return( DefWindowProc( hWnd, msg, wParam, lParam ));
   }

The WM_PAINT message indicates that you should redraw what's in all or part of your application's window. Use the BeginPaint function to get a handle to a device context, then use the device context for drawing within the application's window, with functions like TextOut. Use EndPaint to release the device context. The GENERIC application displays a text string, "Hello, World!", in the window using the following code:

   case WM_PAINT:
      hDC = BeginPaint( hWnd, &ps );

      TextOut( hDC, 10, 10, "Hello, World!", 13 );

      EndPaint( hWnd, &ps );
      break;

The WM_COMMAND message indicates that a user has selected a command item from a menu. The GENERIC application uses the following code to check if its About menu item has been selected:

      case WM_COMMAND:
         switch( wParam ) {
            case IDM_ABOUT:
            ...
            break;
         }

Most window procedures process the WM_DESTROY message. The system sends this message to the window procedure immediately after destroying the window. The message gives you the opportunity to finish processing and post a WM_QUIT message in the application queue. The GENERIC application handles the WM_DESTROY message as follows:

case WM_DESTROY:
   PostQuitMessage( 0 );
   break;


The About Dialog Box

A dialog box is a temporary window that displays information or prompts the user for input. The GENERIC application includes an About dialog box. Every application should include an About dialog box. The dialog box displays such information as the application's name and copyright information.

You create and display a dialog box by using the DialogBox function. This function takes a dialog box template and creates a dialog box.

The GENERIC application includes the following dialog box template in the resource-definition file:

AboutDlg DIALOG FIXED 6, 21, 198, 99
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About Generic"
FONT 8, "MS Shell Dlg"
BEGIN
    DEFPUSHBUTTON   "&OK", IDOK, 72, 74, 40, 14
    LTEXT           "Generic Application", 104, 45, 14,
                    128, 8
    LTEXT           "Written as a sample", 105, 45, 35, 59, 8
    LTEXT           "Microsoft Corporation", 106, 45, 45, 98, 8
    LTEXT           "Copyright (c) 1996", 107, 45,
                    54, 138, 8
END

The name of the source is specified as AboutDlg. For more information, see Dialog Resource.

When the user clicks About from the Help menu, the following code in the window procedure displays the About dialog box:

case WM_COMMAND:
   switch( wParam ) {
      case IDM_ABOUT:
         DialogBox( ghInstance, "AboutDlg", hWnd, (DLGPROC)
                    AboutDlgProc );
      break;
   }
break;

The last parameter is a pointer to a dialog box procedure. It has the following prototype.

LRESULT WINAPI AboutDlgProc( HWND, UINT, WPARAM, LPARAM );

A dialog box procedure is similar to a window procedure, but usually processes only dialog initialization and user-input messages. The GENERIC application contains the following message processing code:

switch( uMsg ) {
   case WM_INITDIALOG:
      return TRUE;
   case WM_COMMAND:
      switch( wParam ) {
         case IDOK:
            EndDialog( hDlg, TRUE );
            return TRUE;
      }
   break;
}

return FALSE;


Source Code

The GENERIC application consists of the following files:

  • GENERIC.C
  • GENERIC.H
  • GENERIC.RC
  • GENERIC.DLG


GENERIC.C

GENERIC.C contains code for the GENERIC application. It includes GENERIC.H.

/********************************************************************\
*  generic.c: Source code for generic                                *
*                                                                    *
*  Comments: Generic Win32-based Application                         *
*                                                                    *
*  Functions:                                                        *
*     WinMain      - Application entry point                         *
*     MainWndProc  - main window procedure                           *
*     AboutDlgProc - dialog procedure for About dialog               *
*                                                                    *
*                                                                    *
\********************************************************************/

/*********************  Header Files  *********************/

#include <windows.h>
#include "generic.h"

/*********************  Prototypes  ***********************/

LRESULT WINAPI MainWndProc( HWND, UINT, WPARAM, LPARAM );
LRESULT WINAPI AboutDlgProc( HWND, UINT, WPARAM, LPARAM );

/*******************  Global Variables ********************/

HANDLE ghInstance;

/********************************************************************\
*  Function: int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int)    *
*                                                                    *
*   Purpose: Initializes Application                                 *
*                                                                    *
*  Comments: Register window class, create and display the main      *
*            window, and enter message loop.                         *
*                                                                    *
*                                                                    *
\********************************************************************/

int PASCAL WinMain( HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpszCmdLine,
    int nCmdShow )
{
   WNDCLASS wc;
   MSG msg;
   HWND hWnd;

   if( !hPrevInstance )
   {
      wc.lpszClassName = "GenericAppClass";
      wc.lpfnWndProc = MainWndProc;
      wc.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW;
      wc.hInstance = hInstance;
      wc.hIcon = LoadIcon( NULL, IDI_APPLICATION );
      wc.hCursor = LoadCursor( NULL, IDC_ARROW );
      wc.hbrBackground = (HBRUSH)( COLOR_WINDOW+1 );
      wc.lpszMenuName = "GenericAppMenu";
      wc.cbClsExtra = 0;
      wc.cbWndExtra = 0;

      RegisterClass( &wc );
   }

   ghInstance = hInstance;

   hWnd = CreateWindow( "GenericAppClass",
      "Generic Application",
      WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
      0,
      0,
      CW_USEDEFAULT,
      CW_USEDEFAULT,
      NULL,
      NULL,
      hInstance,
      NULL
   );

   ShowWindow( hWnd, nCmdShow );

   while( GetMessage( &msg, NULL, 0, 0 ) ) {
      TranslateMessage( &msg );
      DispatchMessage( &msg );
   }

   return msg.wParam;
}

/********************************************************************\
* Function: LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM) *
*                                                                    *
*  Purpose: Processes Application Messages                           *
*                                                                    *
* Comments: The following messages are processed                     *
*                                                                    *
*           WM_PAINT                                                 *
*           WM_COMMAND                                               *
*           WM_DESTROY                                               *
*                                                                    *
*                                                                    *
\********************************************************************/

LRESULT CALLBACK MainWndProc( HWND hWnd, UINT msg, WPARAM wParam,
   LPARAM lParam )
{
   PAINTSTRUCT ps;
   HDC hDC;

   switch( msg ) {

/**************************************************************\
*     WM_PAINT:                                                *
\**************************************************************/

      case WM_PAINT:
         hDC = BeginPaint( hWnd, &ps );

         TextOut( hDC, 10, 10, "Hello, World!", 13 );

         EndPaint( hWnd, &ps );
         break;

/**************************************************************\
*     WM_COMMAND:                                              *
\**************************************************************/

      case WM_COMMAND:
         switch( wParam ) {
            case IDM_ABOUT:
               DialogBox( ghInstance, "AboutDlg", hWnd, (DLGPROC)
                          AboutDlgProc );
            break;
         }
      break;

/**************************************************************\
*     WM_DESTROY: PostQuitMessage() is called                  *
\**************************************************************/

      case WM_DESTROY:
         PostQuitMessage( 0 );
         break;

/**************************************************************\
*     Let the default window proc handle all other messages    *
\**************************************************************/

      default:
         return( DefWindowProc( hWnd, msg, wParam, lParam ));
   }

   return 0;
}

/********************************************************************\
* Function: LRESULT CALLBACK AboutDlgProc(HWND, UINT, WPARAM, LPARAM)*
*                                                                    *
*  Purpose: Processes "About" Dialog Box Messages                    *
*                                                                    *
* Comments: The About dialog box is displayed when the user clicks   *
*           About from the Help menu.                                *
*                                                                    *
\********************************************************************/

LRESULT CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
   switch( uMsg ) {
      case WM_INITDIALOG:
         return TRUE;
      case WM_COMMAND:
         switch( wParam ) {
            case IDOK:
               EndDialog( hDlg, TRUE );
               return TRUE;
         }
      break;
   }

   return FALSE;
}


GENERIC.H

GENERIC.C contains header information for the GENERIC application. It is included in GENERIC.C and GENERIC.RC.

/*************************************************************\
* generic.h: Header file for Generic                          *
*                                                             *
*                                                             *
\*************************************************************/

/******* Menu Defines *******/

#define IDM_ABOUT      1000


GENERIC.RC

GENERIC.RC contains resource information for the GENERIC application. The dialog resources are included in GENERIC.DLG.

/*************************************************************\
* generic.rc: Resource script for Generic                     *
*                                                             *
*                                                             *
\*************************************************************/

#include <windows.h>
#include "generic.h"
#include "generic.dlg"

GenericAppMenu MENU
{
   POPUP "&Help"
   {
      MENUITEM "&About",         IDM_ABOUT
   }
}


GENERIC.DLG

GENERIC.DLG defines the About dialog box for the GENERIC application. This file is included in GENERIC.RC.

/*************************************************************\
* generic.dlg: Dialogs for Generic                            *
*                                                             *
*                                                             *
\*************************************************************/

1 DLGINCLUDE "generic.h"

AboutDlg DIALOG FIXED 6, 21, 198, 99
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About Generic"
FONT 8, "MS Shell Dlg"
BEGIN
    DEFPUSHBUTTON   "&OK", IDOK, 72, 74, 40, 14
    LTEXT           "Generic Application", 104, 45, 14,
                    128, 8
    LTEXT           "Written as a sample", 105, 45, 35, 59, 8
    LTEXT           "Microsoft Corporation", 106, 45, 45, 98, 8
    LTEXT           "Copyright (c) 1996", 107, 45,
                    54, 138, 8
END


Windows 95/98/Me Programming

This guide covers programming issues specific to Windows 95/98. It provides release notes, conceptual information and a function reference. It is divided into the following sections:

  • Release Notes discusses the features introduced in the system following the release of Windows 95.
  • Windows 95/98/Me Architecture discusses the major components of the Windows 95/98 architecture.
  • Windows 95/98/Me Limitations discusses major differences between Windows 95/98 and Windows NT/Windows 2000.
  • Subsystem Version Numbers discusses how the system behavior differs for applications with different subsystem version numbers.
  • Windows 95/98/Me Overviews contains overviews that discuss device I/O control, exclusive volume locking, the FAT32 file system, long filenames, MS-DOS extensions, the thunk compiler, virtual machine services, and the Windows 95/98/Me Service Control Manager.
  • Windows 95/98/Me Reference contains complete reference information for the functions, structures, messages, and interfaces that are specific to Windows 95/98/Me.


Release Notes

The following topics describe the new features in system releases following the Windows 95 release.

  • Windows Millennium Edition
  • Windows 98
  • Windows 95, OEM Service Release 2

For information on how to verify which system you are running and use its new features, see Detecting Releases of Windows 95/98/Me.


Windows Millennium Edition

Windows Millennium Edition was released in July 2000. This release provides corrections for problems reported with Windows 98 and introduces new features. For more information, see Windows Millennium Edition.

The following were added to the Win32 API for Windows Millennium Edition.

Base

OpenThread

National Language Support

EnumSystemGeoID
GetGeoInfo
GetSystemDefaultUILanguage
GetUserDefaultUILanguage
GetUserGeoID
SetUserGeoID

User Interface

AllowSetForegroundWindow
GetMouseMovePointsEx
LockSetForegroundWindow
WM_APPCOMMAND
WM_NCXBUTTONDBLCLK
WM_NCXBUTTONDOWN
WM_NCXBUTTONUP
WM_XBUTTONDBLCLK
WM_XBUTTONDOWN
WM_XBUTTONUP


Windows 98 Release Notes

Windows 98 was released in June 1998. This release provides corrections for problems reported with Windows 95 and introduces new features. The following topics describe the new functions and messages introduced in Windows 98, and programming elements whose behavior is different in Windows 98 than in Windows 95.

  • New Functions in Windows 98
  • New Messages in Windows 98
  • Changes Between Windows 95 and Windows 98


New Functions in Windows 98

The following functions and groups of functions are new in Windows 98.

Base

CancelIo
CancelWaitableTimer
ConvertThreadToFiber
CreateFiber
CreateWaitableTimer
DeleteFiber
EnumDisplaySettingsEx
FlashWindowEx
GetCurrentFiber
GetFiberData
GetFileAttributesEx
GetLongPathName
GetWriteWatch
HasOverlappedIoCompleted
InitializeCriticalSectionAndSpinCount
InterlockedCompareExchange
InterlockedCompareExchangePointer
InterlockedExchangeAdd
IsDebuggerPresent
MsgWaitForMultipleObjectsEx
OpenWaitableTimer
QueryDosDevice
RegNotifyChangeKeyValue
ResetWriteWatch
SetWaitableTimer
SwitchToFiber
VirtualUnlock

Broadcast Architecture

Device Management

RegisterDeviceNotification
SetupDiCreateDeviceInfoList
SetupDiCreateDeviceInterfaceRegKey
SetupDiDeleteDeviceInterfaceData
SetupDiDeleteDeviceInterfaceRegKey
SetupDiDestroyDeviceInfoList
SetupDiEnumDeviceInterfaces
SetupDiGetClassDevs
SetupDiGetDeviceInterfaceAlias
SetupDiGetDeviceInterfaceDetail
SetupDiOpenClassRegKeyEx
SetupDiOpenDeviceInterface
SetupDiOpenDeviceInterfaceRegKey
UnregisterDeviceNotification

DirectX 5.0

GDI

AlphaBlend
ChangeDisplaySettingsEx
GetDCBrushColor
GetDCPenColor
GradientFill
SetArcDirection
TransparentBlt

ICM

Internet Explorer 4.0

IP Helper

Multiple Display Monitors

National Language Support

EnumCalendarInfoEx
EnumDateFormatsEx
EnumDateFormatsProcEx
EnumLanguageGroupLocales
EnumLanguageGroupLocalesProc
EnumLanguageGroupsProc
EnumSystemLanguageGroups
EnumUILanguages
EnumUILanguagesProc
GetCPInfoEx
IsValidLanguageGroup

Power Management

GetDevicePowerState
IsSystemResumeAutomatic
RequestWakeupLatency
SetThreadExecutionState

Still Image

User Interface

AnimateWindow
EndMenu
GetClipboardSequenceNumber
GetLayout
GetMenuInfo
GetMouseMovePointsEx
GetProcessDefaultLayout
InSendMessageEx
SendInput
SetLayout
SetMenuInfo
SetProcessDefaultLayout
TrackMouseEvent


New Messages in Windows 98

The following messages are new in Windows 98.

WM_MENUCOMMAND
WM_MENUDRAG
WM_MENUGETOBJECT
WM_MENURBUTTONUP
WM_MOUSEHOVER
WM_MOUSELEAVE
WM_MOUSEWHEEL
WM_NCMOUSEHOVER
WM_NCMOUSELEAVE
WM_SYNCPAINT
WM_UNINITMENUPOPUP


Changes Between Windows 95 and Windows 98

The following Win32 API elements have changed between Windows 95 and Windows 98.

Element | Change
CreateBrushIndirect, CreateDIBPatternBrushPt, CreatePatternBrush, LOGBRUSH | Brushes can be created from bitmaps or DIBs larger than 8 by 8 pixels.
ExtCreatePen | The PS_DASH, PS_DASHDOT, and PS_DASHDOTDOT are no longer supported.
InterlockedDecrement | The return value has changed.
InterlockedIncrement | The return value has changed.
OPENFILENAME | Changes to the lpstrInitialDir member.
SetDIBitsToDevice, StretchDIBits | Accepts JPEG or PNG images.
SetForegroundWindow | The system restricts which processes can set the foreground window. For more information, see Foreground and Background Windows.
WM_COMMAND | If a menu is defined with MNS_NOTIFYBYPOS, the WM_MENUCOMMAND message is sent instead of the WM_COMMAND message.

The following Win32 API elements support new flags.

Element | New flags
BitBlt | CAPTUREBLT, NOMIRRORBITMAP
BITMAPINFOHEADER, BITMAPV4HEADER | BI_JPEG, BI_PNG
ChangeDisplaySettings | DM_POSITION
DEV_BROADCAST_HDR | DBT_DEVTYP_DEVICEINTERFACE, DBT_DEVTYP_HANDLE
DrawCaption | DC_GRADIENT
DrawFrameControl | DFC_POPUPMENU, DFCS_HOT, DFCS_TRANSPARENT
DRAWITEMSTRUCT | ODS_HOTLIGHT, ODS_INACTIVE
DrawText, DrawTextEx | DT_NOFULLWIDTHCHARBREAK
GetDeviceCaps | SHADEBLENDCAPS
GetStockObject | DC_BRUSH, DC_PEN
OPENFILENAME | OFN_ENABLESIZING
PeekMessage | PM_QS_INPUT, PM_QS_PAINT, PM_QS_POSTMESSAGE, PM_QS_SENDMESSAGE
TRACKMOUSEEVENT | TME_NONCLIENT
TrackPopupMenu, TrackPopupMenuEx | Animation Flags, TPM_RECURSE
VirtualAlloc | MEM_WRITE_WATCH


Windows 95, OEM Service Release 2

Beginning in the second half of 1996, and up to the release of Windows 98, Windows 95, OEM Service Release 2 is the version of Windows that most OEMs (Original Equipment Manufacturer) pre-install on new machines.

The following topics describe the programming elements introduced in Windows 95, OEM Service Release 2:

  • The FAT32 File System
  • The GetDiskFreeSpaceEx Function
  • The Cryptographic API
  • DirectX 2
  • ActiveMovie
  • Internet Explorer 3.0 and the Windows Internet Extensions API
  • OpenGL 1.1


The FAT32 File System

Windows 95, OEM Service Release 2 includes FAT32 File System.

FAT32 is an enhancement of the File Allocation Table (FAT) file system. FAT32 supports large drives with improved disk space efficiency.

Most Win32-based applications do not need to be revised for FAT32. The only applications that will need revising are those that use low-level disk structures, or those that use API functions that are dependent upon the on-disk FAT format of data.


The GetDiskFreeSpaceEx Function

Windows 95, OEM Service Release 2 supports the GetDiskFreeSpaceEx function.

Under Windows 95, including OEM Service Release 2, the existing Win32 function GetDiskFreeSpace caps the amount of free or total disk space reported on large drives to 2 gigabytes. Under OEM Service Release 2, in order to maintain compatibility with existing applications, even on volumes that are smaller than 2 gigabytes, GetDiskFreeSpace may return incorrect values.

The GetDiskFreeSpaceEx function obtains correct values for all volumes, including those that are larger than 2 gigabytes. New Win32-based applications should use the GetDiskFreeSpaceEx function. It is supported on Windows 95 OEM Service Release 2 and on Windows NT 4.0. As with all Windows 95, OEM Service Release 2 features, however, applications that call GetDiskFreeSpaceEx should be prepared to fall back to the GetDiskFreeSpace function to maintain compatibility with older Win32 implementations.


The Cryptographic API

Windows 95, OEM Service Release 2 supports the Cryptographic Application Programming Interface (CryptoAPI).

CryptoAPI is a set of functions that let applications encrypt or digitally sign data in a flexible manner, while providing protection for the user's sensitive private key data.


DirectX 2

Windows 95, OEM Service Release 2 includes DirectX 2.

DirectX 2 is a set of technologies that assist in multimedia and games programming. DirectX 2 includes DirectDraw, DirectSound, and DirectPlay.


ActiveMovie

Windows 95, OEM Service Release 2 includes ActiveMovie™.

ActiveMovie is a cross-platform digital video technology for the desktop and the Internet. ActiveMovie lets developers and creative professionals create and deliver stunning titles on multiple platforms with crisp synchronized audio, video, and special effects.


Internet Explorer 3.0 and the Windows Internet Extensions API

Windows 95, OEM Service Release 2 includes Internet Explorer 3.0, which in turn includes the Win32 Internet Functions (WinInet).

WinInet provides a set of abstractions, layered over Windows Sockets, which support programming common operations for Internet protocols.

You can find documentation for WinInet in the Web Workshop. You can find the most current information at http://msdn.microsoft.com/workshop under Networking, Protocols & Data Formats.


OpenGL 1.1

Windows 95, OEM Service Release 2 includes OpenGL 1.1.

OpenGL is a three-dimensional (3-D) graphics software interface with which programmers create high-quality still and animated 3-D color images. The OpenGL overview describes the Windows NT/Windows 2000 and Windows 95 implementation of OpenGL.


Detecting Releases of Windows 95/98/Me

Use the GetVersionEx function to determine that a system is running Windows 95, OEM Service Release 2 or a later system release.

The GetVersionEx function fills the members of an OSVERSIONINFO data structure. If the dwPlatformId member of that structure is VER_PLATFORM_WIN32_WINDOWS, and the low word of the dwBuildNumber member is greater than 1080, the system is running Windows 95,OEM Service Release 2 or a later release.

MS-DOS applications can check for an MS-DOS version number of 7.1 or higher to determine that a system is running Windows 95,OEM Service Release 2 or a later release.

After you have determined that a computer is running Windows 95, OEM Service Release 2 or later, you can attempt to use new functions supported by the operating system. You can call some functions directly. For other functions, you need to call the LoadLibrary or LoadLibraryEx function to load the appropriate DLL file, then call the GetProcAddress function to obtain an address for the function.

Applications that attempt to use functionality from Windows 95, OEM System Release 2, Windows 98, or Windows Me should be prepared to fall back to earlier functionality to maintain compatibility with Windows 95.


Windows 95/98/Me Architecture

The operating environment for Windows 95/98/Me consists of a computer's hardware devices and the following software components:

  • Virtual machine manager (VMM).
  • Virtual devices (VxDs).
  • Device drivers.
  • 16- and 32-bit Windows dynamic-link libraries (DLLs).
  • MS-DOS – based applications.
  • 16- and 32-bit Windows-based applications.


Virtual Machine Manager

The virtual machine manager (VMM) is the 32-bit protected-mode operating system at the core of Windows 95/98/Me. Its primary responsibility is to create, run, monitor, and terminate virtual machines. The VMM provides services that manage memory, processes, interrupts, and exceptions such as general protection faults. The VMM works with virtual devices, 32-bit protected-mode modules, to allow the virtual devices to intercept interrupts and faults to control the access that an application has to hardware devices and installed software.

Both the VMM and virtual devices run in a single, 32-bit, flat model address space at privilege level 0 (also called ring 0). The system creates two global descriptor table (GDT) selectors, one for code and the other for data, and uses the selectors in the CS, DS, SS, and ES segment registers. Both selectors have a base address of zero and a limit of 4 gigabytes (GBs), so all the segment registers point to the same range of addresses. The VMM and virtual devices never change these registers.

The VMM provides multiple-threaded, preemptive multitasking. It runs multiple applications simultaneously by sharing CPU (central processing unit) time between the virtual machines in which the applications run. The VMM is also nonreentrant. This means that virtual devices must synchronize access to the VMM services. The VMM provides services, such as semaphores and events, to help virtual devices prevent reentering the VMM.

For more information about the VMM, including descriptions of the services that it provides to virtual devices, see the documentation included in the Device Driver Kit (DDK).


Virtual Devices

Virtual devices (VxDs) are 32-bit programs that support the device-independent VMM by managing the computer's hardware devices and supporting software. VxDs support all hardware devices for a typical computer, including the programmable interrupt controller (PIC), timer, direct memory access (DMA) device, disk controller, serial ports, parallel ports, keyboard, and display adapter. A VxD is required for any hardware device that has settable operating modes or retains data over any period of time. In other words, if the state of the hardware device can be disrupted by switching between multiple virtual machines or applications, the device must have a corresponding VxD.

Some VxDs support software, but no corresponding hardware device. In general, a VxD can provide any kind of services for the VMM and other virtual devices. Windows 95/98/Me allows the user to install new virtual device drivers to support an add-on hardware device or provide some system-wide software service.

A VxD can also provide application programming interface (API) functions for applications running in virtual 8086 mode or protected mode. These functions can give applications direct access to the features of the VxD.

Windows 95/98/Me includes a device input and output control (IOCTL) interface that allows Microsoft® Win32® – based applications to communicate directly with VxDs. Applications typically use this interface to carry out selected MS-DOS system functions, to obtain information about a device, or to carry out input and output (I/O) operations that are not available through standard Win32 functions. For more information about the device IOCTL interface, see Device I/O Control.

For more information about virtual devices, see the documentation included in the DDK.


Device Drivers

A Windows device driver is a DLL that Windows uses to interact with a hardware device, such as a display or keyboard. Rather than access devices directly, Windows loads device drivers and calls functions in the drivers to carry out actions on the device. Each device driver exports a set of functions; Windows calls these functions to complete an action, such as drawing a circle or translating a keyboard scan code. The driver functions also contain the device-specific code needed to carry out actions on the device.

Windows requires device drivers for the display, keyboard, and communication ports. Other drivers may also be required if the user adds optional devices to the system.

The DDK provides independent hardware and software vendors (IHVs and ISVs) with the resources to build device drivers and VxDs that are compatible with the Windows 95/98/Me. The resources include a configurable development environment, documentation, tools, and header files and libraries for several device types. The DDK contains the following components:

  • Header files and libraries for building device drivers and VxDs.
  • Sample source code for device drivers and VxDs.
  • 16- and 32-bit versions of the driver development tools.


Dynamic-Link Libraries

Dynamic linking provides a mechanism for linking applications to libraries of functions at run time. The libraries reside in their own executable files and are not copied into an application's executable file as with static linking. These libraries are "dynamically linked" because they are linked to an application when it is loaded and executed rather than when it is linked. When an application uses a DLL, the operating system loads the DLL into memory, resolves references to functions in the DLL so that they can be called by the application, and unloads the DLL when it is no longer needed. Dynamic linking can be performed explicitly by applications or implicitly by the operating system.

DLLs are designed to provide resources to applications. Many applications can use the code in a DLL, meaning that only one copy of the code is resident in the system. Also, it is possible to update a DLL without changing applications that use the DLL, as long as the interface to the functions in the DLL does not change.

Software developers can extend the Windows environment by creating a DLL that contains routines for performing operations and then making the DLL available to other Windows-based applications (in addition to internal Windows routines). DLLs most often appear as files with a .DLL filename extension; however, they may also have an .EXE or other filename extension.

For more information about dynamic-link libraries, see Dynamic-Link Libraries.

Windows 95/98/Me supports 32-bit DLLs as well as 16-bit DLLs that were written for Windows version 3.x. For a discussion of the issues involved in mixing 16- and 32-bit components in the Windows 95/98/Me environment, see Thunk Compiler.


MS-DOS - Based Applications

Platform SDK: Win32 API

MS-DOS – Based Applications

Windows 95/98/Me supports applications written for MS-DOS. Each MS-DOS – based application can run as a full-screen application, or it can run in a window on the desktop.

The system can run multiple MS-DOS – based applications at the same time. To do so, it creates a separate virtual machine (VM) for each MS-DOS – based application and shares the microprocessor among the MS-DOS VMs and the system VM (which contains all Windows-based applications). A VM can run an MS-DOS – based application in either the virtual 8086 mode or protected mode of the microprocessor.

Although most MS-DOS – based applications run fine in a window or as a full-screen application, some may not. To ensure absolute backward compatibility for all MS-DOS – based applications, Windows 95/98/Me provides a separate operating mode called "single MS-DOS application mode." When in this mode, Windows 95/98/Me runs only one MS-DOS – based application at a time. No Windows-based applications run in that mode; in fact, none of the graphical user interface (GUI) components of the system are even loaded.

Windows 95/98/Me supports the complete set of MS-DOS system functions and interrupts and provides extensions that permit MS-DOS – based applications to take advantage of features such as long filenames, and exclusive volume locking. For more information, see MS-DOS Extensions, Long File Names, and Exclusive Volume Locking.

Disk utilities and other applications that directly modify file system structures, such as directory entries, must request exclusive use of the volume before making modifications to the structures. Windows 95/98/Me provides a set of input and output control (IOCTL) functions to manage exclusive volume use. Exclusive use prevents applications from inadvertently changing the file system while a disk utility is trying modify it.

Virtual machine services let Microsoft MS-DOS – based applications take advantage of features provided by Windows 95/98/Me when the applications run in a window. MS-DOS – based applications can retrieve and, optionally, set the title of the window in which they run. Virtual machine services also allow MS-DOS – based applications to periodically check the state of an internal close flag and terminate if the flag is set. Windows 95/98/Me sets this flag when the user chooses the Close command from the system menu of the window in which the MS-DOS – based application runs. Close-aware applications enable the Close command, which gives the user an alternate way to exit the application and close the window. For more information, see Virtual Machine Services.


Windows-Based Applications

Windows 95/98/Me supports 16-bit applications written for Windows version 3.x as well as 32-bit applications that use the Win32 or Microsoft® Win32s® API. For 16-bit applications, Windows 95/98/Me preserves the cooperative multitasking model used in Windows version 3.x; that is, all 16-bit applications share the same virtual address space, the same message queue, and the same thread of execution. By contrast, each 32-bit Windows-based application has its own address space, a private message queue, and one or more threads of execution. In addition, each 32-bit thread is preemptively multitasked.

All new applications should be 32-bit applications developed using the Win32 API. For information about porting a 16-bit application to Win32, see Subsystem Version Numbers.


Windows 95/98/Me Limitations

Microsoft® Windows® 95/98/Me implements some functions and messages differently than Microsoft® Windows NT®/Windows® 2000. To minimize development and debugging time when you target both Windows 95/98/Me and Windows NT/Windows 2000, you need to understand the differences in the following areas:

  • Windows 95/98/Me General Limitations
  • Windows 95/98/Me Window Management
  • Windows 95/98/Me Graphics Device Interface
  • Windows 95/98/Me System Services
  • Windows 95/98/Me Multimedia


Windows 95/98/Me General Limitations

Certain functions and classes of functions, such as for security and event logging, are not supported by Windows 95/98/Me. Windows 95/98/Me provides stub routines for these unsupported functions so that applications designed for other operating systems that fully support the Win32® application programming interface (API) can run on Windows 95/98/Me without errors.

The extended error codes returned by the GetLastError function are not guaranteed to be the same in Windows 95/98/Me and Windows NT/Windows 2000. This difference applies to extended error codes generated by calls to window management, GDI, and system services functions. For example, the ActivateKeyboardLayout, GetKeyboardLayoutName, and UnloadKeyboardLayout functions do not support extended error code values; that is, you cannot retrieve errors for these functions by using the GetLastError function.

By design, functions that take string parameters can handle either Unicode™ (wide character) or ANSI strings. However, Windows 95/98/Me does not implement the Unicode (or wide character) version of most functions. With few exceptions, these functions are implemented as stubs that simply return an error value. However, Windows 95/98/Me does provide Unicode implementations of the following functions.

EnumResourceLanguages
EnumResourceNames
EnumResourceTypes
ExtTextOut
FindResource
FindResourceEx
GetCharWidth
GetCommandLine
 GetTextExtentPoint
GetTextExtentPoint32
lstrcat (Windows 98/Me)
lstrcpy(Windows 98/Me)
lstrlen
MessageBox
MessageBoxEx
TextOut

In addition, Windows 95/98/Me implements the MultiByteToWideChar and WideCharToMultiByte functions for converting strings to and from Unicode.


Windows 95/98/Me Window Management

Windows 95/98/Me implements some window management features in 16 bits. The use of 16 bits imposes some restrictions on parameters in functions and messages and places limits on internal storage. In some cases, Windows 95/98/Me provides features that can be used to avoid these restrictions and limitations. For example, the standard edit control is limited to somewhat less than 64 kilobytes (K) of text; however, the text in a rich edit control is limited only by available memory.

Handles

Windows 95/98/Me permits up to 16,364 window handles and 16,364 menu handles. Although Windows NT/Windows 2000 supports more handles than this, Windows 95/98/Me does support significantly more handles than Windows version 3.1.

Messages

The wParam parameter for the SendMessageCallback, SendMessageTimeout, and SendNotifyMessage functions is limited to a 16-bit value.

In Windows 95/98/Me, the wParam parameter in list box messages, such as LB_INSERTSTRING or LB_SETITEMDATA, is limited to a 16-bit value. One effect of this limit is that list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size, in bytes, of the items in a list box is limited only by available memory. In contrast, a 64K data limit is imposed by Windows version 3.1.

Any private application message must be defined above WM_USER + 0x100. A value above this will ensure that there is no collision between private messages and dialog box control messages.

Three-Dimensional Look

Windows 95/98/Me automatically applies the standard three-dimensional shading and color scheme to dialog boxes created by applications marked as version 4.0 or later. Applications that are marked for earlier versions can still get the three-dimensional appearance by applying the DS_3DLOOK style to dialog boxes. If this style is used, the system automatically applies the three-dimensional look without requiring the application to check the operating system version. This is useful, for example, in applications developed for Windows NT version 3.5. The DS_3DLOOK style is ignored in Windows NT version 3.1.

Message-box Styles

In Windows 95/98/Me, the MB_ICONQUESTION style used with the MessageBox, MessageBoxEx, and MessageBoxIndirect functions is obsolete. Win32-based applications should use the MB_ICONEXCLAMATION style instead. Similarly, applications should use the MB_ICONINFORMATION style instead of the MB_ICONASTERISK style and the MB_ICONSTOP style instead of the MB_ICONHAND style.

Cursors

The IDC_SIZE and IDC_ICON values used with the LoadCursor function are obsolete and should not be used in a Win32-based application that is marked as version 4.0.

Desktop

In Windows 95/98/Me, only one desktop is available while the system runs. Although the thread desktop functions, GetThreadDesktop and SetThreadDesktop, are available, they do not do anything.


Windows 95/98/Me Graphics Device Interface

Windows 95/98/Me implements some GDI features in 16 bits. The use of 16 bits imposes some restrictions on parameters in functions and places limits on internal storage.

Coordinate System

Windows 95/98/Me uses a 16-bit world coordinate system and restricts x- and y- coordinates for text and graphics to the range ±32K. Windows NT/Windows 2000 uses a 32-bit world coordinate system and allows coordinates in the range ±2 gigabytes (GB). If you pass full 32-bit coordinates to text and graphics functions in Windows 95/98/Me, the system truncates the upper 16 bits of the coordinates before carrying out the requested operation.

Because Windows 95/98/Me uses a 16-bit coordinate system, the sum of the coordinates of the bounding rectangle specified by the Arc, Chord, Pie, Ellipse, and RoundRect functions cannot exceed 32K. In addition, the sum of the nLeftRect and nRightRect parameters or the nTopRect and nBottomRect parameters cannot exceed 32K.

World Transformations

Windows 95/98/Me does not support world transformations that involve either shearing or rotations. The ExtCreateRegion function fails if the transformation matrix is anything other than a scaling or translation of the region.

Bitmaps

Windows 95/98/Me does not support the CBM_CREATEDIB value for the CreateDIBitmap function. The CreateDIBSection function should be used instead to create a DIB. CreateDIBSection is also available in Windows NT version 3.5.

If the biCompression member of the BITMAPINFOHEADER structure is the BI_BITFIELDS value, the bmiColors member of the BITMAPINFO structure contains three doubleword color masks that specify the red, green, and blue components, respectively, of each pixel. Windows 95/98/Me only supports the following color masks for 16 and 32 bits per pixel (bpp).

Value | Meaning
16bpp | The blue mask is 0x001F, the green mask is 0x03E0, and the red mask is 0x7C00.
16bpp | The blue mask is 0x001F, the green mask is 0x07E0, and the red mask is 0xF800.
32bpp | The blue mask is 0x000000FF, the green mask is 0x0000FF00, and the red mask is 0x00FF0000.

If the lpvBits parameter is NULL, the GetDIBits function fills in the dimensions and format of the bitmap in the BITMAPINFO structure pointed to by the lpbi parameter. In this case, if the function is successful, the return value in Windows 95/98/Me is the total number of scan lines in the bitmap. In Windows NT versions 3.1 and 3.5, however, the return value is 1 (TRUE), indicating success.

Pens and Brushes

In Windows 95/98/Me, pens and brushes have several limitations. The ExtCreatePen function supports solid colors only (the PS_SOLID style), and the PS_ALTERNATE and PS_USERSTYLE styles are not supported. Geometric pens (the PS_GEOMETRIC style) are limited to the BS_SOLID brush style specified in the LOGBRUSH structure passed to ExtCreatePen. In addition, the following pen styles are supported in paths only.

Value | Meaning
PS_ENDCAP_FLAT PS_ENDCAP_ROUND PS_ENDCAP_SQUARE | PS_JOIN_BEVEL PS_JOIN_MITER PS_JOIN_ROUND

Windows 95/98/Me does not support the dashed or dotted pen styles, such as PS_DASH or PS_DOT, in wide lines. The BS_DIBPATTERN brush style is limited to an 8- by 8-pixel brush.

Windows 95/98/Me does not support brushes from bitmaps or device independent bitmaps (DIBs) that are larger than 8 by 8 pixels. Although bitmaps larger than 8 by 8 pixels can be passed to the CreatePatternBrush or CreateDIBPatternBrush function, only a portion of the bitmap is used to create the brush.

Windows 95/98/Me does not provide automatic tracking of the brush origin. An application is responsible for using the UnrealizeObject, SetBrushOrgEx, and SelectObject functions each time it paints using a pattern brush.

Logical Objects

In Windows 95/98/Me, regions are allocated from the 32-bit heap and can, therefore, be as large as available memory. All other logical objects, however, share the 64K local heap. In addition, the number of region handles cannot exceed 16K.

To ensure that adequate space is always available for logical objects, applications should always delete objects when no longer needed. The following functions create objects that are placed in the local heap and have corresponding functions used to delete the objects.

Object | Create with | Delete with
Bitmap | CreateBitmap, CreateBitmapIndirect, CreateCompatibleBitmap, CreateDIBitmap, CreateDIBSection, CreateDiscardableBitmap | DeleteObject
Brush | CreateBrushIndirect, CreateDIBPatternBrush, CreateDIBPatternBrushPt, CreateHatchBrush, CreatePatternBrush, CreateSolidBrush | DeleteObject
Color space | CreateColorSpace | DeleteColorSpace
Device context (DC) | CreateDC, GetDC | DeleteDC, ReleaseDC
Enhanced metafile | CloseEnhMetaFile, CopyEnhMetaFile, GetEnhMetaFile, SetEnhMetaFileBits | DeleteEnhMetaFile
Enhanced metafile DC | CreateEnhMetaFile | CloseEnhMetaFile
Extended pen | ExtCreatePen | DeleteObject
Font | CreateFont, CreateFontIndirect | DeleteObject
Memory DC | CreateCompatibleDC | DeleteDC
Metafile | CloseMetaFile, CopyMetaFile, SetMetaFileBitsEx | DeleteMetaFile
Metafile DC | CreateMetafile | CloseMetaFile
Palette | CreatePalette | DeleteObject
Pen | CreatePen, CreatePenIndirect | DeleteObject
Region | CombineRgn, CreateEllipticRgn, CreateEllipticRgnIndirect, CreatePolygonRgn, CreatePolyPolygonRgn, CreateRectRgn, CreateRectRgnIndirect, CreateRoundRectRgn, ExtCreateRegion, PathToRegion | DeleteObject

Physical objects have always existed in global memory and are, therefore, not limited.

Object Deletion

There are platform differences in the way drawing objects are deleted. In Windows NT/Windows 2000, if a drawing object (pen or brush) is deleted while it is still selected into a DC, the DeleteObject function fails. In Windows 95/98/Me, the function succeeds, but the result is a nonfunctioning object. This nonfunctioning object is automatically destroyed when the DC is deleted.

Paths

When a path is constructed in Windows 95/98/Me, only the following functions are recorded: ExtTextOut, LineTo, MoveToEx, PolyBezier, PolyBezierTo, Polygon, Polyline, PolylineTo, PolyPolygon, PolyPolyline, and TextOut.

PolyXXX Point Limitation

The PolyXXX family of functions have a limit on the number of points they can draw. This limit depends on the width of the line (that is, the width of the pen selected into the DC), as shown in the following table.

Line width | Maximum number of points
line width = 1 | 16K
line width > 1 (that is, wideline) and the device supports wideline | 16K
line width > 1 but device does not support wideline | approximately 1360 (that is, a few less than 16K / 12)

Any points beyond the limit are ignored. To draw more points, divide the data into groups that have less than the maximum number of points and call the function for each group.

Graphics Mode and Device Capabilities

In Windows 95/98/Me, the GetGraphicsMode and SetGraphicsMode functions support the GM_COMPATIBLE value only. The GM_ADVANCED value is not supported.

In Windows 95/98/Me, the DeviceCapabilities function returns – 1 when called with the DC_FILEDEPENDENCIES value because that capability is not supported. In Windows 95/98/Me, DeviceCapabilities supports the following additional capabilities.

Value | Meaning
DC_DATATYPE_PRODUCED | Retrieves an array of strings containing the data types that the printer driver supports. A return value of – 1 indicates that the printer driver only understands device-specific commands (in other words, "RAW" data) that are native to the printer. A return value of 2 or more indicates the number of strings in the array.
DC_EMF_COMPLIANT | Returns a flag that indicates if the specified printer driver is capable of accepting an enhanced metafile (EMF) spooled by the system (that is, the printer driver is EMF-compliant). The function returns 1 if the printer driver is EMF-compliant and – 1 if the printer driver is not.

Enhanced Metafiles

Although Windows 95/98/Me imposes no restrictions on the PlayEnhMetaFile and PlayEnhMetaFileRecord functions, the files and records that these functions execute are subject to the limitations described in this section. For example, the functions ignore records that attempt to draw outside of the 16-bit coordinate space or that apply shearing or rotation to world transformations.

In Windows 95/98/Me, the maximum length of the description string for an enhanced metafile is 16K. This limit applies to the GetEnhMetaFileDescription, GetEnhMetaFileHeader, and GetEnhMetaFile functions.

In Windows 95/98/Me, the dmDeviceName member of the DEVMODE structure specifies the "friendly" name of the printer, which may be set to any user-defined value. Windows 95/98/Me, however, does not support the the following members; they are included for compatibility with Windows NT/Windows 2000.

dmBitsPerPel
dmDisplayFlags
dmDisplayFrequency
dmFormName
dmPelsHeight
dmPelsWidth

Printing and Print Spooler

Windows 95/98/Me does not support print monitor dynamic-link libraries (DLLs) that have been developed for Windows NT/Windows 2000. To add a monitor using the AddMonitor function, you must specify a monitor DLL that has been explicitly created for Windows 95/98/Me. The following printing and print spooling functions are not available in Windows 95/98/Me.

AddForm
AddPrinterConnection
ConnectToPrinterDlg
DeleteForm
DeletePrinterConnection
EnumForms 		FindClosePrinterChangeNotification
FindFirstPrinterChangeNotification
FindNextPrinterChangeNotification
GetForm
ResetPrinter
SetForm

In Windows 95/98/Me, the SetPrinter function ignores the pShareName member of the PRINTER_INFO_2 structure. The PRINTER_INFO_3 and PRINTER_INFO_4 structures used with the SetPrinter, GetPrinter, and EnumPrinters functions are not supported in Windows 95/98/Me. The PRINTER_INFO_5 structure, which is available in Windows 95/98/Me, is not supported in versions of Windows NT earlier than version 4.0.

The PRINTER_ENUM_CONNECTIONS value used with the EnumPrinters function is not supported in Windows 95/98/Me. The DOC_INFO_2 structure used with the StartDocPrinter function and the PORT_INFO_2 structure used with the EnumPorts function are not supported in Windows NT versions 3.1 and 3.5.

Windows 95/98/Me supports the DRAWPATTERNRECT printer escape.

Win32-based applications that send output to PostScript™ printers should use the GetDeviceCaps function to check for the PC_PATHS value to determine whether to use path functions or printer escapes to draw paths. Applications should use paths functions whenever possible. The following example shows how to check for this capability.

// Determine whether to use path functions on the device.
// hDC is the output device.

OSVERSIONINFO osvi;

osvi.dwOSVersionInfoSize = sizeof(osvi);
GetVersionEx(&osvi);

if ((osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) ||
     ((osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
       (GetDeviceCaps(hDC, POLYCAPS) & PC_PATHS)))
    bUsePaths = TRUE;
else
    bUsePaths = FALSE;

In Windows 95/98/Me, printer drivers typically set this capability to zero. This means that Win32-based applications sending output to Postscript printers need to use the ExtEscape function and the printer-specific escapes to draw paths at the printer. (The Escape function cannot be used for this.)

In Windows NT/Windows 2000, the string specified in the lpszDeviceName parameter of the EnumDisplaySettings function must be of the form "\\.\DisplayX", where X can be 1, 2, or 3. In Windows 95/98/Me, lpszDeviceName must be NULL.


Windows 95/98/Me System Services

The following sections highlight the main differences in the system services provided by Windows 95/98/Me.

File I/O

Windows 95/98/Me does not support asynchronous file input and output (I/O), except on serial devices. Therefore, the ReadFile and WriteFile functions will fail if you pass in an overlapped region on anything other than a serial device. The GetOverlappedResult function works only on serial devices or on files opened by using the DeviceIoControl function.

In Windows 95/98/Me, the ReadFileEx and WriteFileEx functions will fail if you pass in the handle of a serial device (for example, COM2). ReadFile and WriteFile, however, accept the handle of a serial device.

In Windows 95/98/Me, the CreateFile function does not support the standard "\\.\C:" and "\\.\PhysicalDrive0" formats used to gain access to the logical or physical drives. To gain access, applications must specify a virtual device (VxD) name instead and use the DeviceIoControl function to send requests through the VxD to the logical and physical drives. For more information, see Device I/O Control.

In Windows NT/Windows 2000, the DeleteFile function fails if you attempt to delete a file that is open for normal I/O or is opened as a memory mapped file. In Windows 95/98/Me, DeleteFile deletes such files. Because deleting open files may cause loss of data and application failure, you must take every precaution to close files before attempting to delete them by using DeleteFile.

Time

In Windows NT/Windows 2000, the FileTimeToDosDateTime and DosDateTimeToFileTime functions allow dates up to 12/31/2107. In Windows 95/98/Me, these functions allow dates up to 12/31/2099.

The precision of the time for a file on a file allocation table (FAT) file system volume is 2 seconds. If Windows 95/98/Me is connected through a network to a different file system, the time precision is limited only by the remote device.

Memory Management

In Windows 95/98/Me, fixed memory blocks cannot be reallocated to be movable. The GMEM_MODIFY and GMEM_MOVEABLE combination of values has no effect when a memory block is reallocated by using the GlobalReAlloc function. Similarly, the LMEM_MODIFY and LMEM_MOVEABLE combination has no effect when a memory block is reallocated by using the LocalReAlloc function.

In Windows 95/98/Me, committing memory for a page that is already committed is an expensive operation that has no ultimate effect (it is expensive because additional storage is allocated and subsequently freed for each committed page). When committing memory by using the VirtualAlloc function, an application should specify only the pages that actually need to be committed.

Although applications can request that memory allocation be at a specific virtual address, applications must not depend on any given address range always being available on every operating system. Applications can query the address space by using the GetSystemInfo function.

In Windows 95/98/Me, memory allocated by Win32-based applications falls in the address range 4 megabytes (MB) – 2GB for private memory and 2GB – 3GB for shared memory (shared mapped files). The PAGE_WRITECOPY and PAGE_GUARD access protection values are not supported. Instead of using the PAGE_GUARD value and handling the EXCEPTION_GUARD_PAGE exception, applications can use the PAGE_NOACCESS value and handle the EXCEPTION_ACCESS_VIOLATION exception.

File Mapping

The SEC_IMAGE and SEC_NOCACHE values for the fdwProtect parameter of the CreateFileMapping function are not supported in Windows 95/98/Me. In addition, the dwMaximumSizeHigh parameter of CreateFileMapping is ignored in Windows 95/98/Me, so applications should specify zero for the parameter.

In Windows 95/98/Me, shared memory mapped files that are created by using the MapViewOfFileEx function appear in the same address space across all 32-bit processes in the system. If you pass in a specific base offset in the lpvBase parameter of MapViewOfFileEx and the function succeeds, you are guaranteed that the same memory region is available in every process. This is not true in Windows NT/Windows 2000 because MapViewOfFileEx fails for any process that already has the given memory region in use.

Coherence guarantees that the data accessible in a file view is an identical copy of the file's contents on disk. In Windows 95/98/Me, file views derived from a single file-mapping object are coherent only if the file is accessed through one of the views. A view of a file is not guaranteed to be coherent if the file is accessed by normal file I/O functions, such as ReadFile or WriteFile, or by views created from a different file-mapping object.

If you close a file handle that was used to create a file mapping object, both Windows NT/Windows 2000 and Windows 95/98/Me hold the file open until you unmap the last view of the file by using the UnmapViewOfFile function. However, Windows NT/Windows 2000 holds the file open with no sharing restrictions, whereas Windows 95/98/Me holds it open using the sharing restrictions of the original file handle. To ensure exclusive access to a file in Windows NT/Windows 2000, the file handle must remain open for the life of the file-mapping object. Because Windows 95/98/Me retains the sharing restrictions, both the file handle and the handle to the file-mapping object may be closed after calling MapViewOfFile and exclusive access to the file is ensured.

In Windows 95/98/Me, if the FILE_MAP_COPY value is specified for the fdwAccess parameter of MapViewOfFile (or MapViewOfFileEx), the hMapObject parameter must have been created with the PAGE_WRITECOPY value. In addition, the dwOffsetHigh parameter of MapViewOfFile (or MapViewOfFileEx) is ignored, so applications should specify zero for the parameter.

There are slight platform differences in the way copy-on-write file mappings are implemented. In Windows 95/98/Me, a call to MapViewOfFile with FILE_MAP_COPY returns an error unless PAGE_WRITECOPY was used with the CreateFileMapping function. In both Windows NT/Windows 2000 and Windows 95/98/Me, creating the map with PAGE_WRITECOPY and the view with FILE_MAP_COPY produces a view to the file that makes the pages swappable and prevents modifications from going to the original data file. In Windows 95/98/Me, PAGE_WRITECOPY must be passed to CreateFileMapping, but this is optional in Windows NT/Windows 2000.

If you share the mapping between multiple processes by using the DuplicateHandle or OpenFileMapping function and one process writes to a view, the modifications will not be propagated to the other process in Windows NT/Windows 2000. However, the modifications will be propagated in Windows 95/98/Me. The original file, though, will not change on either platform.

Registry

The Windows 95/98/Me registry does not allow key names containing control characters. In addition, if the lpszSubKey parameter is an empty string (""), the RegDeleteKey function deletes the key identified by the hKey parameter.

In Windows 95/98/Me, the RegCreateKeyEx function creates a non-volatile key even if the REG_OPTION_VOLATILE value is specified.

Handle Duplication

In Windows 95/98/Me, the DuplicateHandle function cannot duplicate handles of registry keys as it can in Windows NT/Windows 2000. The function returns an error if an application attempts to duplicate the handle of a registry key. In addition, when a file handle is duplicated, the duplicated handle will not be granted more access than the original.

Thread Locales

Thread locales, retrieved and set by using the GetThreadLocale and SetThreadLocale functions, are static and can only be changed at system boot time.

Instruction Cache

In Windows 95/98/Me, the FlushInstructionCache function always returns TRUE. Windows 95/98/Me supports single processor machines only.

Access Rights

The SYNCHRONIZE standard access rights flag is not supported in Windows 95/98/Me. The following functions are affected.

DuplicateHandle

MsgWaitForMultipleObjects

MsgWaitForMultipleObjectsEx

OpenEvent

OpenMutex

OpenProcess

OpenSemaphore

OpenWaitableTimer

WaitForMultipleObjects

WaitForMultipleObjectsEx

WaitForSingleObject

WaitForSingleObjectEx


Windows 95/98/Me Multimedia Services

The sndAlias macro is not supported in Windows 95/98/Me. In addition, the SND_ALIAS and SND_ALIAS_ID values for the PlaySound function are not supported in Windows 95/98/Me.

The Windows 95/98/Me multimedia functions are not designed to be used by two or more threads in the same process. Although most multimedia functions will work if they are called by multiple threads, some are likely to fail. Functions that are particularly likely to fail include PlaySound, any of the functions that prepare or unprepare headers, and any of the open and close functions. PlaySound can never be used simultaneously by multiple threads in the same process. The functions that prepare or unprepare headers and the open and close functions can be used simultaneously by multiple threads in the same process, but only if they do not pass the same structure.


Subsystem Version Numbers

Windows 95, Windows 98, and Windows Me support applications that have a subsystem version number of either 3.x, 4.0, 4.1, or 5.0. You set an application's subsystem version number by using the linker.

The following topics describe how Windows 95/98/Me treats applications differently based on their subsystem version numbers. This information is intended to help you identify areas in an application written for Windows version 3.x that you must revise to take advantage of new features.

  • Window Management Differences
  • Dialog Box Differences
  • Button Differences
  • Edit Control Differences
  • List Box Differences
  • Combo Box Differences
  • Menu Differences
  • System Bitmap and Color Differences
  • System Metrics Differences
  • Parameter Validation Differences


Window Management Differences

When an application with subsystem version 4.0 or later uses the SetWindowLong function to change a window's style, Windows 95/98/Me sends the window a WM_STYLECHANGING message before changing the style. The message's lParam parameter is the address of a STYLESTRUCT structure. The styleOld and styleNew members of the structure specify the old and new styles. By processing WM_STYLECHANGING, an application can inspect the styles and perhaps change them.

Windows 95/98/Me sends the WM_STYLECHANGED message after changing the style. Again, the lParam parameter is the address of a STYLESTRUCT structure that specifies the new styles. The application can use WM_STYLECHANGED to update any style-dependent information stored in the application's internal data structures.

Windows 95/98/Me, however, does not send the WM_STYLECHANGING and WM_STYLECHANGED messages to a version 3.x application.

An application marked version 4.0 or later cannot use the SetWindowLong function to set the WS_EX_TOPMOST style for a window or to remove the style from a window. The application must use the SetWindowPos function to set or remove the WS_EX_TOPMOST style.

Windows 95/98/Me automatically adds and removes the WS_EX_WINDOWEDGE style for windows in all applications. For a version 3.x application, Windows 95/98/Me adds the WS_EX_WINDOWEDGE style to a window if, in version 3.1, the window would have a dialog border or a sizable border. Windows 95/98/Me removes the WS_EX_WINDOWEDGE style if the window's style changes so that it would no longer have a dialog border or sizable border in version 3.1. Windows 95/98/Me uses similar criteria for adding and removing the WS_EX_WINDOWEDGE style for a version 4.0 or later application, except that any window that has a title bar receives the WS_EX_WINDOWEDGE style, regardless of the window's other border styles.

When the user drags the icon of a minimized window created by a version 3.x application, Windows 95/98/Me sends the window a WM_QUERYDRAGICON message to retrieve the cursor to use while dragging. Windows 95/98/Me also sends WM_QUERYDRAGICON to retrieve the icon to display in the task-switch window that appears when the user presses the ALT+TAB key combination. Windows 95/98/Me does not send WM_QUERYDRAGICON to a window created by a version 4.0 or later application. Instead, the application is expected either to use the WM_SETICON and WM_GETICON messages or to set the big and small icons when registering the window class.

When a window in a version 4.0 or later application loses the mouse capture as a result of a call to the SetCapture function, the window receives a WM_CAPTURECHANGED message, but Windows 95/98/Me sends the message asynchronously. In other words, the window receives the message, but possibly not right away. Some of the ways in which a window can lose the mouse capture include:

  • The user activated a different application by clicking one of its windows.
  • The DefWindowProc function changed the capture in response to a WM_CANCELMODE message.
  • Another window using the same message queue called the SetCapture function. (All 16-bit applications share the same queue, but each 32-bit thread has its own queue.)

If a child window in a version 3.x application has the WS_EX_NOPARENTNOTIFY style, Windows 95/98/Me disregards the style when the user clicks the child window. That is, Windows 95/98/Me sends the WM_PARENTNOTIFY message to all windows in the parent chain regardless of whether the child window has the WS_EX_NOPARENTNOTIFY style. If a child window in a version 4.0 or later application has this style, Windows 95/98/Me does not send WM_PARENTNOTIFY messages when the user clicks the child window.

In a version 3.x application, it is possible for the horizontal coordinate on the left side of a window's client area to be greater than that on the right side. This happens because version 3.x sometimes incorrectly handles an empty client rectangle that contains a vertical scroll bar. (Fixing the problem would cause some applications to generate general protection faults.) In a version 4.0 or later application, it is not possible for the horizontal coordinate of the left side of a client area to be greater than that of the right side.


Dialog Box Differences

A dialog box created by a version 4.0 or later application automatically receives the DS_3DLOOK style. This style gives three-dimensional borders to child controls in the dialog box and draws the entire dialog box using the three-dimensional color scheme. The DS_3DLOOK style is available to a dialog box created by a version 3.x application, but you must explicitly add the style to the dialog box template. The application that creates the dialog box determines the version number of the dialog box.

Windows 95/98/Me performs a strict validation check on the DS_ styles specified in a dialog box template. If the template contains any styles that Windows 95/98/Me does not recognize and a version 4.0 or later application is creating the dialog box, the creation fails. If a version 3.x application is creating the dialog box, the system debugger generates a warning, but Windows 95/98/Me creates the dialog box anyway.


Button Differences

The parent window of a button (except push buttons) in a version 3.x application receives a WM_CTLCOLORBTN message when the button is about to be drawn. In a version 4.0 or later application, however, the parent window of a button receives the WM_CTLCOLORSTATIC message, which retrieves a color appropriate for drawing text on the background of the dialog box. Windows 95/98/Me sends WM_CTLCOLORSTATIC to retrieve the background and text colors for the text area of check boxes, radio buttons, and group buttons. An application should process WM_CTLCOLORSTATIC in order to correctly set the colors of any dialog box item that contains text and appears directly on the dialog area.

Windows 95/98/Me performs default handling of the WM_CTLCOLORBTN message differently depending on an application's version. For a version 3.x application, the default handling for button colors is to use the COLOR_WINDOW value for the background color and the COLOR_WINDOWTEXT value for the foreground color. For a version 4.0 or later application, Windows 95/98/Me uses the COLOR_3DFACE value for the background and the COLOR_BTNTEXT value for the foreground.

In a version 3.x application, a push button's outer top left corner is nonwhite because the button is typically drawn on a white background. If the border was white, the background would appear to bleed into the button. In a version 4.0 or later application, a push button's outer top left corner is white (COLOR_3DHILIGHT) because the button is typically drawn on a nonwhite background (COLOR_3DFACE).


Edit Control Differences

In a version 3.x application, an edit control that is the descendant of an inactive window takes the input focus when the user clicks the control; an edit control in a version 4.0 or later application does not. Not taking the input focus prevents the situation where the user can enter text into what appears to be an inactive window.

An edit control in a version 3.x application retrieves its text and background colors by sending the WM_CTLCOLOREDIT message to its parent window. In a version 4.0 or later application, an edit control sends the WM_CTLCOLOREDIT or WM_CTLCOLORSTATIC message. The edit control sends WM_CTLCOLORSTATIC if it is disabled or read-only; otherwise, it sends WM_CTLCOLOREDIT. In addition, a disabled multiline edit control in a version 4.0 or later application uses the COLOR_GRAYTEXT value as its text color.

A multiline edit control in a version 4.0 or later application has a proportional scroll box (thumb), but a multiline edit control in a version 3.x application does not.

In a version 3.x application, the wParam parameter of the EM_REPLACESEL message is not used. In a version 4.0 or later application, the wParam parameter is a flag that specifies whether the replacement operation can be undone.


List Box Differences

In a version 4.0 or later application, a list box that is part of a combo box uses the WM_CAPTURECHANGED notification message to hide its drop-down list if it is open. For more information, see "Combo Boxes" later in this topic.

The DDL_EXCLUSIVE flag of the DlgDirList function does not have the expected result in a version 3.x application. Specifically, the flag does not exclude read-write files from the list. In a version 4.0 or later application, the DDL_EXCLUSIVE flag excludes read-write files.

If a list box in a version 3.x application has either the WS_HSCROLL or WS_VSCROLL style, the list box receives both horizontal and vertical scroll bars. Although one of the scroll bars is typically hidden, Windows 95/98/Me displays the hidden scroll bar if its scrolling range becomes greater than zero. In a version 4.0 or later application, a list box does not receive a horizontal scroll bar, unless it has the WS_HSCROLL style. Likewise, it does not receive a vertical scroll bar unless it has the WS_VSCROLL style.

When creating a list box in a version 3.x application, Windows 95/98/Me always increases the size of the list box by adding the border width to each side. This is done because Windows 95/98/Me assumes that the dimensions specified by the application or the dialog template are for the client area of the list box. Unfortunately, increasing the size in this way makes aligning a list box rather difficult. Windows 95/98/Me does not increase the size when creating a list box in a version 4.0 or later application; Windows 95/98/Me assumes that the specified size includes the borders.


Combo Box Differences

A combo box in a version 4.0 or later application passes the control color messages (WM_CTLCOLOR*) from its child components (edit control and list box) to the parent window of the combo box. In a version 3.x application, a combo box passes those messages to the DefWindowProc function.

A combo box in a version 4.0 or later application uses the WM_CAPTURECHANGED message to hide its drop-down list box if it is open. Windows 95/98/Me sends the message when another window takes the mouse capture, which typically happens when the user clicks another window. In a version 3.x application, a combo box does not use WM_CAPTURECHANGED to hide the drop-down list.

A combo box in a version 3.x application uses the WM_CTLCOLORLISTBOX message to retrieve the text and background colors. In a version 4.0 or later application, a combo box uses the WM_CTLCOLOREDIT or WM_CTLCOLORSTATIC message instead. The combo box uses WM_CTLCOLORSTATIC if it is disabled or contains a read-only selection field (in an edit control); otherwise, it uses WM_CTLCOLOREDIT.

In a version 3.x application, the background of the static text area in read-only combo boxes is filled with the system highlight color (COLOR_HILIGHT). In a version 4.0 or later application, Windows 95/98/Me fills the background of the static text area only for a combo box that is not owner drawn.

In a version 4.0 or later application, Windows 95/98/Me adds the ODS_COMBOBOXEDIT value to the itemState member of the DRAWITEMSTRUCT structure when Windows 95/98/Me sends the WM_DRAWITEM message to the parent window of an owner-drawn combo box to draw an item in the selection field. The ODS_COMBOBOXEDIT value tells the parent window that the drawing takes place in the selection field of the combo box rather than in the list box.


Menu Differences

A 16-bit version 3.x application that creates or loads a menu is considered to be the owner of the menu. However, when the application exits, the menu is "orphaned" until no 16-bit version components for Windows version 3.x remain. For 16-bit version 4.0 or later applications and all 32-bit applications, the application that creates the menu is the owner, and the menu is destroyed as soon as the application exits. Unlike graphics device interface (GDI) objects, there is no way to change the ownership of a menu.

In a version 3.x application, the Close command cannot be deleted from the System menu of an multiple document interface (MDI) child window. In a version 4.0 or later application, the Close command can be deleted.

Windows 95/98/Me increases the width of hierarchical, owner-drawn menu items in a version 3.x application. Some applications rely on this increased width and use it to include icons that simulate toolbars. In a version 4.0 or later application, Windows 95/98/Me does not automatically increase the width of hierarchical, owner-drawn menu items.

The wParam parameter of the WM_MENUSELECT message is interpreted differently depending on the subsystem version number of the application and whether the application is written for 16 or 32 bits:

  • In a 16-bit version 3.x application, the wParam parameter is the handle of the pop-up menu if the selected item activates a pop-up menu.
  • In a 16-bit version 4.0 or later application, wParam is the identifier of the menu item, regardless of whether the item activates a pop-up menu.
  • In a 32-bit application (both subsystem versions), the low-order word of wParam is the identifier of the menu item or, if the item activates a pop-up menu, the index of the pop-up menu. This high-order word contains the menu flags.


System Bitmap and Color Differences

In 16-bit version 3.x applications, purpose windows, such as dialog boxes, message boxes, and system-defined control windows, receive WM_CTLCOLOR messages when they are about to be drawn. The high-order word of the lParam parameter indicates the type of special purpose window about to be drawn (CTLCOLOR_BTN, CTLCOLOR_EDIT, and so on). By default, a special purpose window passes the WM_CTLCOLOR message to the parent or owner window (for both subsystem versions), allowing the parent or owner to set the foreground and background colors of the special purpose window. The same is true for 32-bit applications, except that the special purpose window receives one or more of the following messages instead of WM_CTLCOLOR.

WM_CTLCOLORBTN
WM_CTLCOLORDLG
WM_CTLCOLOREDIT 		WM_CTLCOLORLISTBOX
WM_CTLCOLORSCROLLBAR
WM_CTLCOLORSTATIC

In 32-bit applications, the message itself indicates the type of special purpose window about to be drawn. The lParam parameter contains the window's 32-bit handle.

Display drivers for Windows version 3.x provide the bitmaps, icons, and cursors used by previous versions of Windows. Because Windows 95/98/Me renders and scales the system bitmaps, icons, and cursors itself, its display drivers do not (and should not) contain any OBM_, OIC_, or OCR_ resources.

For a version 3.x application, the default handling of the WM_CTLCOLORSTATIC and WM_CTLCOLORDLG messages is to use the COLOR_WINDOW value for the background and the COLOR_WINDOWTEXT value for the foreground. For a version 4.0 or later application, Windows 95/98/Me uses the COLOR_3DFACE value for the background and the COLOR_WINDOWTEXT value for the foreground.

When an application calls the GetClientRect function to retrieve the client rectangle of a minimized window created by a version 3.x application, Windows 95/98/Me retrieves the old dimensions for a minimized window (0, 0, 36, 36). For a minimized window in a version 3.1 or 4.0 or later application, Windows 95/98/Me retrieves 0, 0, GetSystemMetrics(SM_CXMINIMIZED), GetSystemMetrics(SM_CYMINIMIZED). These metrics change if the user changes the title bar height or minimized window width by using Control Panel. In other words, the GetClientRect function returns the dimensions of the entire minimized window, preventing an application from causing a general protection (GP) fault because of an unexpectedly empty client rectangle.


System Metrics Differences

When a version 3.x application calls the GetSystemMetrics function to retrieve the SM_CYVSCROLL or SM_CYHSCROLL metric value, the function returns a value that is one pixel more than the actual height of the corresponding type of standard scroll bar. Windows 95/98/Me adds a pixel because applications written for previous versions of windows routinely subtract one pixel from the return value. Subtracting one pixel accounts for the way a standard scroll bar in a version 3.x application overlaps the border of the window in which it resides. A version 4.0 or later application receives the actual height of the scroll bar.

When a version 3.x application retrieves the SM_CXDLGFRAME and SM_CYDLGFRAME system metric values, GetSystemMetrics returns a value that is one pixel less that the actual frame width or height. A version 4.0 or later application receives the actual width or height.

GetSystemMetrics returns one pixel more than the actual height of a title bar when a version 3.x application requests the SM_CYCAPTION system metric value. A version 4.0 or later application receives the actual height of the title bar.

GetSystemMetrics returns one pixel less than the actual height of a menu bar when a version 3.x application requests the SM_CYMENU system metric value. A version 4.0 or later application receives the actual height of the menu bar.

When a version 3.x application calls GetSystemMetrics to retrieve the SM_CYFULLSCREEN value (height of a maximized window's client area), the function returns a value that is one pixel less than the actual height. This is because GetSystemMetrics returns one pixel more than the actual title bar height when an application retrieves the SM_CYCAPTION value. (The sum of the height of a maximized window's client area and the height of a title bar must equal the height of the working area of the screen.) A version 4.0 or later application receives the actual height of the maximized window's client area when it requests the SM_CYFULLSCREEN value.


Parameter Validation Differences

If a 32-bit version 3.x application specifies invalid class styles when calling the RegisterClass function, Windows 95/98/Me strips out the invalid bits and generates warnings in the system debugger, but allows RegisterClass to succeed anyway. If a 32-bit version 4.0 or later application passes invalid class styles to RegisterClass, the function fails.

In a version 3.x application, Windows 95/98/Me does not validate the length member of the WINDOWPLACEMENT structure that is passed to the GetWindowPlacement and SetWindowPlacement functions. The length member, however, is validated for a version 4.0 or later application; Windows 95/98/Me fails these functions if the value of length is incorrect.

Windows 95/98/Me does not validate the cbSize member of the STARTUPINFO structure specified in the CreateProcess and GetStartupInfo functions for applications written for Windows version 3.x. The cbSize member is validated, however, for version 4.0 or later applications.

In the debugging version of Windows 95, the system fills the specified buffer with zeros up to the length specified by the cbSize parameter when a version 4.0 or later application calls the LoadString function. The buffer is not filled with zeros for a version 3.x application.


Windows 95/98/Me Overviews

The following overviews are specific to Windows 95/98/Me.

  • Device I/O Control
  • Exclusive Volume Locking
  • FAT32 File System
  • Long File Names
  • MS-DOS Extensions
  • Thunk Compiler
  • Virtual Machine Services
  • Windows 95/98/Me Service Control Manager


Device I/O Control

Microsoft® Windows® 95/98/Me includes a device input and output control (IOCTL) interface that allows applications to communicate directly with virtual device drivers. For more information, see the following topics:

  • About Device I/O Control
  • Device I/O Control Reference


About Device I/O Control

Applications typically use the IOCTL interface to carry out selected Microsoft® MS-DOS® system functions, to obtain information about a device, or to carry out input and output (I/O) operations that are not available through standard Win32 functions.

The following topics describe the device IOCTL interface, explain how to use the interface in applications, and describe how to implement the interface in virtual devices (VxDs).

  • Input and Output Control in Applications
  • Asynchronous Operations and VxDs
  • Using VWIN32 to Carry Out MS-DOS Functions
  • Supporting Input-Output Control in VxDs
  • Device I/O Control Reference

For information about the device IOCTL interface for other operating systems that support the Win32 API, see Device Input and Output.


Input and Output Control in Applications

You use the device IOCTL interface in an application to carry out "low-level" operations that are not supported by the Win32 API and that require direct communication with a VxD. Windows 95/98/Me implements the interface through the DeviceIoControl function, which sends commands and accompanying data directly to the given VxD. To use the interface, you open the VxD by using the CreateFile function, send commands to the VxD by using DeviceIoControl, and finally close the VxD by using the CloseHandle function.

For more information, see the following topics:

  • Opening the VxD
  • Sending Commands
  • Closing a VxD


Opening the VxD

You can open a static or dynamically loadable VxD by specifying the module name, filename, or registry entry identifying the VxD in a call to the CreateFile function. If the VxD exists and it supports the device IOCTL interface, the function returns a device handle that you can use in subsequent calls to the DeviceIoControl function. Otherwise, the function fails and sets the last error value to ERROR_NOT_SUPPORTED or ERROR_FILE_NOT_FOUND. You can use the GetLastError function to retrieve the error value.

When you open a VxD, you must specify a name having the following form.

\\.\VxdName

VxDName can be the module name of the VxD, the name of the VxD file, or the name of a registry entry that specifies the filename.

CreateFile checks for a filename extension to determine whether VxDName specifies a file. If a filename extension (such as .VXD) is present, the function looks for the file in the standard search path. In the following example, CreateFile looks for the SAMPLE.VXD file in the standard search path.

HANDLE hDevice;

hDevice = CreateFile("\\\\.\\SAMPLE.VXD", 0, 0, NULL, 0,
    FILE_FLAG_DELETE_ON_CLOSE, NULL);
If VxDName has no filename extension, CreateFile checks the registry to see if the name is also a value name under the KnownVxDs key in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager. If it is a value name, CreateFile uses the current value associated with the name as the full path of the VxD file. This method is useful for specifying VxDs that are not in the standard search path. In the following example, CreateFile searches the registry for the MYVXDPATH value.
hDevice = CreateFile("\\\\.\\MYVXDPATH", 0, 0, NULL, 0,
    FILE_FLAG_DELETE_ON_CLOSE, NULL);
If VxDName has no filename extension and is not in the registry, CreateFile assumes that the name is a VxD module name and searches the internally maintained device descriptor blocks for an already loaded VxD having the given name. In the following example, CreateFile opens the standard VxD named VWIN32.VXD.
hDevice = CreateFile("\\\\.\\VWIN32", 0, 0, NULL, 0,
    0, NULL);
In all cases, if CreateFile cannot find or load the VxD, it sets the last error value to ERROR_FILE_NOT_FOUND. If the function loads the VxD but the VxD does not support the device IOCTL interface, CreateFile sets the last error value to ERROR_NOT_SUPPORTED.

You can open the same VxD any number of times. CreateFile provides a unique handle each time you open a VxD, but it makes sure that no more than one copy of the VxD is loaded into memory. To ensure that the system removes the VxD from memory when you close the last instance of the VxD, use the FILE_FLAG_DELETE_ON_CLOSE value when opening dynamically loadable VxDs. Static VxDs cannot be removed from memory.

Although CreateFile has several parameters, only the lpName and fdwAttrsAndFlags parameters are useful when opening an VxD. fdwAttrsAndFlags can be zero, the FILE_FLAG_DELETE_ON_CLOSE value, or the FILE_FLAG_OVERLAPPED value. FILE_FLAG_OVERLAPPED is used for asynchronous operation and is described later in this article.


Sending Commands

You use DeviceIoControl to send commands to a VxD. You must specify the previously opened device handle, control code, and input and output parameters for the call. The device handle identifies the VxD, and the control code specifies an action for the VxD to perform. In the following example, the DIOC_GETVERSION control code directs the given VxD to return version information.

HANDLE hDevice
BYTE bOutput[4];
DWORD cb;

fResult = DeviceIoControl(
    hDevice,          // device handle
    DIOC_GETVERSION,  // control code
    NULL, 0,          // input parameters
    bOutput, 4, &cb,  // output parameters
    0);
The input and output parameters of DeviceIoControl include the addresses and sizes of any buffers needed to pass data into or out of the VxD. Whether you use these parameters depends on how the VxD processes the control code. You supply an input buffer if the VxD requires that you pass it data for processing, and you supply an output buffer if the VxD returns the results of processing. In the previous example, only the output parameters are supplied. These include the address of the output buffer; the size, in bytes, of the buffer; and the address of the variable to receive the count of bytes actually copied to the buffer by the VxD.

Although the Win32 header files define a set of standard control codes, Windows 95/98/Me does not support these standard codes. Instead, the meaning and value of control codes in Windows 95/98/Me are specific to each VxD. Different VxDs may support different control codes.

Some VxDs support the DIOC_GETVERSION control code, which directs the VxD to return version information in the output buffer. Although the version information can have any format that helps the application determine the version of the VxD, keeping the information to 4 bytes or less is recommended. The VxD returns the version information only if you supply a buffer and specify a nonzero size for the buffer.

If you opened the VxD using the FILE_FLAG_OVERLAPPED value, you must also provide an OVERLAPPED structure when calling DeviceIoControl. This structure contains information that the VxD uses to process the control code asynchronously.


Closing a VxD

When you have finished using a VxD, you can close the associated device handle by using the CloseHandle function, or you can let the operating system close the handle when the application terminates. The following example closes a VxD.

CloseHandle(hDevice);

Closing a VxD does not necessarily remove the VxD from memory. If you open a dynamically loadable VxD using the FILE_FLAG_DELETE_ON_CLOSE value, CloseHandle also removes the VxD if no other valid handles are present in the system. The system maintains a reference count for dynamically loadable VxDs, incrementing the count each time the VxD is opened and decrementing when the VxD is closed. CloseHandle checks this count and removes the VxD from memory when the count reaches zero. The system does not keep a reference count for static VxDs; it does not remove these VxDs when their corresponding handles are closed.

In rare cases, you may need to use the DeleteFile function to remove a dynamically loadable VxD from memory. For example, you use DeleteFile if another application has loaded the VxD and you just want to unload it. You also use DeleteFile if you have successfully loaded a VxD by using CreateFile, but the VxD does not support the device IOCTL interface. In such cases, CreateFile loads the VxD but provides no handle to close and remove the VxD. The following example removes the VxD named SAMPLE from memory.

DeleteFile("\\\\.\\SAMPLE");

In this example, SAMPLE is the module name of the VxD. (Do not specify the filename.) Be aware that the module name of a VxD is not necessarily the same as the VxD's filename without a filename extension. In general, avoid using DeleteFile to remove a VxD from memory.


Asynchronous Operations and VxDs

You can direct a VxD to process a control code asynchronously. In an asynchronous operation, the DeviceIoControl function returns immediately, regardless of whether the VxD has finished processing the control code. Asynchronous operation allows an application to continue while the VxD processes the control code in the background. You request an asynchronous operation by specifying the address of an OVERLAPPED structure in the DeviceIoControl function. The hDevice member of OVERLAPPED specifies the handle of an event that the system sets to the signaled state when the VxD has completed the operation.

Asynchronous (overlapped) operations are useful for lengthy operations, such as formatting a disk. To perform an asynchronous operation, you must specify the FILE_FLAG_OVERLAPPED value when calling CreateFile to obtain a device handle. When calling DeviceIoControl, you must specify the address of an OVERLAPPED structure in the lpOverlapped parameter and the handle of a manual reset event in the hEvent member of the structure. The system ignores all other members.

If DeviceIoControl completes the operation before returning, it returns TRUE; otherwise, it returns FALSE. When the operation is finished, the system signals the manual reset event. You should call GetOverlappedResult when the thread that called DeviceIoControl needs to wait (that is, stop executing) until the operation has finished.


Using VWIN32 to Carry Out MS-DOS Functions

Windows 95/98/Me provides a VxD named VWIN32.VXD that supports a set of control codes that Win32-based applications can use to carry out selected MS-DOS system functions. These system-defined control codes consist of the following values.

Control code (value) | Meaning
VWIN32_DIOC_DOS_DRIVEINFO (6) | Performs Interrupt 21h Function 730X commands. This value is supported in Windows 95 OEM Service Release 2 and later.
VWIN32_DIOC_DOS_INT13 (4) | Performs Interrupt 13h commands
VWIN32_DIOC_DOS_INT25 (2) | Performs the Absolute Disk Read command (Interrupt 25h)
VWIN32_DIOC_DOS_INT26 (3) | Performs the Absolute Disk Write command (Interrupt 25h)
VWIN32_DIOC_DOS_IOCTL (1) | Performs the specified MS-DOS device I/O control function (Interrupt 21h Function 4400h through 4411h)

When an application calls the DeviceIoControl function with the dwIoControlCode parameter set to one of the predefined control codes, the lpvInBuffer and lpvOutBuffer parameters must specify the addresses of DIOC_REGISTERS structures. The DIOC_REGISTERS structure specified by lpvInBuffer contains a set of register values that specify a command for the VxD to execute and any data that the VxD needs to execute the command. After completing the command, the VxD fills the DIOC_REGISTERS structure specified by lpvOutBuffer with the register values that resulted from executing the command. The meaning of the register values depends on the specified command. Many of the MS-DOS and BIOS functions require segment:offset register pairs for pointers. However, because 32-bit code does not have segments, the DIOC_REGISTERS structure does not contain members for segment registers. Place the full pointer that would go into a real-mode segment:offset register pair into the structure member that corresponds to the offset of the register pair. For example, use the reg_EDI member for the pointer that would go into the ES:DI registers. When an application uses the DeviceIoControl function to send commands to a VxD other than VWIN32.VXD, the meaning of the function's parameters are defined by the VxD. The system does not validate the parameters. The system VxD, VWIN32.VXD, supports the IOCTL functions originally provided by MS-DOS Interrupt 21h. The following example shows how to call Get Media ID (Interrupt 21h Function 440Dh Minor Code 66h) from a Win32-based application.

#define VWIN32_DIOC_DOS_IOCTL 1

typedef struct _DIOC_REGISTERS {
    DWORD reg_EBX;
    DWORD reg_EDX;
    DWORD reg_ECX;
    DWORD reg_EAX;
    DWORD reg_EDI;
    DWORD reg_ESI;
    DWORD reg_Flags;
} DIOC_REGISTERS, *PDIOC_REGISTERS;

// Important: All MS_DOS data structures must be packed on a
// one-byte boundary.

#pragma pack(1)
typedef struct _MID {
    WORD  midInfoLevel;
    DWORD midSerialNum;
    BYTE  midVolLabel[11];
    BYTE  midFileSysType[8];
} MID, *PMID;
#pragma pack()

HANDLE hDevice;
DIOC_REGISTERS reg;
MID mid;
BOOL fResult;
DWORD cb;
int nDrive = 3;  // Drive C:

hDevice = CreateFile("\\\\.\\vwin32",
    0, 0, NULL, 0, FILE_FLAG_DELETE_ON_CLOSE, NULL);

reg.reg_EAX = 0x440D;       // IOCTL for block devices
reg.reg_EBX = nDrive;       // zero-based drive identifier
reg.reg_ECX = 0x4866;       // Get Media ID command
reg.reg_EDX = (DWORD) &mid; // receives media identifier information
reg.reg_Flags = 0x0001;     // assume error (carry flag is set)

fResult = DeviceIoControl(hDevice,
    VWIN32_DIOC_DOS_IOCTL,
    &reg, sizeof(reg),
    &reg, sizeof(reg),
    &cb, 0);

if (!fResult || (reg.reg_Flags & 0x0001))
    ; // error if carry flag is set

CloseHandle(hDevice);


Supporting Input-Output Control in VxDs

A VxD can support the device IOCTL interface by processing the W32_DEVICEIOCONTROL message in the VxD's control procedure. You can take advantage of the device IOCTL interface by providing a VxD that performs privileged (ring 0) operations for your application. For more information, see the following topics:

  • Loading and Opening the VxD
  • Processing Control Codes
  • Checking for Asynchronous Operations


Loading and Opening the VxD

When your application calls CreateFile, the system sends the W32_DEVICEIOCONTROL message to the control procedure of the specified VxD to determine if it supports the device IOCTL interface. The ESI register contains the address of a DIOCParams structure whose dwIoControlCode member specifies the DIOC_GETVERSION control code. A VxD that supports the device IOCTL interface must respond to the DIOC_GETVERSION control code by clearing the EAX register. (A VxD can also return version information in the buffer pointed to by the lpvOutBuffer member so long as the cbOutBuffer member is nonzero. If cbOutBuffer is zero, the calling application is not interested in version information, but the VxD must still return zero to indicate success.) If the VxD does not support the device IOCTL interface, it must place a nonzero value in EAX.

For dynamically loadable VxDs, the system sends a SYS_DYNAMIC_INIT control message to the VxD the first time that it is opened. If the VxD returns success, the system sends the W32_DEVICEIOCONTROL message with the DIOC_OPEN (identical in value to the DIOC_GETVERSION control code) control code. The VxD must return zero to inform the calling application that it supports W32_DEVICEIOCONTROL. The system sets the reference count for the VxD to 1. On every subsequent call to CreateFile for the VxD, the VxD receives the W32_DEVICEIOCONTROL message with the DIOC_OPEN control code and the reference count for the VxD is incremented.

The VxD receives a W32_DEVICEIOCONTROL message with the DIOC_CLOSEHANDLE control code if the application closes the device handle by calling the CloseHandle function, or if the operating system closes the handle when the application terminates (or DeleteFile if the VxD was not opened with the FILE_FLAG_DELETE_ON_CLOSE value). The VxD can use this notification to perform cleanup operations and release structures associated with the application. The reference count for the VxD is decremented before the message is sent. If the reference count is decremented to zero, the VxD receives the SYS_DYNAMIC_EXIT message and is subsequently unloaded.


Processing Control Codes

When an application calls DeviceIoControl, the system calls the control procedure of the VxD identified by the given device handle. The EAX register contains the W32_DEVICEIOCONTROL message, and the ESI register contains the address of a DIOCParams structure. The structure contains all of the parameters that the application specified in the DeviceIoControl function as well as additional information. The VxD should examine the dwIoControlCode member of the DIOCParams structure to determine the action to perform. The lpvInBuffer member contains supporting data that the VxD needs to complete the action. After processing the control code, the VxD should copy any information that it needs to return to the application to the buffer specified by the lpvOutBuffer member.

If the VxD successfully processes the control code, it should clear the EAX register before returning. Otherwise, the VxD should set EAX to a nonzero value.


Checking for Asynchronous Operations

A VxD can determine whether an application has requested an asynchronous operation by checking the lpoOverlapped member of the DIOCParams structure. If lpoOverlapped specifies the address of an OVERLAPPED structure, the application has requested an asynchronous operation. In that case, the VxD should return – 1 in the EAX register and then process the specified control code.

The operating system does not take any steps to make the application's memory available to the VxD at all times (in all contexts) for asynchronous operations. When implementing asynchronous operations, the VxD must use the appropriate virtual machine manager (VMM) services, such as LinPageLock with the PAGEMAPGLOBAL value, to make the application's memory pages available across contexts, including access to the OVERLAPPED structure.

When the VxD finishes processing the control code, it must notify the application by calling the VWIN32_DIOCCompletionRoutine service provided by VWIN32.VXD. The EBX register must contain the value of the Internal member of the OVERLAPPED structure. This member is reserved for operating system use only. Also, if the VxD copies any data to the buffer specified by the lpvOutBuffer member of the DIOCParams structure, the VxD must specify the count of bytes copied to the buffer in the InternalHigh member of OVERLAPPED. The remaining members of OVERLAPPED, Offset and OffsetHigh, can be used for developer-defined data.

Essentially, the VWIN32_DIOCCompletionRoutine service helps signal the event identified by the hEvent member of the OVERLAPPED structure. The application monitors the event to determine when the asynchronous operation is completed.


Device I/O Control Reference

The following elements are associated with the device IOCTL interface.

  • Device I/O Control Structures
  • Device I/O Control System Messages
  • Device I/O Control Services


Device I/O Control Structures

These structures are used with device I/O control functions.

DIOC_REGISTERS

DIOCParams


Device I/O Control System Messages

The following system message is used to implement the device I/O control interface of a VxD.

W32_DEVICEIOCONTROL


Device I/O Control Services

The following service is used with device I/O control.

VWIN32_DIOCCompletionRoutine


Exclusive Volume Locking

The following topics describe exclusive volume locking and provides guidelines for applications that carry out direct access on volumes while running with Microsoft® Windows® 95/98/Me:

  • About Exclusive Volume Locking
  • Exclusive Volume Locking Reference


About Exclusive Volume Locking

Disk utilities and other applications that directly modify file system structures, such as directory entries, must request exclusive volume locking (that is, exclusive use of the volume) before making modifications to the structures. Exclusive use prevents applications from inadvertently changing the file system while a disk utility is trying modify it and ensures that the information on a volume represents the current state of the volume.

  • Direct Access
  • Exclusive Use Lock
  • Level 0 Lock
  • Locking Hierarchy
  • Swap File
  • Lock Requests and Virtual Devices
  • Volume-Locking Guidelines
  • Special Considerations for 32-bit Windows-Based Applications
  • Special Considerations for 16-bit Windows-Based Applications
  • Special Considerations for MS-DOS-Based Applications


Direct Access

Applications typically use direct access to make changes to the directory entries, paths, and allocation chains in the file allocation table (FAT) of a given volume. The applications access this information by using the Interrupt 13h functions, Absolute Disk Read and Write (Interrupts 25h and 26h), or the Interrupt 21h read, write, and format track IOCTL functions. Some applications may also access the volume using the disk controller input and output (I/O) ports.

As a multitasking operating system, Windows 95/98/Me permits any number of applications to access a volume at a given time. Applications that change the file system structures of a volume without regard to other applications risk corruption of that information and subsequent data loss. To prevent data loss, the system manages all requests for direct access. With the exception of floppy disk drives, Windows 95/98/Me does not permit direct write operations, unless the volume has been locked by the application. The system returns the ERROR_WRITE_PROTECT error value to functions or interrupts that attempt direct write operations when the volume has not been locked. An application can read directly from a volume, but the system may satisfy the request by reading from internal caches rather than from the medium itself. An application cannot access disk controller I/O ports; the system traps all access.

An application can override the default behavior of the system by requesting exclusive use of the volume using the lock and unlock volume IOCTL functions. An application that has exclusive use of a volume can read and write directly to the medium, and because the system flushes internal caches to the medium, the information there reflects the actual state of the volume. Locking a volume (including the floppy disk drives) ensures consistency of data, because other processes cannot update information about the volume while it is locked.


Exclusive Use Lock

To request exclusive use of a volume, an application use either Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah) or Lock Physical Volume (Interrupt 21h Function 440Dh Minor Code 4Bh). Before issuing an Interrupt 13h function, an application must acquire a physical volume lock. An application that only modifies logical volumes should acquire a logical volume lock. The calling interface for both locks is the same except for how the volume to lock is specified; the physical lock requires an Interrupt 13h device unit number, but the logical lock requires a logical drive number. When an application obtains a lock on a physical drive, the system acquires a logical volume lock for each logical volume on the physical drive. Obtaining a lock on a logical volume that is the parent (or host) drive also locks the child drives. For example, a compressed volume is locked when its host drive is locked.

The application that owns the lock can carry out direct disk write operations. Only one application at a time can lock the volume. If an application already owns the volume lock, the system fails subsequent calls to lock the volume.

The volume-locking functions allow the lock owner to control the kind of access that other processes have to the volume. There are three categories of access: read operations, which include opening a file as well as reading from a file; write operations, which include deleting and renaming a file as well as writing to a file; and new file mappings.

When an application calls either of the lock volume functions, it specifies a lock level and, depending on the level, passes in additional information known as permissions. The lock level and permissions specify what kind of operations the system allows processes other than the lock owner to do on the volume while it is locked.

When another process attempts to access the volume, the file system will fail the operation and return the ERROR_WRITE_PROTECT error value or it will block the operation, depending on the lock level and permissions. The system queues a blocked operation and puts the process requesting the operation to sleep until the lock is released and the operation can be performed.

When an application has completed its work, it must unlock the volume. Depending on whether it acquired a logical or physical lock, the application unlocks the volume by calling either Unlock Logical Volume (Interrupt 21h Function 440Dh Minor Code 6Ah) or Unlock Physical Volume (Interrupt 21h Function 440Dh Minor Code 6Bh). Unlocking the volume lets the system perform any blocked operations (in the order that they occurred) and resume normal activity. If an application exits without releasing the lock, the system automatically releases it.

If an application has a lock and the user attempts to close the virtual machine in which the application is running, the system displays a message warning the user that closing the virtual machine could result in damage to the volume. If the user confirms the closing, the system releases the lock and closes the virtual machine.

An application can lock volumes on local drives, but not on network drives or on drives that are not managed by the I/O supervisor, a virtual device driver. Also, the lock and unlock volume IOCTL functions are not available in previous versions of Microsoft® MS-DOS®. If the functions are used with a previous version, they return an error value.

Windows 95/98/Me provides 4 levels of exclusive volume locks. The level 0 lock is used alone, and lock levels 1, 2, and 3 form a hierarchy that increasingly restricts access to the file system based on the permissions set when the application obtains the level 1 lock. Although the level 0 lock is not part of the locking hierarchy formed by lock levels 1, 2, and 3, it has a more restrictive sublevel for applications that format volumes. Applications should perform direct disk write operations only in either a level 0 or 3 lock.


Level 0 Lock

The level 0 lock cannot be obtained on volumes that have any open files or handles. This restriction includes handles returned by the Windows FindFirstFile and FindFirstChangeNotification functions. Because the system always has open files, an application cannot take a level 0 lock on the drive that contains the Windows 95/98/Me system files. The locking hierarchy can be used on volumes with open files and handles. If the system fails a level 0 lock request because of open files, an application can obtain a list of all the open files on the volume by calling Enumerate Open Files (Interrupt 21h Function 440Dh Minor Code 6Dh).

Before returning from the call to lock the volume, Windows 95/98/Me flushes to disk all data from the file system cache. To ensure that the disk and file system remain in a consistent state, the system puts the cache into write-through mode so that it can immediately commit to disk all data from file write operations. If an application has obtained a lock on a child volume, the system does not automatically flush the file system cache after a write operation to the parent volume. To ensure that the cache is flushed when opening files with Open or Create File (Interrupt 21h Function 716Ch), an application should specify the OPEN_FLAGS_NO_BUFFERING (0100h) value. If a file has not been opened with OPEN_FLAGS_NO_BUFFERING or Absolute Disk Write (Interrupt 26h) has been used to write to the parent volume, an application should call Reset Drive (Interrupt 21h Function 710Dh) to flush the cache.

After a process obtains a level 0 lock, the system only allows the lock owner to have access to the volume. The system fails all read operations, write operations, and new file mappings by other processes until the lock owner releases the lock. An application should use a level 0 lock whenever possible, because it guarantees that no other process can access the locked volume.

An application that formats volumes must obtain a more restrictive mode of the level 0 lock. To format a volume, the application should follow these steps:

  1. Call the lock volume function to obtain a level 0 lock.
  2. Do any needed file system I/O that uses the Interrupt 21h file handle I/O functions while in the level 0 lock.
  3. Call the lock volume function a second time to obtain the more restrictive level 0 lock for formatting. When calling the lock volume function the second time, an application should specify 0 as the lock level and specify 4 in the permissions. The application, however, must already own the level 0 lock to obtain this lock.
  4. Format the disk using the Interrupt 21h IOCTL functions (such as Read/Write/Format/Verify Track on Logical Drive or Get/Set Device Parameters). Interrupt 13h will work too, but it is not the preferred method for performance reasons. The system allows direct disk I/O, but it fails all other file system I/O that uses the Interrupt 21h file handle I/O functions while the restrictive level 0 lock is in effect.
  5. Release the level 0 lock for formatting. An application is still in a level 0 lock at this point. Before the application releases this lock, the disk must be in a state that would be recognizable as normal FAT media. Otherwise, the functions mentioned in step 6 will not work.
  6. Resume normal file system I/O using the Interrupt 21h file handle I/O functions.
  7. Release the level 0 lock.


Locking Hierarchy

The locking hierarchy allows an application to obtain a lock in preparation for modifying the file system and yet allows other processes access to the drive. In this way, other processes are only denied access to the volume when absolutely necessary.

An application should perform direct disk write operations only within a level 3 lock. To obtain a level 3 lock, an application must make three calls to the lock volume function — first to obtain a level 1 lock, then a level 2 lock, and finally a level 3 lock. After obtaining the level 3 lock, the application can safely access the volume directly.

To release the lock on a volume, an application must call the appropriate unlock volume function the same number of times that the corresponding lock volume function was called. Each call to the unlock volume function decrements the lock level. For example, a level 3 lock returns to a level 2 lock, and the system processes any blocked read operations. A level 2 lock returns to a level 1 lock, and the system processes any blocked write operations or new file mappings. A call to the unlock volume function on a level 1 lock, however, releases the lock on the volume and allows other processes to obtain the lock.

Exclusive volume locks are owned by a process, not a thread. If necessary, a multithreaded application can obtain a level 1 lock in one thread, a level 2 lock in another, and a level 3 lock in yet another.

Even though the system may block or fail new file mappings, other processes are allowed to write to files through existing file mappings, because file mappings cannot be resized. Writing to an existing file mapping only changes the contents of the memory-mapped file, it does not cause changes to the file system.

For more information, see Using the Locking Hierarchy.


Level 1

The level 1 lock acts as a sentinel to guarantee that only one application may obtain the level 2 and 3 locks. An application specifies permissions only when requesting the level 1 lock. The lock level and permissions determine the kind of access that processes other than the lock owner have to the volume while it is locked. Bit 0 of the Permissions parameter for the lock volume function determines if the system allows or fails write operations by other processes. Bit 1 of Permissions determines if the system allows or fails new file mappings by other processes. Bit 2 of Permissions is only used when obtaining the restrictive level 0 lock for formatting and is ignored for a level 1 lock. The following table shows which operations are allowed at each lock level based on the permissions set on the level 1 lock.

Permissions | Level 1 | Level 2 | Level 3
Bit 0 = 0 Bit 1 = 0 | Write operations are failed. New file mappings are allowed. Read operations are allowed. | Write operations are failed. New file mappings are allowed. Read operations are allowed. | Write operations are failed. New file mappings are blocked. Read operations are blocked.
Bit 0 = 0 Bit 1 = 1 | Write operations are failed. New file mappings are failed. Read operations are allowed. | Write operations are failed. New file mappings are failed. Read operations are allowed. | Write operations are failed. New file mappings are failed. Read operations are blocked.
Bit 0 = 1 Bit 1 = 0 | Write operations are allowed. New file mappings are allowed. Read operations are allowed. | Write operations are blocked. New file mappings are allowed. Read operations are allowed. | Write operations are blocked. New file mappings are blocked. Read operations are blocked.
Bit 0 = 1 Bit 1 = 1 | Write operations are allowed. New file mappings are failed. Read operations are allowed. | Write operations are blocked. New file mappings are failed. Read operations are allowed. | Write operations are blocked. New file mappings are failed. Read operations are blocked.

Calling an unlock physical or logical volume function on a level 1 lock completely releases the lock on the volume.


Level 2

The level 2 lock prevents all processes except the lock owner from writing to the disk, but the lock allows any application to read from it. Depending on the permissions set when the application obtained the level 1 lock, the system will either block or fail write operations and either allow or fail new file mappings. Before obtaining a level 3 lock, an application should call Get Lock Flag State (Interrupt 21h Function 440Dh Minor Code 6Ch) to determine if anything on the disk has changed, such as the swap file growing or shrinking. Calling Get Lock Flag State at this point is an optimization that is done to avoid obtaining the level 3 lock unnecessarily.

Calling an unlock physical or logical volume function on a level 2 lock decrements the lock level to 1 and causes the system to perform previously blocked operations that are allowed at the lower lock level.


Level 3

The level 3 lock prevents all processes except the lock owner from reading or writing to the disk. Read operations are blocked, and write operations and new file mappings are either blocked or failed depending on the permissions set in the level 1 lock. This is the most restrictive lock, not only because it prevents all other processes from accessing the disk but also because the lock owner is limited in what it can do.

Because read operations are blocked in the level 3 lock, an application must not execute any user interface or screen update functions, spawn applications, load dynamic-link libraries (DLLs), or yield to avoid deadlock. For example, if an application yields to a process with a discardable segment that the system has discarded, the system cannot reload the discarded segment because the process cannot read from the disk. This situation results in deadlock. Whenever a process obtains a level 3 lock, it should keep the lock for as short a period as possible to avoid severely degrading system performance. The purpose of the level 3 lock is to write changes to disk, so processes should only call disk I/O functions inside the lock.

After a level 3 lock is obtained, the file system takes several steps to allow a process to write directly to the disk. First, the system flushes all file system buffers and caches. Next, it puts the cache into write-through mode so that changes will be written to disk immediately. Finally, all open files are closed at the file system driver (FSD) level, which is invisible to all processes. While an application is in a level 3 lock, the system does not permit the swap file to grow or shrink, but it can still be read from or written to.

If an application has obtained a lock on a child volume, the system does not automatically flush the file system cache after a write operation to the parent volume. To ensure that the cache is flushed when Open or Create File (Interrupt 21h Function 716Ch) is used, the application should specify the OPEN_FLAGS_NO_BUFFERING (0100h) value. If the file has not been opened with OPEN_FLAGS_NO_BUFFERING or Absolute Disk Write (Interrupt 26h) has been used to write to the parent volume, the application should call Reset Drive (Interrupt 21h Function 710Dh) to flush the cache.

Before releasing the level 3 lock, the process is responsible for putting the file system into a state consistent with what existed before the lock was obtained. The process must be careful to correctly update all file system data, such as the FAT or directory entries. If a file was opened, it must not be deleted, renamed, or moved to a different volume. Otherwise, the system can become very unstable. An application should use Enumerate Open Files (Interrupt 21h Function 440Dh Minor Code 6Dh) to obtain a list of all open files on the volume.

When the level 3 lock is released, the system unblocks all pending read operations, reopens closed files on demand, and puts the cache back into write-behind mode. The lock owner returns to a level 2 lock.


Using the Locking Hierarchy

An application should obtain a level 1 lock before beginning an operation, such as a complete defragmentation or compression. The application should release the level 1 lock only after the entire operation is finished. This approach prevents other processes from obtaining a lock on the same disk, which would keep the lock owner from finishing its work.

To minimize the time spent in the level 3 lock, a process should remain in the level 2 lock to perform certain tasks, such as computing disk statistics and preparing data packets to be written before actually writing them in the level 3 lock. As soon as a process enters the level 3 lock, the application must call Get Lock Flag State (Interrupt 21h Function 440Dh Minor Code 6Ch) to determine if anything on the disk has changed, such as the swap file growing or shrinking. If a change has occurred, the process should release the level 3 lock, return to the level 2 lock to recompute any needed information, and then obtain the level 3 lock again. If Get Lock Flag State shows that the disk has not changed, the process should do its writing and then release the level 3 lock.


Swap File

The system pager requires access to the swap file at all times, even when an application has locked the volume containing the file. To ensure access, the system always gives the system pager the opportunity to accept or reject a lock request.

If the system grants a lock to a process, the requesting process must ensure that data for the swap file remains unchanged and that the pager can safely read from or write to the swap file at any time. In particular, the process must not change the allocation chain of the swap file, and if it moves the swap file's directory entry, it must ensure that the path to it is always consistent. Failure to observe these guidelines can result in a system crash.

An application can determine the directory entry and allocation chain of the swap file by retrieving the path of the file using Find Swap File (Interrupt 21h Function 440Dh Minor Code 6Eh).

The system permits the swap file to grow or shrink in the level 1 and 2 locks. Because of this, an application should call Get Lock Flag State (Interrupt 21h Function 440Dh Minor Code 6Ch) after obtaining a level 3 lock to determine if anything on the disk has changed as the result of the swap file growing or shrinking.


Lock Requests and Virtual Devices

The system broadcasts a message to all virtual devices (VxDs) when an application makes a request for a lock. Any VxD that uses virtual block device and I/O supervisor services to carry out direct I/O on the given volume must check for this message and either accept or reject the request when the message is received.

If the VxD rejects the request, it must return the appropriate error value. In such cases, the system does not grant the lock to the requesting application. If a VxD accepts the request, it must avoid all operations that may affect the consistency of the volume for the duration of the lock.

When the application releases the lock, the system again issues a broadcast message. The VxD can resume normal operation at this point.


Volume-Locking Guidelines

Applications that lock and modify volumes should follow these guidelines to avoid degrading system performance and to prevent data loss:

  • If there are no open files on the volume, applications should perform direct disk writes in a level 0 lock. Otherwise, they should use the locking hierarchy and perform disk write operations in a level 3 lock.
  • Applications should utilize the locking hierarchy to minimize the time spent in a level 3 lock. They should only call disk I/O functions inside a level 3 lock and drop down to a level 1 or 2 lock whenever possible.
  • Applications should neither terminate or relinquish control nor leave a level 0 or 3 lock if the volume information is incomplete or invalid. When applications leave one of these locks, the file system must be consistent with what it was when they entered the lock because other applications will regain access to the drive.
  • Because the Interrupt 21h file handle I/O functions rely on accurate information about the volume, applications should not use these functions when the volume information is incomplete or invalid.
  • Applications should not move the swap file.
  • Applications should not move memory-mapped files opened for write access. Read-only memory-mapped files may be moved cluster by cluster.
  • Applications may only move 32-bit Windows-based DLLs and executables cluster by cluster.
  • Applications may move directory entries for the swap file and open memory-mapped files, but the path to them must always be consistent, even in a level 3 lock.

Because read operations are blocked in the level 3 lock, all applications written for 16-bit Windows, 32-bit Windows, or MS-DOS should follow these guidelines to avoid deadlock while in a level 3 lock:

  • Applications should only access the disk by using the low-level disk functions (Interrupt 13h, Interrupt 25h, and Interrupt 26h) or the Interrupt 21h file handle read, write, seek, and IOCTL functions. Other MS-DOS functions are not guaranteed to work. Windows or C run-time library file I/O functions should not be used, because these functions may contain code or call code that is not safe to execute inside the level 3 lock.
  • Applications should not yield control, update the screen, execute any user-interface code, or do anything else that could cause Windows 95/98/Me to load a new or previously discarded segment, such as by spawning an application or loading a DLL.
  • Windows-based applications must have all the code for a level 3 lock contained within the processing for a single message. The application should not process other messages or call any Windows functions.


Special Considerations for 32-bit Windows-Based Applications

32-bit Windows-based applications must call the exclusive volume-locking IOCTL functions indirectly by opening VWIN32.VXD and using its DeviceIoControl interface.

In response, VWIN32.VXD issues the low-level disk I/O functions (Interrupt 13h, Interrupt 25h, and Interrupt 26h) as well as the MS-DOS Interrupt 21h file handle read, write, seek, and IOCTL functions in the context of the calling process.

32-bit Windows-based applications may safely call the Windows ReadFile, WriteFile, SetFilePointer, and DeviceIoControl functions within a level 3 lock. Other Windows or C run-time library functions should not be used while in the level 3 lock, because these functions may call other functions that are not safe inside a level 3 lock.


Special Considerations for 16-bit Windows-Based Applications

16-bit Windows-based applications may call the exclusive volume-locking IOCTL functions directly using the Interrupt 21h interface, which is described in the reference material. These applications must mark all of the code, data, and resource segments that will be accessed while inside the level 2 and 3 locks as PRELOAD NONDISCARDABLE in the module-definition (.DEF) file. This marking prevents deadlock in case the system needs to load one of the application's segments from the executable file inside a level 3 lock.


Special Considerations for MS- DOS - Based Applications

Platform SDK: Win32 API

Special Considerations for MS- DOS – Based Applications

MS-DOS – based applications may directly call the volume-locking IOCTL functions by using Interrupt 21h, as described in the reference material.

When a windowed MS-DOS – based application obtains a level 3 lock, the system forces it to full screen mode to avoid deadlock with the display driver. When the application releases the level 3 lock, it remains in full screen mode.

Applications must not call the Advanced SCSI Programming Interface (ASPI) functions inside a level 3 lock. These functions bypass the file system, leaving it in an inconsistent state.

When MS-DOS – based applications run in single MS-DOS application mode (real mode), they may issue the volume-locking IOCTL functions and the functions will succeed. However, because there is no multitasking, there is only one lock rather than a hierarchy as when Windows 95/98/Me is running. The volume-locking IOCTL functions will fail on down-level versions of MS-DOS.


Exclusive Volume Locking Reference

The following functions can be used to manage exclusive volume locking.

Function | Description
Interrupt 21h Function 440Dh Minor Code 4Ah | Lock Logical Volume
Interrupt 21h Function 440Dh Minor Code 4Bh | Lock Physical Volume
Interrupt 21h Function 440Dh Minor Code 6Ah | Unlock Logical Volume
Interrupt 21h Function 440Dh Minor Code 6Bh | Unlock Physical Volume
Interrupt 21h Function 440Dh Minor Code 6Ch | Get Lock Flag State
Interrupt 21h Function 440Dh Minor Code 6Dh | Enumerate Open Files
Interrupt 21h Function 440Dh Minor Code 6Eh | Find Swap File
Interrupt 21h Function 440Dh Minor Code 70h | Get Current Lock State
Interrupt 21h Function 710Dh | Reset Drive

The exclusive-volume locking IOCTL functions are similar to other MS-DOS functions. An application must copy function parameters to registers and issue an Interrupt 21h instruction to carry out the call.


FAT32 File System

FAT32 is a derivative of the File Allocation Table (FAT) file system that supports drives with over 2GB of storage. Because FAT32 drives can contain more than 65,526 clusters, smaller clusters are used than on large FAT16 drives. This method results in more efficient space allocation on the FAT32 drive.

For more information, see the following topics:

  • About the FAT32 File System
  • FAT32 File System Reference


About the FAT32 File System

The following topics describe the FAT32 file system.

  • File System Specifications
  • Boot Sector and Bootstrap Modifications
  • FAT Mirroring
  • Partition Types
  • Limitations of Some Existing Functions


File System Specifications

The largest possible file for a FAT32 drive is 4GB minus 2 bytes. Win32-based applications can open files this large without special handling. However, non-Win32 applications must use Int 21h Function 6Ch with the EXTENDED_SIZE flag.

The FAT32 file system includes four bytes per cluster within the file allocation table. This differs from the FAT16 file system, which contains 2 bytes per cluster, and the FAT12 file system, which contains 1.5 bytes per cluster within the file allocation table.

Note that the high 4 bits of the 32-bit values in the FAT32 file allocation table are reserved and are not part of the cluster number. Applications that directly read a FAT32 file allocation table must mask off these bits and preserve them when writing new values.

System | Cluster limit
FAT12 | The count of data clusters is less than 4087 clusters.
FAT16 | The count of data clusters is between 4087 and 65526 clusters, inclusive.
FAT32 | The count of data clusters is between 65526 and 268,435,456 clusters, inclusive.


Boot Sector and Bootstrap Modifications

Modifications | Description
Reserved Sectors | FAT32 drives contain more reserved sectors than FAT16 or FAT12 drives. The number of reserved sectors is usually 32, but can vary.
Boot Sector Modifications | Because a FAT32 BIOS Parameter Block (BPB), represented by the BPB structure, is larger than a standard BPB, the boot record on FAT32 drives is greater than 1 sector. In addition, there is a sector in the reserved area on FAT32 drives that contains values for the count of free clusters and the cluster number of the most recently allocated cluster. These values are members of the BIGFATBOOTFSINFO structure which is contained within this sector. These additional fields allow the system to initialize the values without having to read the entire file allocation table.
Root Directory | The root directory on a FAT32 drive is not stored in a fixed location as it is on FAT16 and FAT12 drives. On FAT32 drives, the root directory is an ordinary cluster chain. The A_BF_BPB_RootDirStrtClus member in the BPB structure contains the number of the first cluster in the root directory. This allows the root directory to grow as needed. In addition, the BPB_RootEntries member of BPB is ignored on a FAT32 drive.
Sectors Per FAT | The A_BF_BPB_SectorsPerFAT member of BPB is always zero on a FAT32 drive. Additionally, the A_BF_BPB_BigSectorsPerFat and A_BF_BPB_BigSectorsPerFatHi members of the updated BPB provide equivalent information for FAT32 media.


FAT Mirroring

On all FAT drives, there may be multiple copies of the FAT. If an error occurs reading the primary copy, the file system will attempt to read from the backup copies. On FAT16 and FAT12 drives, the first FAT is always the primary copy and any modifications will automatically be written to all copies. However, on FAT32 drives, FAT mirroring can be disabled and a FAT other than the first one can be the primary (or "active") copy of the FAT.

Mirroring is enabled by clearing bit 0x0080 in the extdpb_flags member of a FAT32 Drive Parameter Block (DPB) structure, DPB.

Mirroring | Description
When Enabled (bit 0x0080 clear) | With mirroring enabled, whenever a FAT sector is written, it will also be written to every other FAT. Also, a mirrored FAT sector can be read from any FAT. A FAT32 drive with multiple FATs will behave the same as FAT16 and FAT12 drives with multiple FATs. That is, the multiple FATs are backups of each other.
When Disabled (bit 0x0080 set) | With mirroring disabled, only one of the FATs is active. The active FAT is the one specified by bits 0 through 3 of the extdpb_flags member of DPB. The other FATs are ignored. Disabling mirroring allows better handling of a drive with a bad sector in one of the FATs. If a bad sector exists, access to the damaged FAT can be completely disabled. Then, a new FAT can be built in one of the inactive FATs and then made accessible by changing the active FAT value in extdpb_flags.


Partition Types

The following are all the valid partition types and their corresponding values for use in the Part_FileSystem member of the s_partition structure.

Partition Types

Value | Description
PART_UNKNOWN (00h) | Unknown
PART_DOS2_FAT (01h) | 12-bit FAT
PART_DOS3_FAT (04h) | 16-bit FAT. Partitions smaller than 32MB.
PART_EXTENDED (05h) | Extended MS-DOS Partition
PART_DOS4_FAT (06h) | 16-bit FAT. Partitions larger than or equal to 32MB.
PART_DOS32 (0Bh) | 32-bit FAT. Partitions up to 2047GB.
PART_DOS32X (0Ch) | Same as PART_DOS32 (0Bh), but uses Logical Block Address Int 13h extensions.
PART_DOSX13 (0Eh) | Same as PART_DOS4_FAT (06h), but uses Logical Block Address Int 13h extensions.
PART_DOSX13X (0Fh) | Same as PART_EXTENDED (05h), but uses Logical Block Address Int 13h extensions.


Limitations of Some Existing Functions

The following functions have limitations on FAT32 media.

Limitations | Description
File Control Block Functions | The open and create functions will only work for creating a volume label on a FAT32 drive. However, FCB Find_First/Next, Delete, and Rename will work and will return the entire 32-byte directory entry on FAT32 media.
Handle-Based File Write Functions | Win32-based applications can extend a file to a size greater than 2GB minus 1byte without special handling. However, non-Win32 applications must open such files with Int 21h Function 6Ch specifying the EXTENDED_SIZE flag. If not, write functions will fail and ERROR_ACCESS_DENIED (0005h) will be returned.
Handle-Based File Open and Create Functions | Win32-based applications can open files larger than 2GB minus 1byte in size without special handling. Non-Win32-based applications must open such files with Int 21h Function 6Ch specifying the EXTENDED_SIZE flag. However, using an old style create to truncate a file will not fail.


FAT32 File System Reference

The following functions and structures are supported on the FAT32 file system.

  • FAT32 File System Functions
  • FAT32 File System Structures


FAT32 File System Functions

The FAT32 file system supports the following new Int 21h functions and updated IOCTL functions.

New Int 21h Functions

Several new interrupt 21h functions were implemented to support FAT32 media. These additions are effective for Windows® 95 OEM Service Release 2 and later.

The new Interrupt 21h Function 730X functions can be called using the DeviceIoControl function. DeviceIoControl has been updated to support VWIN32_DIOC_DOS_DRIVEINFO, a new control code for Interrupt 21h Function 730X functions.

For more information, see Using VWIN32 to Carry Out MS-DOS Functions.

The following new interrupt 21h functions have been implemented:

Int 21h Function 7302h Get_ExtDPB
Int 21h Function 7303h Get_ExtFreeSpace
Int 21h Function 7304h Set_DPBForFormat
SetDPB_SetAllocInfo
SetDPB_SetDPBFrmBPB
SetDPB_ForceMediaChng
SetDPB_GetSetActFATandMirr
SetDPB_GetSetRootDirClus
Int 21h Function 7305h Ext_ABSDiskReadWrite

Updated IOCTL Functions

All IOCTL functions have been modified to accept a new device category value (CH = 48h) for FAT32 drives. These changes are effective for Windows 95 OEM Service Release 2 and later.

Most of the 08h and 48h forms of each function accept identical parameters. In some cases, the two forms of the call (48h and 08h) are interchangeable. However, this is not always true. As a result, applications that call the 48h form of the function must be prepared to fall back on the 08h form, in case of failure. Please refer to each specific function for information regarding these values.

Value | Meaning
Set Device Parameters | Int 21h Function 440Dh Minor Code 40h
Write Track on Logical Drive | Int 21h Function 440Dh Minor Code 41h
Format Track on Logical Drive | Int 21h Function 440Dh Minor Code 42h
Set Media ID | Int 21h Function 440Dh Minor Code 46h
Set Access Flag | Int 21h Function 440Dh Minor Code 47h
Lock/Unlock Removable Media | Int 21h Function 440Dh Minor Code 48h
Eject Removable Media | Int 21h Function 440Dh Minor Code 49h
Lock Logical Volume | Int 21h Function 440Dh Minor Code 4Ah
Lock Physical Volume | Int 21h Function 440Dh Minor Code 4Bh
Get Device Parameters | Int 21h Function 440Dh Minor Code 60h
Read Track on Logical Drive | Int 21h Function 440Dh Minor Code 61h
Verify Track on Logical Drive | Int 21h Function 440Dh Minor Code 62h
Get Media ID | Int 21h Function 440Dh Minor Code 66h
Get Access Flag | Int 21h Function 440Dh Minor Code 67h
Sense Media Type | Int 21h Function 440Dh Minor Code 68h
Unlock Logical Volume | Int 21h Function 440Dh Minor Code 6Ah
Unlock Physical Volume | Int 21h Function 440Dh Minor Code 6Bh
Get Lock Flag State | Int 21h Function 440Dh Minor Code 6Ch
Enumerate Open Files | Int 21h Function 440Dh Minor Code 6Dh
Find Swap File | Int 21h Function 440Dh Minor Code 6Eh
Get Drive Map Info | Int 21h Function 440Dh Minor Code 6Fh
Get Lock Level | Int 21h Function 440Dh Minor Code 70h
Get First Cluster | Int 21h Function 440Dh Minor Code 71h


FAT32 File System Structures

With the addition of the FAT32 file system, several structures were updated to accommodate FAT32 information. Additionally, subordinate structures have been implemented to support the FAT32 file system main structures. These changes are effective for Windows OEM Service Release 2 and later.

BPB
BIGFATBOOTFSINFO
DPB
EA_DEVICEPARAMETERS
ExtGetDskFreSpcStruc
s_partition
SDPDFormatStruc

Note Many data structures in this document are listed as reserved. This indicates that the user is not to assume or modify the values within these fields. They are used by the file system itself and are not available for any enhancements.


Long File Names

Microsoft® Windows® 95/98/Me allows users and applications to create and use long names for their files and directories. A long file name is a name for a file or directory that exceeds the standard 8.3 file name format.

  • About Long File Names
  • Long File Names Reference


About Long File Names

In the past, long file names typically appeared on network servers that used file systems other than the Microsoft® MS-DOS® file allocation table (FAT) file system. In Windows 95/98/Me, however, long file names are available for use with network servers and with local disk drives supporting the protected-mode FAT file system.

The following sections describe the long file name functions and explains how to create and use long file names in applications written for MS-DOS and 16-bit Windows version 3. x. Microsoft® Win32®-based applications automatically have access to long file names through the use of the corresponding Win32 file management functions.

  • Long File Names and the Protected-Mode FAT File System
  • File Name Aliases
  • File and Directory Management
  • File Searches
  • Down-Level Systems
  • Last Access Date


Long File Names and the Protected-Mode FAT File System

The protected-mode FAT file system is the default file system used by Windows 95/98/Me for mass storage devices, such as hard disk and floppy disk drives. Protected-mode FAT is compatible with the MS-DOS FAT file system, using file allocation tables and directory entries to store information about the contents of a disk drive. Protected-mode FAT also supports long file names, storing these names as well as the date and time that the file was created and the date that the file was last accessed in the FAT file system structures.

The protected-mode FAT file system allows file names of up to 256 characters, including the terminating null character. In this regard, it is similar to NTFS, the file system that allows file names of up to 256 characters. Protected-mode FAT allows directory paths (excluding the file name) of up to 246 characters, including the drive letter, colon, and leading backslash. This limit of 246 allows for the addition of a file name in the standard 8.3 format with the terminating null character. The maximum number of characters in a full path, including the drive letter, colon, leading backslash, file name, and terminating null character, is 260.

When an application creates a file or directory that has a long file name, the system automatically generates a corresponding alias for that file or directory using the standard 8.3 format. The characters used in the alias are the same characters that are available for use in MS-DOS file and directory names. Valid characters for the alias are any combination of letters, digits, or characters with ASCII codes greater than 127, the space character (ASCII 20h), as well as any of the following special characters.

$ % ' - _ @ ~ ` ! ( ) { } ^ # &

The space character has been available to applications for file names and directory names through the functions in current and earlier versions of MS-DOS. However, many applications do not recognize the space character as a valid character, and the system does not use the space character when it generates an alias for a long file name. MS-DOS does not distinguish between uppercase and lowercase letters in file names and directory names, and this is also true for aliases.

The set of valid characters for long file names includes all the characters that are valid for an alias as well as the following additional characters.

+ , ; = [ ]

Windows 95/98/Me preserves the case of the letters used in long file names. However, the protected-mode FAT file system, which is not case sensitive, will not allow more than one file to have the same name except for case in the same directory. For example, files named Long File Name and long file name are not allowed to exist in the same directory. Although extended ASCII characters (characters with ASCII codes greater than 127) are also permitted in file names, programs should avoid them, because the meanings of the extended characters may vary according to code page. On disk, the characters in the alias are stored using the OEM character set of the current code page, and the long file name is stored using Unicode format.

Although the protected-mode FAT file system is the default file system in Windows 95/98/Me, it is not the only file system accessible to applications running with Windows 95/98/Me. For example, applications that connect to network drives may encounter other file systems, such as NTFS. Before using long file names for files and directories on a volume in a given drive, you must determine the maximum lengths of file names and paths by using Get Volume Information (Interrupt 21h Function 71A0h function returns values that you can use to make sure your file names and paths are within the limits of the file system.

In general, you should avoid using static buffers for file names and paths. Instead, you should use the values returned by Get Volume Information to allocate buffers as you need them. If you must use static buffers, you should reserve 256 characters for file names and 260 characters for paths. These are the maximum sizes currently recommended for Win32-based applications.


File Name Aliases

When an application creates a file or directory that has a long file name, the system automatically generates a corresponding short file name (alias) for that file or directory, using the standard 8.3 format. Aliases ensure that existing applications that do not handle long file names can, nevertheless, access those files and directories.

If the long file name follows the standard 8.3 format, the alias has the same name except that all lowercase letters are converted to uppercase. For example, if the long file name is Examples.Txt, the corresponding alias will be EXAMPLES.TXT.

If the long file name does not follow the standard 8.3 format, the system automatically generates an alias, using the following scheme to ensure that the alias has a unique name. The system tries to create a name by using the first 6 characters of the long file name followed by a numeric tail. A numeric tail consists of the tilde (~) character followed by a number. The system starts with the number 1 in the numeric tail. If that file name already exists, it uses the number 2. It continues in this fashion until a unique name is found. If the long file name has a file name extension, the system will use the first three characters of the long file name's extension as the extension for the alias.

As the number of digits in the numeric tail grows, fewer characters in the long file name are used for the 8 characters in the alias. For example, the alias for Long File Name.File would be LONGF~10.FIL if the names LONGFI~1.FIL through LONGFI~9.FIL already existed in the directory. Applications can override the default alias numbering scheme when creating a file by specifying the OPEN_FLAGS_ALIAS_HINT value and supplying a number to use in the call to Create or Open File (Interrupt 21h Function 716Ch).

A period is just another character in a long file name. Leading periods are allowed in a long file name, but trailing periods are stripped. A file can have multiple periods as part of its name. For example, MyFile.081293.Document is a valid file name, and its alias will be MYFILE~1.DOC. The first three characters after the last period in the file name are used as the file name extension for the alias, as long as the last period is not a leading period. A file name of .login is also valid, and its alias is LOGIN~1.

In a given directory, the long file name and its alias must uniquely identify a file. For example, if there is a file with the long file name Long File Name and the alias LONGFI~1, the system will not allow either Long File Name or LONGFI~1 to be used as another file's long file name.

If a file with a long file name is copied or edited, the alias for the resulting file may be different from the original alias. For example, if the destination directory contains an alias that conflicts with the original alias, the system generates another unique alias. If a long file name LongFile name is associated with the alias LONGFI~2 and is later copied to a different directory using the long file name, the alias in the destination directory might be LONGFI~1 (unless a file with that name already existed in the destination directory). The system always generates new aliases during these operations and always chooses aliases that do not conflict with existing file names. An application must never rely on an alias being the same for all copies and versions of a given file.

Applications can open, read, and write from a file using the alias without affecting the long file name. However, some operations on the alias, such as copy, move, backup, and restore, may result in the original long file name being destroyed. For example, older versions of utilities that do not support long file names can destroy the long file name while performing those operations.

The system attempts to preserve a long file name, even when the file associated with it is edited by an application that is not aware of long file names. Typically, these applications operate on a temporary copy of the file, and when the user elects to save the file, the application deletes the destination file or renames it to another name. The application then renames the temporary file to the destination name or creates a new file with new contents.

When an application makes a system call to delete or rename an alias, the system first gathers and saves a packet of information about the file and then performs the delete or rename operation. The information saved includes the long file name as well as the creation date and time, the last modification date and time, and the last access date of the original file. After the system performs the delete or rename operation, the system watches for a short period of time (the default is 15 seconds) to see if a call is made to create or rename a file with the same name. If the system detects a create or rename operation of a recently deleted alias, it applies the packet of information that it had saved to the new file, thus preserving the long file name.

Currently, Load and Execute Program (Interrupt 21h Function 4B00h) does not accept long file names. If an application starts other applications, it must retrieve the file name alias for the given executable file and pass that alias to Load and Execute Program.


File and Directory Management

The standard MS-DOS file and directory management functions do not accept long file names. You must, therefore, use the long file name functions to create and manage files and directories having long names. The long file name functions are similar to existing MS-DOS system functions. You copy function parameters to registers and issue an Interrupt 21h instruction to carry out the call. The function sets or clears the carry flag to indicate whether the operation was successful and may also return information in registers.

If a long file name function has a corresponding MS-DOS function, the number that identifies the long file name function is four digits long, beginning with the number 71 and ending in the same number as the corresponding MS-DOS function. For example, the long file name function Make Directory (Interrupt 21h Function 7139h) corresponds to MS-DOS Create Directory (Interrupt 21h Function 39h).

You can create or open a file having a long file name by using Create or Open File (Interrupt 21h Function 716Ch). This function takes the name and attributes of the file to create or open and returns a handle that you use to identify the file in subsequent calls to standard MS-DOS functions, such as Read File or Device (Interrupt 21h Function 3Fh) and Write File or Device (Interrupt 21h Function 40h).

You can set or retrieve the time and attributes for a file having a long file name by using Get or Set File Time (Interrupt 21h Function 57h) and Get or Set File Attributes (Interrupt 21h Function 7143h). You can move a file having a long file name by using Rename File (Interrupt 21h Function 7156h) or delete the file by using Delete File (Interrupt 21h Function 7141h).

You can create a directory having a long file name by using Make Directory (Interrupt 21h Function 7139h) or remove the directory by using Remove Directory (Interrupt 21h Function 713Ah).

You can set and retrieve the current directory by using Change Directory (Interrupt 21h Function 713Bh) and Get Current Directory (Interrupt 21h Function 7147h).


File Searches

You can search directories for selected files by using Find First File and Find Next File (Interrupt 21h Functions 714Eh and 714Fh). These functions search for and return information about files having long file names and aliases (file names in the standard 8.3 format). The functions return information in a WIN32_FIND_DATA structure, which contains both the file name and the corresponding alias, if any.

Unlike MS-DOS Find First File (Interrupt 21h Function 4Eh), the long file name version of Find First File allocates internal storage for the search operations and returns a handle that identifies the storage. This handle is used with Find Next File. To make sure the internal storage is freed, you must use Find Close (Interrupt 21h Function 71A1h) to end the search.

You pass the Delete File (Interrupt 21h Function 7141h) and Find First File functions a file name, which may contain wildcard characters, such as an asterisk (*) or question mark (?). Because Find First File, Find Next File, and Delete File examine long file names and aliases during the search, some wildcard searches may yield unexpected results. For example, if the system has generated the alias LONGFI~1 for the long file name LongFile name, a search for names that match the *1 pattern would always return the LongFile name file, even though that name does not end with a 1. Searches are not case-sensitive. For example, a search for names that match the *mid* pattern will yield the same results as that for the *MID* pattern. In general, you should check both names returned in the WIN32_FIND_DATA structure to determine which of them matched the pattern.

Wildcard searches are more flexible in Windows 95/98/Me than in MS-DOS. In the preceding examples, *1 finds the file names that end in a 1 and *mid* finds file names that contain the characters mid. In MS-DOS and in Windows 95/98/Me searching on real-mode FAT directories, all characters after the first * are ignored.


Down-Level Systems

Long file names, file last access date, and file creation date and time are not supported while the file system is in single MS-DOS application mode. They are not supported either in versions of MS-DOS that only use the real-mode FAT file system. These file systems and others that do not support long file names are referred to as down-level systems. If you intend for an application to run with both Windows 95/98/Me and down-level systems, you should always check the system to determine whether it supports the long file name functions. The easiest way to check is to call Get Volume Information (Interrupt 21h Function 71A0h). This function returns an error if the system does not support the long file name functions.

Another way of handling down-level systems is to use a combination of calls to long file name and standard MS-DOS functions to carry out file management. In this case, you call the standard function only if the long file name function is not supported. To indicate an unsupported function, the system sets the AL register to zero but leaves the AH register and the carry flag unchanged. The following example shows how to combine long file name and standard functions to carry out a file or directory management operation.

stc            ; set carry for error flag
               ; set registers here for LFN function call
int 21h        ; call long file name function
jnc success    ; call succeeded, continue processing
cmp ax, 7100h  ; is call really not supported?
jne failure    ; supported, but error occurred
               ; set registers here for MS-DOS function call
int 21h        ; call standard MS-DOS function

Application developers have to decide what to do when users save a file with a long file name to a down-level system. One approach is to imitate the behavior of the command interpreter (COMMAND.COM) and save the file using the alias without informing the user. A different approach is to have the application inform the user that the file system does not support long file names and allow the user to save the file with a file name in the standard 8.3 format.


Last Access Date

The Windows 95/98/Me last access date is intended to reflect the last time a file was accessed for the purpose for which it was created. This date is intended to provide a means for applications, users, or both to determine which files have not been used recently. When an application saves a file, the system automatically resets the last access date. An application that cannot understand the contents of the files it is accessing should save the last access date and restore it after closing the file. For example, applications that back up a file, search files for strings, and scan for viruses should save and restore the last access date.

Applications should allow the system to set the last access date in the following cases:

  • Running a program should set the last access date for the .EXE file.
  • Loading a dynamic-link library (DLL) should set the last access date for the .DLL file.
  • Editing or printing a document should set the last access date for the document file.
  • In general, any use of a document by an application that creates or modifies that type of document should set the last access date (unless the document is being opened only to decide whether it is to be used in a find operation).
  • Application use of peripheral files (.INI files and so on) should set the last access date.

Win32-based applications can preserve the last access date by using the GetFileTime and SetFileTime functions. Applications written for MS-DOS or Windows version 3. x can use Get Last Access Date and Time (Interrupt 21h Function 5704h) and Set Last Access Date and Time (Interrupt 21h Function 5705h), or they can open the file with Create or Open File (Interrupt 21h Function 716Ch) using the OPEN_ACCESS_RO_NOMODLASTACCESS (0004h) access mode.


Long File Names Reference

The long file name functions correspond to the Win32 file management functions, as shown in the following table.

Long file name function | Win32 function
Interrupt 21h Function 5704h Get Last Access Date and Time | GetFileTime
Interrupt 21h Function 5705h Set Last Access Date and Time | SetFileTime
Interrupt 21h Function 5706h Get Creation Date and Time | GetFileTime
Interrupt 21h Function 5707h Set Creation Date and Time | SetFileTime
Interrupt 21h Function 7139h Make Directory | CreateDirectory
Interrupt 21h Function 713Ah Remove Directory | RemoveDirectory
Interrupt 21h Function 713Bh Change Directory | SetCurrentDirectory
Interrupt 21h Function 7141h Delete File | DeleteFile
Interrupt 21h Function 7143h Get or Set File Attributes | GetFileAttributes, SetFileAttributes
Interrupt 21h Function 7147h Get Current Directory | GetCurrentDirectory
Interrupt 21h Function 714Eh Find First File | FindFirstFile
Interrupt 21h Function 714Fh Find Next File | FindNextFile
Interrupt 21h Function 7156h Rename File | MoveFile
Interrupt 21h Function 7160h Minor Code 0h Get Full Path Name | GetFullPathName
Interrupt 21h Function 7160h Minor Code 1h Get Short Path Name | GetShortPathName
Interrupt 21h Function 7160h Minor Code 2h Get Long Path Name | GetLongPathName
Interrupt 21h Function 716Ch Create or Open File | CreateFile, OpenFile
Interrupt 21h Function 71A0h Get Volume Information | GetVolumeInformation
Interrupt 21h Function 71A1h Find Close | FindClose
Interrupt 21h Function 71A6h Get File Info By Handle | GetFileInformationByHandle
Interrupt 21h Function 71A7h Minor Code 0h File Time To DOS Time | FileTimeToDOSDateTime
Interrupt 21h Function 71A7h Minor Code 1h DOS Time To File Time | DOSDateTimeToFileTime
Interrupt 21h Function 71A8h Generate Short Name | No Win32 function equivalent
Interrupt 21h Function 71A9h Server Create or Open File | No Win32 function equivalent
Interrupt 21h Function 71AAh Minor Code 0h Create Subst | No Win32 function equivalent
Interrupt 21h Function 71AAh Minor Code 1h Terminate Subst | No Win32 function equivalent
Interrupt 21h Function 71AAh Minor Code 2h Query Subst | No Win32 function equivalent

Note that Interrupt 21h Functions 71A2h through 71A5h exist, but they are for internal system use only.


MS-DOS Extensions

The following topics describe various Microsoft® MS-DOS® extensions for Microsoft® Windows® 95/98/Me and provides general information about the file system.

  • About MS-DOS Extensions
  • MS-DOS Extensions Reference


About MS-DOS Extensions

Windows 95/98/Me not only supports the complete set of MS-DOS system functions and interrupts but also provides extensions that permit MS-DOS – based applications to take advantage of Windows 95/98/Me features, such as long file names, exclusive volume locking, and virtual machine services.

For more information, see the following topics:

  • Windows 95/98/Me Version of MS-DOS
  • File System Support
  • Command Interpreter for Command
  • Long Command Lines


Windows 95/98/Me Version of MS-DOS

When running with Windows 95/98/Me, MS-DOS – based applications can check the operating system version by using Get MS-DOS Version Number (Interrupt 21h, Function 30h). For Windows 95/98/Me, this function returns 7 as the major version number and 0 as the minor version number.

If you need to know that the system is running MS-DOS version 7.0, you must use Interrupt 2Fh Function 4A33h. This function returns zero in the AX register for MS-DOS version 7.0 or higher and returns a nonzero value in AX for any other versions of the disk operating system. In addition to the AX register, this function uses the DS, SI, DX, and BX registers.


File System Support

Windows 95/98/Me supports the long file name file allocation table (FAT) when running Windows. Any physical file on this extended FAT file system will logically be associated with two names — namely, the primary file name (also referred to as the long file name) and its alternate name or alias. Windows 95/98/Me automatically generates the alias, and it is always in the standard 8.3 file name format. When a file is saved to disk, the system creates a directory entry for both the long file name and alias. Because the number of entries in the root directory is limited, it is best to store files in a directory below it to avoid filling up the root. For more information about the file name conventions and how the system generates the alias, see Long File Names.

  • File Name Limitations Under Real Mode
  • Preserving File Names
  • Searching File Names
  • Performing Direct Disk Writes
  • Storing File Names
  • File-Name Functions


File Name Limitations Under Real Mode

If Windows 95/98/Me is started in single MS-DOS application mode (real mode), only the standard FAT file system (and not the long file name FAT file system) is supported. This means that long file names that are created in a Windows environment will not be visible when the user exits to single MS-DOS application mode, although the names themselves are physically present on the media. Only the alias (the 8.3 file name) will be visible.

When down-level file systems (such as MS-DOS version 6.0, Windows version 3.1, and OS/2® version 2.11) read a floppy disk that contains long file names created using Windows 95/98/Me, the long file name will not be visible; only the alias (the 8.3 file name) will be visible. However, Windows NT supports long file names. Windows 95/98/Me will see the long file names of files on a floppy disk that were created using Windows NT, and Windows NT will see the long file names of files on a floppy disk that were created using Windows 95/98/Me. Windows 95/98/Me will be able to see the long file names on NTFS or Novell NetWare's file system if there are long file names on the server.

Because down-level systems are not aware of long file names, they will not preserve them. If you copy a file from a floppy disk to the hard disk on a down-level system, the long file name associated with the file is not copied over. If you edit a file on the floppy disk using the alias and then save a new copy back on the floppy disk using the down-level system, the long file name associated with the file will most likely be lost. If you take the floppy disk back to the Windows 95/98/Me system, only the alias will be associated with the file.


Preserving File Names

Certain operations, such as copy, backup, and restore, using older versions of utilities that have not been updated to support long file names will destroy the long file name. Running a utility called LFNBK that comes with Windows 95/98/Me before using older backup utilities will preserve the long file names. Following are the steps for using LFNBK to backup and restore a disk:

  1. Preserve the long file name and alias (the 8.3 file name) association by running LFNBK /b drive-letter, where drive-letter is the drive that you plan to back up.
  2. Back up the drive (specified as drive-letter in the previous step) using an old backup program that is not be aware of long file names.
  3. Restore the backup files to a drive, when necessary at some later point, using an old restore program that is not be aware of long file names.
  4. Restore the long file names on the drive, by running LFNBK /r drive-letter, where drive-letter is the drive where the files were restored to.


Searching File Names

Searches of file names apply to both the file name and its alias. The system presents a single unified namespace so that a single physical view of the file is preserved. However, if the result of a search shows only the long file name, it could be confusing to the user. For example, a set of files in a directory might include the following file names and aliases.

File name | Alias
LongFileName | LONGFI~1
File-1 | FILE-1

A search of files in the directory using DIR *1 would display the following information.

LONGFI~1    123    05-11-95    15:26    LongFileName
FILE-1      352    05-11-95    16:01    File-1

Note that the DIR command displays the alias first for compatibility with the older DIR format. However, a search utility that is aware of long file names but displays only the file name, would also show both the LongFileName and File-1 files. This could be confusing at first glance to the user because the LongFileName file does not have the number 1 as specified in the search criteria. The file was matched to the search pattern because its alias contains the number 1.

The wildcard searches have been expanded in Windows 95/98/Me. Using the old search criteria, the first * encountered caused all following characters to be ignored. However, in the preceding example, *1 is a valid specification. More than one wildcard can be used in Windows 95/98/Me when specifying search criteria. For example, to search for all files that contain the word mid somewhere in the file name, *mid* can be specified as the search criteria.


Performing Direct Disk Writes

Previously reserved fields in the file system directory entry are used for storing the last access date and the creation date and time. A file with a long file name, which is longer than 5 characters, will also cause the system to use previously reserved fields in the directory entry. In previous versions of MS-DOS and Windows, these reserved entries were zero. Older disk repair and checking utilities that have not been updated for Windows 95/98/Me might display errors about the disk because of the usage of these reserved entries. It is possible that an older disk repair utility could either destroy the long file name or the actual data in a file because it would mistakenly interpret the file as corrupted. For this reason, Windows 95/98/Me won't support old utilities that perform direct disk writes. A newer version of the utility that understands the newer on-disk file system structures will obtain an exclusive volume lock and proceed correctly. This feature is called exclusive volume locking.

Exclusive volume locking is also needed because the system is a multitasking system and disk utilities need exclusive access so that they can modify the file system without causing the file system to be inconsistent for the other executing applications.


Storing File Names

When an application stores file names, it should follow these guidelines:

  • Using an alias instead of a long file name can break the association with the file because certain operations, such as editing the file, can potentially change the alias. For example, if the server side of a network uses the alias instead of the long file name of a client file to store information related to the file (such as access permissions), it will be more susceptible to lose the association of permissions with the file. If the user edits the file on the client side, the alias may potentially change, and if it changes, the server side will lose the associated information.
  • When an application caches the absolute path to a file name, the path itself can be a mixture of file names and aliases. Because of this, applications that need to store a path should store a canonical form of the absolute path. Applications may use either Get Short Path Name (Interrupt 21h Function 7160h Minor Code 1h) or te GetShortPathName function to retrieve the canonical form of a path. Applications that need to determine if two files are the same can use the nFileIndexHigh and nFileIndexLow members of the BY_HANDLE_FILE_INFORMATION structure. Note, however, that nFileIndexHigh and nFileIndexLow might not be supported on real-mode file systems, such as Microsoft CD-ROM Extensions (MSCDEX), or real-mode networks.
  • An installation program that needs to enter information into configuration files, such as CONFIG.SYS, should make sure it uses paths that only consist of 8.3 file name components, because the long file names will not be visible at boot up time when startup files, such as CONFIG.SYS and AUTOEXEC.BAT, are processed. Again, the GetShortPathName function should be used for this purpose.


File Name Functions

Platform SDK: Win32 API

File-Name Functions

With the exception of the OpenFile function, all the functions in Windows version 3. x that require the application to pass in a file name (such as LoadLibrary, WinExec, _lopen, and _lcreat) have been updated to support long file names. For compatibility reasons, functions that return file names should return only aliases (8.3 file names) to 16-bit Windows – based applications marked less than 4.0.

MS-DOS – based applications generally use the Interrupt 21h functions. Except for Extended Open/Create (Interrupt 21h Function 6Ch), the older Interrupt 21h functions have not changed in Windows 95/98/Me. Extended Open/Create has been enhanced in Windows 95/98/Me to make use of the last access date for a file. To support long file names, Windows 95/98/Me provides many new Interrupt 21h functions. Any MS-DOS – based application that will use long file names must be updated to support the new functions. For information about the long file name Interrupt 21h functions, see Long File Names.

Windows 95/98/Me supports the new Interrupt 21h long file name functions on as many file systems as possible. On file systems, such as MSCDEX, Flash, and real-mode network redirectors, that do not support long file names, the system automatically translates the newer Interrupt 21h calls to the appropriate older Interrupt 21h calls, as long as the file name passed as a parameter is a valid alias (8.3 file name). Applications may use Get Volume Information (Interrupt 21h Function 71A0h) to retrieve information on the capabilities of the underlying file system.


Command Interpreter for Command

The for command in the command interpreter (COMMAND.COM) is modal. The default is LFNFOR=OFF, which causes the for command to use the old Interrupt 21h function calls. In that case, only aliases (8.3 file names) can be used in the for command. If LFNFOR=ON is set, the for command uses the new Interrupt 21h functions, and long file names can be used as part of the for command.


Long Command Lines

Although in previous versions of MS-DOS the limit for environment variables and batch file lines is 128 characters, it is 1024 characters in Windows 95/98/Me. The limit for the keyboard buffer, however, is still 128 characters. Although 1024 and 128 are the standard limits, users may configure their systems to lower these limits.

In previous versions of MS-DOS, command-line arguments are located in the command tail of the program segment prefix (PSP). The command tail in the PSP is limited to 128 characters, including the leading byte that specifies the length of the command line and the trailing carriage return character. In Windows 95/98/Me, if the command line is less than or equal to 126 characters, it is set in the command tail of the PSP. For command lines that are greater than 126 characters, an application should follow these steps:

  1. Set the count byte in the command tail to 7Fh.
  2. Fill in 7Eh bytes of the command tail followed by the carriage return character (0Dh).
  3. Place the rest of the command line in the CMDLINE environment variable.


MS-DOS Extensions Reference

The following elements are supported as part of the MS-DOS extensions.

  • MS-DOS Extensions Functions
  • MS-DOS Extensions Structures


MS-DOS Extensions Functions

This following are the MS-DOS extensions functions.

Function | Description
Interrupt 21h Function 4302h | Get compressed file size.
Interrupt 21h Function 440Dh Minor Code 48h | Lock/unlock removable media.
Interrupt 21h Function 440Dh Minor Code 49h | Eject removable media.
Interrupt 21h Function 440Dh Minor Code 6Fh | Get drive map information.
Interrupt 21h Function 440Dh Minor Code 71h | Get first cluster.
Interrupt 21h Function 6Ch | Extended open/create.


MS-DOS Extensions Structures

The following are the MS-DOS Extensions structures.

Structure | Description
DRIVE_MAP_INFO | Get Drive Map Info returns information about the specified drive in this structure.
MID | This structure, which is used by Get Media ID (Interrupt 21h Function 440Dh Minor Code 66h) and Set Media ID (Interrupt 21h Function 440Dh Minor Code 46h), has been updated to support compact disc (CD) file systems. For information about using these functions, see the Microsoft MS-DOS Programmer's Reference.
PARAMBLOCK | This structure is needed by Lock/Unlock Removable Media.


Thunk Compiler

This overview describes how to use the thunk compiler so that your Win32-based application running on Microsoft® Windows® 95/98/Me can take advantage of 16-bit components. In addition, this overview discusses related issues you should consider before choosing to use the thunk compiler.

  • About the Thunk Compiler
  • Using the Thunk Compiler
  • Troubleshooting Flat Thunks


About the Thunk Compiler

Writing Win32-based applications provides the following advantages over writing 16-bit Windows-based applications:

  • The flat address space. Your application can access up to 2 gigabytes of memory. You no longer need to consider the boundaries and limitations imposed by a segmented architecture. In addition, many system resource limits have been increased.
  • Better performance. Win32 platforms have faster memory management, networking, file operations, and floating-point operations. Your application can use threads to provide a responsive user interface. The system uses preemptive multitasking to schedule threads.
  • Greater robustness. The system does not crash often, but if it does crash, it does not destroy data or cause other executing applications to crash.

Despite these advantages, however, you may have problems porting your application to the Win32 API. For example, when porting your application to take advantage of new system features, you might find you must use features from an existing 16-bit DLL that has not been ported to Win32. Rather than delay the release of your application while waiting for a ported version the 16-bit DLL, you can use the thunk compiler to call the 16-bit DLL from your Win32-based application.

Windows 95/98/Me implements a thunking model called flat thunks. Flat thunks allow 32-bit code to call functions implemented in 16-bit code. They also allow 16-bit code to call functions implemented in 32-bit code. Windows NT/Windows 2000 does not support flat thunks. Therefore, if you use flat thunks, your application cannot run on Windows NT/Windows 2000 unless you isolate your thunking code into platform-specific DLLs.

Windows NT/Windows 2000 implements a thunking model called generic thunks, which allow 16-bit code to call functions implemented in 32-bit code. Although Windows 95/98/Me supports generic thunks, it does not support the underlying process model used by Windows NT/Windows 2000. This means that generic thunking code might not work identically under Windows 95/98/Me and Windows NT/Windows 2000. For more information, see Generic Thunks.

  • Role of the Thunk Compiler
  • Thunk Compiler and Data Types
  • Behavior of Win32 Functions Inside 16-bit Processes
  • Compatibility with Existing 16-bit DLLs
  • 16- to 32-bit Thunks and Preemption
  • 16- to 32-bit Thunks in GDI Device Drivers
  • Globally Fixing Handles
  • Late Loading


Role of the Thunk Compiler

The thunk compiler takes a thunk script as input, then produces an assembly-language file that implements one or more thunks. These thunks are code that allows 32-bit code to call 16-bit code and vice-versa. The following steps briefly describe how to use the thunk compiler to create a flat thunk.

To create a flat thunk

  1. Create a thunk script.
  2. Compile the thunk script with the thunk compiler.
  3. Assemble the .ASM file produced by the thunk compiler twice — once for a 16-bit .OBJ file and the second time for a 32-bit .OBJ file.
  4. Create a Win32-based thunk DLL and link it with the 32-bit .OBJ file created in step 3.
  5. Create a 16-bit thunk DLL and link it with the 16-bit .OBJ file created in step 3.

The DLLs you create using these steps implement flat thunks. They can provide multiple thunks. If the DLLs implement thunks from 16-bit code to 32-bit code and thunks from 32-bit code to 16-bit code, you will need to create two thunk scripts, one for each direction.

To use the thunk DLLs, simply call the function you want to use. For example, suppose your Win32-based application is calling MyFunction, which is implemented in a 16-bit DLL. The application calls a function implemented in the Win32-based thunk DLL that in turn calls the thunk function, MyFunction. When MyFunction is called in the 32-bit thunk DLL, the code generated by the thunk compiler calls the MyFunction implemented in the 16-bit thunk DLL.


Thunking Mechanics

There are differences in pointers, structure packing, and parameter size between the 16-bit and 32-bit portions of the thunk. The thunk compiler must process these differences correctly. In particular, the compiler must check for the following elements in a mixed 16-bit and 32-bit environment:

  • Pointers consist of a selector and a 16-bit offset in a 16-bit Windows environment. However, in a 32-bit Windows environment, pointers essentially consist of a 32-bit offset; that is, the DS, ES, SS, and CS registers all contain selectors that have the same base address. All pointers in this environment are considered to be near 0:32 pointers. Translating a 16:16 pointer to a 0:32 pointer involves determining the segment base for the selector portion of the pointer and adding the offset to it. Translating a 0:32 pointer to a 16:16 pointer involves allocating a selector and calculating the offset from the base of the corresponding segment.
  • Both 16-bit and 32-bit applications pass function parameters on the stack. However, 16-bit applications address the stack using the SS:SP registers, while 32-bit applications use the SS:ESP registers. When thunking from 16-bit code to 32-bit code (or thunking in the other direction), the processor's method of addressing the stack must be switched.
  • The size of an int is 32 bits in a 32-bit environment and 16 bits in a 16-bit environment. When an application uses both 16-bit and 32-bit environments, some piece of software must be able to translate 16-bit integers to 32-bit integers. The following 16-bit function illustrates the translation:
    DWORD Sample(int i);

    If a 32-bit component calls this 16-bit function, it pushes a 32-bit argument on the stack, but the 16-bit function only pops 16 bits off the stack. Later, when the function returns, it places the returned DWORD value in the DX:AX register pair, but the 32-bit calling application expects the return value to be in the EAX register. It is the thunking layer's responsibility to negotiate these translations.

  • To correctly handle packing and conversion, the thunk compiler translates structure members one at a time. The thunk compiler supports structure packing on 1-, 2-, or 4-byte boundaries (corresponding to the /Zp1, /Zp2, and /Zp4 compiler options for Microsoft C/C++ compilers). However, the compiler does not support 8-byte structure alignment. Structure-packing boundaries must be the same on both sides of a thunk.
  • Unlike 32-bit code, 16-bit code is usually not reentrant; 16-bit code is typically written with the assumption of a cooperative multitasking model. The thunk layer must serialize access to 16-bit code. In contrast, 32-bit code must execute without serialization to prevent deadlocks. The thunk layer manages serialization on transitions in both directions.


Thunk Script Keywords

You can use keywords in the thunk script to provide information to the thunk compiler beyond that which the C-style type definitions and function prototypes provide. These keywords enable you to optimize DLL loading and parameter translation. The thunk compiler supports the following keywords in the thunk script.

Keyword | Meaning
enablemapdirect1632=true; | Specifies a 16-bit to 32-bit thunk.
enablemapdirect3216=true; | Specifies a 32-bit to 16-bit thunk.
input | The parameter is used for input only; it is translated when the function is called.
output | The parameter is used for output only; it is translated when the function returns.
inout | The parameter is used for input and output; it is translated when the function is called and when it returns.
faulterrorcode | Specifies the error code when a 16-bit to 32-bit thunk fails because the 32-bit DLL cannot load or initialize. This value is returned when the application calls the first thunk. For more information, see Late Loading.
preload32 | Forces the 32-bit thunk DLL to load when the 16-bit thunk DLL is loaded in a 16-bit to 32-bit thunk.
preload16 | Not used. Late loading of a 16-bit DLL in a 32-bit to 16-bit thunk is not supported.
win31compat | Defers unloading a 32-bit thunk DLL until the process terminates. For more information, see Compatibility with Existing 16-bit DLLs.


Thunk Compiler and Data Types

The thunk compiler supports most of the built-in and user-defined types that the C and C++ languages support. The supported types behave as their C and C++ counterparts do, except as noted. You must define other types in the thunk script.

This section discusses the following topics:

  • Data Types Supported By the Thunk Compiler
  • Handling Data Types Not Supported by the Thunk Compiler
  • Supported and Unsupported Return Values
  • Supported and Unsupported Calling Conventions


Data Types Supported by the Thunk Compiler

The thunk compiler supports some C data types as parameters, return values, or both. The following data types are supported as function parameters:

  • Scalar data types such as int, char, unsigned int, and unsigned long.
  • A special type, bool, that is not supported by the C/C++ compiler. You should use bool in your thunk script for functions that use a nonzero value other than 1 to represent TRUE.
  • Pointers to scalar data types.
  • Structures passed by value or reference.
  • Structures within structures.
  • Pointers within structures, provided that the data type pointed to does not require repacking. The object can be another structure.
  • Arrays of scalar values embedded in structures.

The following data types are supported as function return values:

  • Scalar data types such as int, char, unsigned int, and unsigned long.
  • A special type, bool, that is not supported by the C/C++ compiler. You should use bool in your thunk script for functions that use a nonzero value other than 1 to represent TRUE.
  • Pointers to scalar data types for 32-bit to 16-bit thunks, provided that the data type does not change size. For example, pointers to int are not supported, because an int is 16 bits long in 16-bit code and 32 bits long in 32-bit code.
  • Structure pointers for 32-bit to 16-bit thunks, provided that the structure requires no repacking and contains no pointers. The segment address on the 16-bit side is not globally fixed by the thunk compiler. As a general rule, the thunk compiler deallocates the selectors it allocates.
  • Arrays of scalar values embedded in structures.

Note The int data type is 16 bits wide in 16-bit code and 32 bits wide in 32-bit code. In 32-bit to 16-bit thunks, variables of type int are first truncated from 32 bits to 16 bits (less than 65536), then sign-extended to 32 bits upon return. Likewise, in 16-bit to 32-bit thunks, variables of type int are first sign-extended to 32 bits, then truncated to 16 bits on return.


Handling Data Types Not Supported by the Thunk Compiler

There are several strategies for handling data types and calling conventions that the thunk compiler does not support. These strategies rely on substituting a supported type for the unsupported type and processing the data manually to obtain the original data. The thunk compiler does not support the following data types:

  • Arrays of pointers or structures
  • Unions
  • Floating-point types (such as float or double)
  • Pointers from 16-bit to 32-bit thunks
  • C++ classes and objects
  • Linked lists, binary trees, and other dynamic data structures (the count of items is undetermined at compile time)

Before considering substitution strategies, it is important to understand how the thunk compiler translates data. The thunk compiler uses the following rules to translate data:

  • Automatically translate 32-bit pointers into 16-bit far pointers.
  • Automatically translate 16-bit far pointers into 32-bit pointers.
  • Pass signed and unsigned scalar values unmodified, except for integer values. Because integers are 32 bits wide in 32-bit code and 16 bits wide in 16-bit code, values are truncated on the 16-bit side of the thunk and sign-extended on the 32-bit side.

You should use the following general principles for substituting data types and calling conventions:

  • Write wrapper functions around the thunk to handle unsupported calling conventions.
  • Substitute supported types for unsupported types in the thunk scripts. The supported type must be the same length as the unsupported type. In general, it should not be a pointer type.
  • If the unsupported type is larger than 8 bytes, pass its address to the other side of the thunk and handle its interpretation there.
  • To handle unsupported types in the return value, write wrapper functions for both sides of the thunk. Where necessary, give the actual function an extra parameter that points to a dynamically allocated buffer.

Handling Floating-Point Data Types

The thunk compiler does not support any floating-point types. There are three floating-point types: float, double, and long double.

A float is 4 bytes long on both the 16-bit and 32-bit sides of a thunk. To pass a float to a thunk function, declare it as a DWORD value in the thunk script. This causes the thunk compiler to pass a 4-byte value without translating its value.

A double is 8 bytes long on both the 16-bit and 32-bit sides of the thunk. To pass a double to a thunk function, declare a structure containing two DWORD values in the thunk script, and pass the structure to the function in the thunk script.

In 16-bit code, a long double is a native 80-bit type of the floating-point processors in the Intel x86 microprocessor family. Because RISC processors do not have a native 80-bit floating point type, 32-bit C and C++ compilers such as Microsoft Visual C++ implement this type as a 64-bit double. If you need additional precision, pass the 80-bit value as a structure consisting of two DWORD members and a WORD member, and handle the value manually on the 32-bit side of the thunk.

Handling Pointer Types

The thunk compiler automatically translates pointers to most types. It properly translates pointers to the following data types:

  • All scalar data types.
  • Structures.
  • Pointers within structures, provided the data type pointed to does not require repacking. The object can be another structure.

The thunk compiler automatically translates pointers. To pass an address without having it translated, use the DWORD type instead of a pointer type. You can use the untranslated address on the target side of the thunk; however, keep in mind that dereferencing this address on the target side of the thunk will cause an access violation.

When a pointer is passed from 32-bit to 16-bit code, a single selector with a limit of 64K is allocated in the thunk. If the 16-bit code needs to access more than the first 64K of the block, it must change the base address of the selector or allocate additional selectors to access the block.

Pointers to pointers are translated partially. The "outside" pointer is translated, but the pointer it points to — the "inside" pointer — is not translated. The thunk compiler does not handle all cases of pointers used in aggregate types, such as arrays of pointers.

Handling Unions

The thunk compiler does not support unions because it cannot determine which type the union will represent at run time. For example, the following union must be treated differently by the thunk compiler depending on which member the application uses when it makes the thunk call:

union
{
    DWORD dwIntegerValue;
    LPSTR szFileName;
}

The problem is that the thunk compiler would have to pass the value unchanged, assuming that the dwIntegerValue member will be used, or translate the value as a pointer, assuming that the szFileName member will be used. Because the thunk compiler cannot make this decision, it cannot generate the correct code to process this union. To handle union types in thunks, declare a structure in the thunk script that is large enough to hold the union, then process the data manually on both sides of the thunk.


Supported and Unsupported Return Values

The thunk compiler does not support all return value types that the C and C++ languages support. This limitation is caused by the problems of translating addresses from 32-bit address spaces to 16-bit address spaces and vice-versa.

The thunk compiler supports returning all integral types. The signed and unsigned varieties of char, short int, and long int are the same size on both sides of a thunk, so they are returned unmodified. Because integers are 32 bits wide in 32-bit code and 16 bits wide in 16-bit code, values are truncated on return from a 16-bit to 32-bit thunk and sign-extended on return from a 32-bit to 16-bit thunk.

You cannot return a structure from either a 32-bit to 16-bit thunk or a 16-bit to 32-bit thunk. However, pointers to structures can be returned from a 32-bit to 16-bit thunk if the structure does not need to be repacked and does not contain pointers. A structure does not require repacking if the types of all members of the structure are the same size in 16-bit and 32-bit code and the structure is packed with the same alignment on both sides of the thunk. Refer to your compiler documentation for information on specifying structure packing.

You cannot return pointers from 16-bit to 32-bit thunks because the context of the 32-bit address space is not global. The 32-bit address space for the 32-bit DLL is mapped between 4 megabytes and 2 gigabytes, and it is context-switched. This means that a 16-bit Windows-based application or DLL could not use a pointer returned by a 16-bit to 32-bit thunk without causing a general protection (GP) fault. To work around this limitation, write a wrapper function for the 16-bit side of the thunk that allocates memory and passes it to the thunk function as an extra parameter. You should also write a wrapper function for the 32-bit side of the thunk to handle the extra parameter, and copy data to the memory allocated by the 16-bit wrapper.

You can return pointers in 32-bit to 16-bit thunks as long as the base type requires the same number of bytes on both sides of the thunk and does not require repacking. If the size of the base type of a pointer differs between the 16-bit and 32-bit sides, the thunk compiler generates an error. For example, a char is 1 byte on both sides of the thunk, so a pointer to a char is a supported return type. However, an int is 16 bits on the 16-bit side of the thunk and 32 bits on the 32-bit side, so a pointer to an int is not a supported return type.

To return a pointer to a data type whose size is different on the 16-bit and 32-bit sides of a 32-bit to16-bit thunk, write a wrapper function that returns the original type, and have the wrapper pass a buffer to the thunk function as an extra parameter. The target side of the thunk should put the return value into this buffer. After the target side of the thunk returns, the wrapper on the calling side should return the data from the buffer.


Supported and Unsupported Calling Conventions

The thunk compiler supports thunk functions that follow these guidelines for calling convention and parameters:

  • Use the __stdcall calling convention on the 32-bit side of the thunk
  • Use the __pascal calling convention on the 16-bit side of the thunk
  • Contain 14 or fewer parameters

If you try to build a thunk that uses an unsupported calling convention, the linker will return the error "unresolved external" because the function names produced by the C/C++ compiler will not match the names produced by the thunk compiler. Although the thunk must use the __pascal and __stdcall calling conventions, the thunk may call or be called by functions that use other calling conventions.

To thunk to a function that uses the __cdecl or __fastcall calling convention, you must create the thunk function with a supported calling convention. Then make the thunk function call the target function.


Behavior of Win32 Functions Inside 16-Bit Processes

When writing applications for Windows 95/98/Me, you typically use 16-bit to 32-bit thunks for implementing callback thunks on 32-bit processes. You can also use them to execute 32-bit code in 16-bit processes. This method can improve performance and multitasking, but significant restrictions apply to 32-bit code executed in the context of a 16-bit process.

  • Win32-based applications use a 1-MB stack. However, 32-bit code executed in the context of a 16-bit process uses the approximately 64K stack reserved by the 16-bit application. The 16-bit application's stack is usually smaller than 64K, because it resides in the default data segment, along with global data, static data, and the local heap.
  • The 16-bit process cannot create new threads. Certain Win32 functions, such as those supporting common dialog boxes or those supporting console applications, create threads on behalf of the calling application. You cannot call these functions in the context of a 16-bit process.
  • The 16-bit process cannot create fibers.
  • No 16-bit application gets processing time while a 16-bit application blocks without yielding. Thunking into 32-bit code releases the 16-bit subsystem to other 32-bit processes, but other 16-bit processes are still blocked unless your process explicitly yields (typically as a result of calling the GetMessage function). In other words, 16-bit applications still multitask cooperatively, even when executing 32-bit code. A common problem occurs if you use the CreateProcess function to launch a 16-bit application, then wait for it to set a synchronization object. If the application does not yield, the child application never runs, so the object is never set to the signaled state, and deadlock occurs.

In general, 32-bit code running in the context of a 16-bit process should be limited to code that uses the 32-bit heap functions, memory-mapped file functions, file functions, and functions involving the current process and thread. You can also use GDI, dialog box, message box, and message functions from 32-bit code running in the context of a 16-bit process. You should avoid using third-party libraries unless you are sure they work safely in a 16-bit environment.


Compatibility with Existing 16-Bit DLLs

There are certain steps you must take to ensure compatibility with existing 16-bit DLLs. Using the win31compat statement in the thunk script causes the unloading of a 32-bit DLL to be deferred until the containing process terminates. Use this statement to ensure that interprocess loading and freeing procedures, which may have worked with the 16-bit DLL when it was called from 16-bit code, will not cause the 32-bit thunk DLL to be freed prematurely. It also allows the 16-bit library to be freed without execution of the 32-bit DLL's notification routine — an occurrence that could cause reentry into 16-bit code.

You must use the win31compat statement if a 16-bit DLL replaces a DLL that is currently used in a Windows version 3.1 environment or if the DLL runs as part of a graphics device interface (GDI) device driver. You might need use this statement even if your 16-bit DLL does not fit into one of these categories, because it provides extra protection from other DLLs that might be used by your thunk DLL.


16- to 32-Bit Thunks and Preemption

Because 16-bit processes multitask cooperatively with respect to each other, 16-bit code is often written with the assumption that it will not be interrupted by another process until it explicitly yields inside the 16-bit scheduler (typically as a result of calling the GetMessage function). In contrast, 32-bit code is written with the expectation that it can be preempted and blocked at any time. A 32-bit application can wait for a synchronization object to be set to the signaled state without impeding the progress of another process. If you mix code written under these different assumptions, you should take care to avoid deadlocks or errors due to unexpected reentrancy.

While a process is executing 32-bit code, it is possible for other processes to enter 16-bit code, possibly reentering the 16-bit code that performed the thunk. That is, entering a 16-bit to 32-bit thunk releases the 16-bit subsystem for use by other processes (under certain conditions noted in the following paragraph). Therefore, you should not use 16-bit to 32-bit thunks if your code cannot be reentered while the thunk code is executing. In addition, you should not use 16-bit to 32-bit thunks inside callback functions passed to a third-party DLL, unless the documentation indicates that the code calling the callback function is reentrant.

If the process executing the thunk is a 32-bit process, any other process can reenter 16-bit code inside a 16-bit to 32-bit thunk. On the other hand, if the process executing the thunk is a 16-bit process, only 32-bit processes can reenter 16-bit code, because 16-bit processes are cooperatively multitasked. Therefore, if your 16-bit code is used only by 16-bit processes, the reentrancy requirement can be relaxed, because other 16-bit processes can be scheduled only if your 16-bit process yields.


16- to 32-Bit Thunks in GDI Device Drivers

In a GDI device driver, you can use only the following control display driver interface (DDI) functions:

  • Control(ABORTDOC)
  • Control(ENDDOC)
  • Control(NEWFRAME)
  • Control(NEXTBAND)
  • Control(STARTDOC)

If you use thunking, your driver must be reentrant. You must also use the following compatibility statement in the thunk script:

win31compat = true;

You can call the OpenJob, StartSpoolPage, EndSpoolPage, CloseJob, and DeleteJob functions during the five listed control DDI calls. These calls are by drivers written for Windows version 3.x to support backward compatibility, but they will not be handled by Windows 95/98/Me–based drivers.


Globally Fixing Handles

Translating a 16:16 pointer to a 0:32 pointer involves determining the segment linear base address for the selector portion of the pointer and adding the offset to it. The 16-bit global memory compactor in Windows 95/98/Me can move a block of memory allocated by 16-bit code at any time, making the linear base address invalid. When the thunk compiler converts pointers from 16:16 to 0:32, it fixes the segment portion of the 16:16 pointer before computing the linear base address. If you translate pointers without using the thunk compiler, however, you must fix the segment portion. For more information about the functions you can use to translate pointers, see Translating 16:16 Pointers.


Late Loading

Windows 95/98/Me improves system performance by supporting late loading for thunk DLLs. In a 16-bit to 32-bit thunk, the system loads the 32-bit DLL when the application calls the first 16-bit to 32-bit thunk. It does not load the 32-bit DLL when the 16-bit DLL is loaded.

Late loading has the following implications:

  • The performance and working set size are improved for 16-bit applications that use only the 16-bit portions of thunk DLLs. These processes do not load the 32-bit DLL.
  • The 16-bit DLL must not depend on any action taken by the 32-bit DLL's initialization code until the application has called at least one 16-bit to 32-bit thunk.
  • The system cannot detect missing 32-bit DLLs or failure to load a 32-bit DLL until the application makes the first call to a 16-bit to 32-bit thunk. If the 32-bit DLL does not load or fails to initialize, the 16-bit to 32-bit thunk call returns a value of zero. You can change this error code on a thunk-by-thunk basis by including the faulterrorcode keyword in the function prototype in the thunk script. For example, the following function instructs the thunk subsystem to return a – 1 from the thunk call if it is the first thunk call and the 32-bit DLL cannot finish loading.
    int Sample(void)
{
    faulterrorcode = -1;
}

Although late loading is a valuable optimization for a 16-bit DLL that can execute autonomously from its 32-bit counterpart, it does complicate error recovery. You can disable late loading by including the following line in the thunk script:

preload32 = true;

If you use this option, the 16-bit subsystem will be released during the loading of your 16-bit DLL, possibly causing other 16-bit code to be reentered. For this reason, the preload32 keyword is not available if your thunk script requires the win31compat keyword. For more information about the win31compat keyword, see Compatibility with Existing 16-Bit DLLs.

Although the thunk compiler supports a preload16 keyword, late loading of 16-bit DLLs is neither currently supported nor planned for a future version of Windows.


Using the Thunk Compiler

The following topics explain the steps required to implement a flat thunk using the thunk compiler:

  • Creating a Thunk Script
  • Compiling Flat Thunks
  • Creating a 16-Bit Thunk DLL
  • Creating a Win32-Based Thunk DLL


Creating a Thunk Script

The thunk compiler takes an input file called a thunk script. Thunk scripts contain C-style type definitions and prototypes of the functions that are to be called through the thunk. Thunk scripts usually have a .THK filename extension.

To create 32-bit to 16-bit thunks, place the following line at the beginning of the thunk script:

enablemapdirect3216 = true;     // Creates 32->16 thunks.

Alternatively, to create 16-bit to 32-bit thunks, place the following line at the beginning of the thunk script:

enablemapdirect1632 = true;     // Creates 16->32 thunks.

If you need to create both types of thunks, you must create two thunk scripts, one for 32-bit to16-bit thunks and the other for 16-bit to 32-bit thunks.

The remainder of the thunk script contains type definitions, followed by prototypes of the thunk functions. For an example of a simple thunk script, suppose we are calling the following 32-bit function from a 16-bit application:

BOOL WINAPI Sample(int n)
{
    // ...
}

The corresponding thunk script would look like this:

enablemapdirect1632=true;

typedef bool BOOL;

BOOL Sample(int n)
{
}


Sample Thunk Scripts

Many functions have pointers in their parameter lists. Some pointers are used for input only, some are used for output only, and some are used for both input and output. For example, the following function takes a pointer to an input string, updates a second string, and produces a third string as output:

BOOL WINAPI ThunkIt(LPSTR lpstrInput, LPSTR lpstrInOut,
    LPSTR lpstrOutput);

The corresponding thunk script for this function follows.

enablemapdirect1632=true;

typedef char *LPSTR;

BOOL ThunkIt(LPSTR lpstrInput, LPSTR lpstrInOut, LPSTR lpstrOutput)
{
    lpstrInput = input;   // Optional, as input is the default.
    lpstrInOut = inout;   // Pointer for input and output.
    lpstrOutput = output; // Pointer for output.
}

The following thunk script uses a nested structure as an input-output parameter:

enablemapdirect1632=true;

typedef unsigned int UINT;
typedef char *LPSTR;

typedef struct _POINT
{
    UINT x;
    UINT y;
} POINT;
typedef POINT *LPPOINT;

typedef struct _CIRCLE
{
    POINT center;
    UINT radius;
} CIRCLE, *LPCIRCLE;

void MyThunk32( LPCIRCLE lpCircleInOut )
{
    lpCircleInOut = inout;
}


Compiling Flat Thunks

Compile your thunk script using the thunk compiler to create an .ASM file containing the flat thunk. The thunk compiler has the following syntax:

thunk [{-|/}options] infile[.ext]

Value | Meaning
? | Displays the help screen.
h | Displays the help screen.
o name | Overrides the default output filename.
p n | Changes the 16-bit structure alignment (default = 2).
P n | Changes the 32-bit structure alignment (default = 4).
t name | Overrides the default base name.
N x name | Specifies the name segment or class, where x is either C32 (for 32-bit code segment name) or C16 (for 16-bit code segment name).

The .ASM file produced by the thunk compiler contains code for both sides of the thunk. The 16-bit code in the .ASM file includes a jump table containing the 16:16 address of each function named in the thunk scripts. The 16-bit linker must be able to resolve these references; the functions must either be implemented in the 16-bit DLL or be imported by the DLL. The 32-bit code in the .ASM file contains a WINAPI function for each thunk, which converts its parameters to 16-bit values, then calls the 16-bit target referenced in the jump table. When a Win32-based application uses a 16-bit function through the thunk, it calls these compiler-generated functions directly.

Assemble the resulting .ASM file to create the 16-bit side of the thunk by defining IS_16. For example, using Microsoft MASM version 6.11, you can use the following command line:

ml /DIS_16 /c /W3 /nologo /Fo thk16.obj 16to32.asm

Assemble the resulting .ASM file to create the 32-bit side of the thunk by defining IS_32. For example, using Microsoft MASM version 6.11, you can use the following command line:

ml /DIS_32 /c /W3 /nologo /Fo thk32.obj 16to32.asm

Create the following declaration for the LineTo function in the thunk script:

typedef bool         BOOL;
typedef unsigned int UINT;
typedef UINT         HANDLE;
typedef HANDLE       HDC;

BOOL LineTo(HDC, int, int)
{
}

When the thunk compiler processes the thunk script, it generates the following 16-bit code:

externDef LineTo:far16

FT_gdiTargetTable label word
    dw    offset LineTo
    dw       seg LineTo

In addition, the thunk compiler generates the following 32-bit code:

public LineTo@12
LineTo@12:
    mov    cl,0
; LineTo(16) = LineTo(32) {}
;
; dword ptr [ebp+8]:  param1
; dword ptr [ebp+12]:  param2
; dword ptr [ebp+16]:  param3
;
public IILineTo@12
IILineTo@12:
    call    QT_Entry
    push    word ptr [ebp+8]     ;param1: dword->word
    push    word ptr [ebp+12]    ;param2: dword->word
    push    word ptr [ebp+16]    ;param3: dword->word
    call    QT_Target_gdi
    movsx   ebx,ax
    jmp     QT_Exit12

When a Win32-based application calls the LineTo function, it is this routine that is executed. The routine builds a 16-bit call frame, calls a local routine requesting the appropriate address in the jump table, and sign-extends the return value. Each component receives its own set of routines (with the QT_ prefix), which automatically use the correct jump table.


Creating a 16-bit Thunk DLL

After you compile the thunk script to create the 16-bit code for the thunk, you must create the 16-bit thunk DLL. To implement the 16-bit thunk DLL, use the following steps.

To implement the 16-bit thunk DLL

  1. Add a function named DllMain to your 16-bit DLL. This function should have the following structure:
    BOOL FAR PASCAL __export DllMain(DWORD dwReason, WORD hInst,
        WORD wDS, WORD wHeapSize, DWORD dwReserved1,
        WORD wReserved2)
{
    if( !(XXX_ThunkConnect16( "DLL16.DLL",  // name of 16-bit DLL
        "DLL32.DLL",                        // name of 32-bit DLL
        hInst, dwReason)) )
    {
        return FALSE;
    }
    return TRUE;
}

    Note that DllMain calls the following function, which was generated by the thunk compiler:

    BOOL FAR PASCAL __export XXX_ThunkConnect16(LPSTR pszDll16,
    LPSTR pszDll32, WORD hInst, DWORD dwReason);

    In this example, XXX is the base name — that is, the name of the thunk script file, not including the path and filename extension. If you used the /t option with the thunk compiler to specify a different base name when you compiled the thunk script, use that base name here.

  2. Add the following statements to your 16-bit DLL's module definition (.DEF) file, choosing ordinals appropriate for your DLL.
    EXPORTS
DllMain             @1 RESIDENTNAME
XXX_ThunkData16     @2 RESIDENTNAME

IMPORTS
C16ThkSL01     = KERNEL.631
ThunkConnect16 = KERNEL.651
  3. Build the DLL. Be sure to link with the 16-bit .OBJ file created from the thunk script. This file contains the code for XXX_ThunkData16, which is a table of function calls the thunk compiler uses to implement the thunks.
  4. Mark the DLL with version 4.0, using the 16-bit resource compiler included with the Platform SDK.
    rc -40 DLL_Name

To ensure that your application works correctly, it is important that you use the following rules when implementing your thunks:

  • The 16-bit DllMain function is called each time the module's usage count is incremented or decremented. The dwReason parameter is 1 when the usage count is incremented and zero when it is decremented.
  • Because the system calls the DllMain function while loading is under way, the value returned by the GetModuleUsage function is not reliable if you call it inside your DllMain function.
  • Do not call thunks inside the DllMain routines. Do not perform operations that reenter the 16-bit loader, yield the 16-bit scheduler, or release the 16-bit subsystem. These actions could cause unpredictable results and are not guaranteed to work in future versions of the thunk compiler.
  • You can have multiple ThunkConnect calls, as long as they connect to the same DLL. In fact, this is the only way to get both 32- to 16-bit and 16-bit to 32-bit thunks from one set of thunk DLLs. The way to do this is to have a thunk script for each direction and link both into each DLL. Then each entry-point function will have two ThunkConnect calls.


Creating a Win32-Based Thunk DLL

After you compile the thunk script to create the 32-bit side of the thunk, you must create the Win32-based thunk DLL. To implement the Win32-based thunk DLL, use the following steps:

To implement the Win32-based thunk DLL

  1. Add the entry-point function to your 32-bit DLL's entry-point function (named DllMain by default). This function must call the following function created by the thunk compiler:
    BOOL WINAPI XXX_ThunkConnect32(LPSTR pszDll16, LPSTR pszDll32,
    DWORD hInst, DWORD dwReason);

    Here is an example of a DLL entry-point function calling XXX_ThunkConnect32:

    BOOL WINAPI DllMain(DWORD hInst, DWORD dwReason,
    DWORD dwReserved)
{
    if( !(XXX_ThunkConnect32( "DLL16.DLL",  // name of 16-bit DLL
        "DLL32.DLL",                        // name of 32-bit DLL
        hInst, dwReason)) )
    {
        return FALSE;
    }
    // Process dwReason.

    Return TRUE;
}
  2. Add the following export statement to your 32-bit DLL's .DEF file.
    EXPORTS
XXX_ThunkData32
  3. Export the function to which you are thunking.
  4. Build the DLL. Be sure to link with the 32-bit .OBJ file created from the thunk script and THUNK32.LIB. The 32-bit .OBJ file contains the code for XXX_ThunkData32, which is a table of function calls that the thunk compiler uses to implement the thunks.


Troubleshooting Flat Thunks

Debugging flat thunks generated by the thunk compiler can be difficult because the thunk mechanism is complex, and debugging tools capable of tracing through thunks are difficult to use. The following topics present an overall strategy for debugging flat thunks, several specific debugging techniques, and suggestions for how to solve many common thunking problems.

  • Limitations on What a Target DLL Can Do
  • Difficulties in Debugging Flat Thunks
  • Strategy For Debugging Thunks
  • Preliminary Thunk Debugging Checklist
  • Testing the Thunk
  • Common Thunking Problems


Limitations on What a Target DLL Can Do

Before debugging your thunks, keep in mind that there are some limitations on what a target DLL can do from code executed through a thunk. Common specific limitations include:

  • You cannot create threads inside a thunk from a 16-bit Windows-based application to a Win32-based DLL.
  • The code inside Win32-based DLLs called by thunks should require little stack space because the calling 16-bit processes have much smaller stacks than do 32-bit processes.
  • 16-bit DLLs that contain interrupt service routines (ISRs) must not thunk to Win32-based DLLs while handling interrupts.
  • Win32-based applications must not pass pointers to data located on the stack as parameters of thunks; nor can they call 16-bit DLLs that switch stacks.


Difficulties in Debugging Flat Thunks

Debugging flat thunks is difficult not only because the mechanism itself is complex, but also because the necessary debugging tools are difficult to master. The flat-thunk mechanism is complex because it must transform function calls in 32-bit compiled code into calls compatible with 16-bit code and vice versa. Because 32-bit code uses data types and CPU register sets that are different than those used with 16-bit code, the flat-thunk mechanism must translate function parameters, switch stacks, and translate return values. The flat-thunk mechanism is optimized for speed, yet must allow preemptive 32-bit code to call nonpreemptive 16-bit code. The thunk compiler makes creating flat thunks much easier than manually creating them, but it is not foolproof.

To debug flat thunks, you must use a system-level debugger, rather than the application-level debugger you would generally use. Application-level debuggers such as the Microsoft Visual C++ debugger and WinDBG cannot trace through thunks because they consist of both 32-bit and 16-bit code and cause the system to claim or release the Win16Mutex. To trace through a thunk, you need to use a system-level debugger such as WDEB386.EXE. Using WDEB386.EXE is more complicated than using an application-level debugger, because you must know Intel x86 assembly language, know how Intel x86 microprocessors work, and remember many debugger commands.


Debugging Strategy

Platform SDK: Win32 API

Strategy For Debugging Thunks

The best strategy for debugging thunks is to divide the task into small, manageable tests. This approach is relatively easy and can eliminate most problems, without requiring advanced debugging techniques, such as tracing through assembly language code in a system-level debugger. Flat thunks consist of a Win32-based DLL and a 16-bit DLL, so it is possible to test each of these in isolation before testing them together. Create a 16-bit Windows-based application to test the 16-bit DLL, and create a Win32-based application to test the Win32-based DLL. Doing so allows you to use a wide variety of debugging tools to verify that each side works properly.


Preliminary Checklist

Platform SDK: Win32 API

Preliminary Thunk Debugging Checklist

After you have verified that each side works correctly, the next step is to put the two sides together to test the thunk itself. However, before you compile the thunk using the thunk compiler, use the following checklist to verify that you created the thunks correctly:

  1. In your thunk script, make sure each function has the correct number and types of parameters. Also make sure that the thunk compiler supports the parameter types. If it does not, you will have to pass the data using a supported type.
  2. If you pass any structures as parameters, make sure you use the same structure packing in your Win32-based DLL, 16-bit DLL, and thunk script. You set structure packing in your C/C++ compiler's command line, and in the thunk compiler command line. Note that the thunk compiler's packing switch is lowercase for the 16-bit side, and uppercase for the 32-bit side.
  3. Make sure the functions you are thunking to are exported correctly, and use the PASCAL calling convention if they are 16-bit functions. Use WINAPI if they are 32-bit functions. The thunk compiler does not support the _cdecl and __fastcall calling conventions.
  4. Make sure your Win32-based DLL calls XXX_ThunkConnect32 each time its DllMain function is called. Likewise, make sure the 16-bit DLL has an exported DllMain function, separate from its LibMain function, that calls XXX_ThunkConnect16 and returns TRUE if ThunkConnect16 succeeds.
  5. Make sure that the value specified in the thunk compiler's -t option is the same for both thunk DLLs. The value must also correspond to the prefix of the ThunkConnect calls in your 16-bit and Win32-based DLLs.
  6. Verify that the 16-bit DLL has DLLMain and XXX_ThunkData16 exported with the RESIDENTNAME keyword in its module definition (.DEF) file. Without the RESIDENTNAME keyword, the XXX_ThunkConnect32 or XXX_ThunkConnect16 call fails and the DLLs are not loaded.
  7. Verify in your 16-bit DLL's makefile that the resource compiler is marking the DLL as version 4.0. If the DLL is marked with a version number earlier than 4.0, it will not load and the thunk will fail.
  8. If your 32-bit to 16-bit thunk function returns a pointer, make sure the base type is the same size on both the 16-bit and 32-bit sides of the thunk. If the size of the base type is different, the thunk compiler issues an error message stating, "Cannot return pointers to non-identical types." One way to work around this problem is to return a pointer to a different, but compatible, data type. For example, a thunk cannot return a pointer to an integer because an integer is 2 bytes on the 16-bit side, but 4 bytes on the 32-bit side. In the thunk script and the source code, change the return type from a pointer to an integer to a pointer to a long.

    If you write a 16-bit to 32-bit thunk that returns a pointer, the thunk compiler issues an error message stating, "Pointer types may not be returned." The thunk compiler does not allow 16-bit to 32-bit thunks to return pointer types because after the thunk returns from the 32-bit function, the pointer does not point to data in the correct Win32-based process address space. This is because all Win32-based processes use the same range of addresses and are preemptively context-switched.

  9. If the linker reports an "unresolved external" error, first check to make sure the symbol is a function name that is spelled consistently throughout all source code, module definition files, and the thunk script. Next, make sure all occurrences of its prototype are consistent. On the 32-bit side, declare the thunk function with WINAPI; on the 16-bit side, declare the function with the PASCAL type. With C++ projects, be sure to declare and define both sides of the thunk function with the extern "C" linkage specifier, in addition to the WINAPI or PASCAL type.


Testing the Thunk

After you complete the preliminary checklist provided in the previous topic, build your thunk DLLs and try to run them. If they run, continue with further testing to make sure they work as expected. If the DLLs do not run, use the following troubleshooting guide to determine and fix the cause of the problem.

If XXX_ThunkConnect16 or XXX_ThunkConnect32 fails, perform the following tasks:

  1. Run the debugging versions of the system DLLs. The debugging versions of KERNEL32.DLL and KRNL386.EXE contain many diagnostic messages to indicate why the thunk did not initialize. To run the debugging versions of the system DLLs, use the Switch to Debug DLLs icon in the SDK program group. Use Switch to Non-debugging DLLs to switch back to the retail version.
  2. Verify that the 16-bit DLL has a call to XXX_ThunkConnect16 and that the Win32-based DLL has a corresponding call to XXX_ThunkConnect32. If one of these is missing, the other will fail, and the thunk DLLs will fail to load.
  3. Put breakpoints in your Win32 DLL's DllMain, and in your 16-bit DLL's DllMain and LibMain functions to see which DLLs are not loading.

If your XXX_ThunkConnect16 and XXX_ThunkConnect32 calls are working properly, but the thunk still does not work, it is time to simplify your thunk. You can do this by removing parameters from the thunk one by one, recompiling, and testing. If you determine that a parameter is causing the failure, make sure it is the right type and that the function is declared and defined with the same number and types of parameters in both DLLs and the in the thunk script. Alternatively, you can create a simple thunk that works, and build it up until it fails by following these steps:

  1. Create a simple thunk and execute it just to make sure the thunk mechanism is set up correctly. A good choice for a simple thunk is a function with no return value and no parameters. If even the simple thunk does not work, run through the preliminary checklist in the previous topic to make sure the thunk is set up correctly. Then proceed with step 2.
  2. Check to make sure the target DLL and any DLLs it relies on can be found and loaded. If one is missing, or the loader cannot find it, the thunk will not work.
  3. Make sure your target DLL is not trying to do something that it cannot do in the context of a thunk. For more information, see Behavior of Win32 Functions Inside 16-Bit Processes.

After you have a simplified thunk that works, but the original thunk still does not work, check for the following symptoms:

  1. If your target DLL is a 16-bit DLL and it cannot access its global or static data, make sure you have exported the function correctly. If you use the /GD option with Visual C++, you must declare and define the function with the __export keyword in the 16-bit DLL's source code. Just listing the function's name in the DLL's module definition (.DEF) file is not enough. The compiler does not process the .DEF file, so it will not generate the prolog and epilog code that exported functions require.
  2. If calls to LocalAlloc in your target 16-bit DLL cause general protection (GP) faults, make sure your function is exported as described in step 1.
  3. If you get a GP fault in KERNEL32 just after your target 16-bit function returns, make sure the target function is declared and defined as PASCAL. You can not use the C calling convention. Although uncommon in C or C++ code, make sure the target function did not modify the DS, ES, FS, SS, EBP, EBX, ESI, or EDI registers. C or C++ code should not cause the registers to be modified, but check assembly-language code carefully.
  4. If you get a GP fault in your 32-bit thunk DLL or KERNEL32 immediately after your Win32-based target function returns, make sure the target function is declared with WINAPI and that it didn't modify the DS, ES, FS, SS, EBP, EBX, ESI, or EDI registers. C or C++ code should not cause the registers to be modified, but check assembly-language code carefully.
  5. If your 16-bit target function returns to an invalid location, make sure it is declared and defined as FAR. This is especially important for small-model DLLs; functions in medium- and large-model DLLs are FAR by default.
  6. If you experience a GP fault in a 16-bit function when you access more than 64K of data from a pointer passed as a parameter (that is, a translated pointer), you need to allocate an array of tiled selectors. This is described in the following article in the Microsoft Knowledge Base:

    ARTICLE-ID: Q132005
    TITLE: AllocSelector & FreeSelector Documentation Incomplete

    On the 16-bit side, thunked pointers always consist of a single selector with a limit of 64K, which means you cannot use them as huge pointers. The entire original range of data that the pointer addresses is accessible to the 16-bit target DLL. However, this is true only if the DLL creates an array of tiled selectors to reference it, and if it uses huge pointer variables to access the data.

The following are additional debugging tips:

  1. Make sure you use only a translated pointer in the context of the thunk. Selectors allocated by the thunk compiler for use by 16-bit targets are freed as soon as the thunk returns.
  2. Put breakpoints at the beginning of your target functions to make sure they are being executed. If they are, and you have debugged the target side independently of the thunk, and the error is caused inside the target DLL, it is possible that the target is doing something that cannot be done in a thunk, or referencing memory that does not exist. See steps 7 and 8.


Common Problems

Platform SDK: Win32 API

Common Thunking Problems

This topic describes two common problems that can occur when thunking is implemented, and describes their likely causes.

  • The 32-bit DLL will not load.

    The Windows 95/98/Me loader requires that the 16-bit DLL be marked with version 4.0 or later. In addition, you must mark DllMain with the RESIDENTNAME modifier.

    To check the version number, run the Microsoft EXE File Header Utility (EXEHDR), using the following command line:

    exehdr -v <your-16-bit-DLL>

    The output should contain the following line:

    Operating system: Microsoft Windows - version 4.0

    If the version number is earlier than 4.0, you should use RC.EXE from the Platform SDK to set the version of your 16-bit DLL correctly.

  • Loading the 16-bit DLL does not load the 32-bit DLL.

    This is by design. A 32-bit DLL does not load into a process context until that process calls its first 16-bit to 32-bit thunk. For more information, see Late Loading.

    If this feature is incompatible with your DLL design, you may disable it by including the following line in your thunk script.

    preload32 = true;


Virtual Machine Services

This overview describes the virtual machine services and shows how to use them in MS-DOS – based applications.

  • About Virtual Machine Services
  • Virtual Machine Services Reference


About Virtual Machine Services

Virtual machine services allow Microsoft® MS-DOS® – based applications to take advantage of features provided by Microsoft® Windows® 95/98 when the applications run in a window. MS-DOS – based applications can retrieve and, optionally, set the title of the window in which they run.

  • Window Title
  • Close-Aware Applications


Window Title

The window title for an MS-DOS – based application, which is displayed when the application runs in a window, identifies the application and its operating state. The operating system sets the title when an application first starts, but the application can change portions of the title to better communicate its state to the user.

The window title consists of three strings: a virtual machine state, a virtual machine title, and an application title. The system creates the window title by concatenating the three strings, separating the strings with a system-defined separator, typically a hyphen.

The virtual machine state, which can be set by the operating system only, identifies whether the virtual machine is inactive or whether the user is carrying out tasks, such as cut and paste operations. The state is frequently an empty string. The virtual machine title and the application title, which can be set by an application, identify the application and the current document or activity of the application, respectively.

By default, the operating system sets the virtual machine title to the title stored in the corresponding .PIF file or to a title specified by the shell. You can determine the current virtual machine title by using the Get Virtual Machine Title function. You can change the title by using the Set Virtual Machine Title function.

The system typically sets the application title to the name of the application, so the virtual machine title and application title are frequently the same when the application first starts. Many applications change this title to the name of the current document or to an empty string if there is no current document. You can determine the current application title by using the Get Application Title function. You can change the title by using the Set Application Title function.

If you set the virtual machine title or application title, the length of the individual titles must not exceed 30 and 80 characters, respectively.

You can call the window title functions at any time. Furthermore, you can call these functions regardless of whether your application is running with the Windows 95/98/Me or MS-DOS operating system. However, not all operating systems support these calls. The functions are not supported if a call to a function leaves the AX register unchanged.


Close-Aware Applications

A close-aware application is any MS-DOS – based application that periodically checks the state of an internal close flag and terminates if the flag is set. Windows 95/98/Me sets this flag when the user chooses the Close command from the system menu of the window in which the MS-DOS – based application runs. Close-aware applications enable the Close command, which gives the user an alternate way to exit the application and close the window.

An application enables or disables the Close command by using the Enable or Disable Close Command function. The function takes a flag indicating whether to enable or disable the command. Once the command is enabled, the application must periodically check the close flag by using the Query Close function. The function returns zero in the AX register if the user has chosen the command.

If the Query Close function returns zero in AX, the application should call the Acknowledge Close function to acknowledge the close state of the internal close flag. After the application acknowledges the close state, subsequent calls to the Query Close function will return 1 in AX, indicating that the user has chosen the Close command and the close state has been acknowledged. After acknowledging the close state, an application should take all necessary steps to shut down and eventually exit, or it should cancel the close operation by calling the Cancel Close function.

An application should acknowledge the close state if it needs to perform additional keyboard input before exiting. When the close state has been signaled but has not yet been acknowledged by the application, all keyboard reads will return NULL and buffered line input will return an empty string.

After an application acknowledges the close state, the state reverts to unacknowledged if the application either exits or cancels the close operation. If the application acknowledges the close state and then exits, the parent process will be in an unacknowledged close state. The application must then acknowledge the close state to perform additional keyboard input before exiting or canceling the close operation.

For example, if a text editor receives a positive response from the Query Close function and has some buffers that have not been saved, it should call Acknowledge Close and ask the user if the buffers should be saved with these possible responses: "Yes," "No," or "Cancel."

If the user responds "Yes" or "No," the text editor should save (or not save if the response was "No") the buffers and then exit. The close state remains active, and the parent process (probably the command interpreter) will also receive a positive response from Query Close and will also terminate.

If the response is "Cancel," the application should call the Cancel Close function and not exit. Canceling the close operation informs the system that any attempted shutdown should be abandoned.

This sequence of operations is analogous to the way that Windows-based applications handle the WM_QUERYENDSESSION message.

Depending on the tasking option chosen for the application, there may be some time between when the user chooses the Close command and the application checks the internal close flag. During this time, the system changes the window title of the application, appending the word "Closing" to it, and gives the user the opportunity to cancel the command by changing the command name to Cancel Close. If the user chooses the Cancel Close command, the close flag is reset, preventing the application from closing. If a close-aware application fails to check the close flag within a system-defined amount of time, the system automatically abandons the operation and resets the close flag.

The system tracks the close-awareness and close state for each process. For the virtual machine to close, all applications in the virtual machine must close. When the user chooses the Close command, the operating system detects applications that are not close-aware and displays a dialog box with a warning message, but gives the user the option of forcing the application to exit anyway. If you make an application close-aware, it can shut down cleanly.


Virtual Machine Services Reference

The following functions are used with virtual machine services.

  • Window Title Functions
  • Close-Aware Application Functions


Window Title Functions

The following window title functions are used with virtual machine services:

Get Application Title
Get Virtual Machine Title
Set Application Title
Set Virtual Machine Title


Close-Aware Application Functions

The following close-aware application functions are used with virtual machine services:

Acknowledge Close
Cancel Close
Enable or Disable Close Command
Query Close


Windows 95/98/Me Service Control Manager

Microsoft® Windows NT®/Windows® 2000 supports an application type known as a service. A service may be started in two ways: automatically, when the system starts up; or upon demand, by applications that use the functions provided by the Service Control Manager. For more information, see Services.

The Windows NT/Windows 2000 Service Control Manager and its associated functions are not supported by Windows 95/98/Me. Instead, Windows 95/98/Me provides a scaled-down Service Control Manager. For more information, see the following topics:

  • About the Windows 95/98/Me SCM
  • Windows 95/98/Me SCM Reference


About the Windows 95/98/Me SCM

The Windows 95/98/Me Service Control Manager (SCM) uses two registry keys to allow applications to start at system startup. It uses one function to allow an application to continue to run after the user logs off.

  • The RunServices and RunServicesOnce Keys
  • The RegisterServiceProcess Function


The RunServices and RunServicesOnce Keys

During system startup, the SCM starts the applications listed under the following registry keys: RunServices and RunServicesOnce. These keys are located in the following registry locations:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion

You can use any unique value name for each application. For the value data, use a string that represents the command line the SCM will use to start the application. Following is an example of a RunServices list that contains entries for three applications:

MyApp1="myapp1.exe"
MyApp2="myapp2.exe" param1 param2
MyApp3="c:\mydir\myapp3.exe"

The system deletes values under the key RunServicesOnce after the application starts.

These applications start before the user logs on. Specifically, the applications under HKEY_LOCAL_MACHINE are run before the desktop is created, and the applications under HKEY_CURRENT_USER are run after the desktop is created. In either case, the user is not yet validated, and the applications cannot assume that networking permissions are enabled. Until the user logs on, the application does not have access to network resources that the user has access to.


The RegisterServiceProcess Function

Applications started by the system using the RunServices and RunServicesOnce keys will close when the user selects Close all programs and log on as a different user from the Shutdown dialog box. By calling the RegisterServiceProcess function, a Win32-based application can prevent itself or any other Win32-based application from being closed when the user logs off. Win32-based applications registered in this manner close only when the system is shut down.

The application should provide for different users logging on at different times during its execution. The application can distinguish between a user logging off and the system shutting down by examining the lParam parameter of the WM_QUERYENDSESSION and WM_ENDSESSION messages. If the user shuts down the system, lParam is NULL. If the user logs off, lParam is set to ENDSESSION_LOGOFF.


Windows 95/98/Me SCM Reference

The following function is supported by the Windows 95/98/Me SCM.

RegisterServiceProcess


Windows 95/98/Me Reference

The following elements are supported by Windows 95/98/Me.

  • Windows 95/98/Me Functions
  • Windows 95/98/Me Structures
  • Windows 95/98/Me Control Codes
  • FAT32 API Reference


Windows 95/98/Me Functions

The following functions are supported on Windows 95/98/Me.

Acknowledge Close
Cancel Close
Enable or Disable Close Command
Get Application Title
Get Virtual Machine Title
Interrupt 21h Function 4302h
Interrupt 21h Function 440DH Minor Code 48h
Interrupt 21h Function 440DH Minor Code 49h
Interrupt 21h Function 440DH Minor Code 4Ah
Interrupt 21h Function 440DH Minor Code 4Bh
Interrupt 21h Function 440DH Minor Code 6Ah
Interrupt 21h Function 440DH Minor Code 6Bh
Interrupt 21h Function 440DH Minor Code 6Ch
Interrupt 21h Function 440DH Minor Code 6Dh
Interrupt 21h Function 440DH Minor Code 6Eh
Interrupt 21h Function 440DH Minor Code 6Fh
Interrupt 21h Function 440DH Minor Code 70h
Interrupt 21h Function 440DH Minor Code 71h
Interrupt 21h Function 5704h
Interrupt 21h Function 5705h
Interrupt 21h Function 5706h
Interrupt 21h Function 5707h
Interrupt 21h Function 6Ch
Interrupt 21h Function 710Dh
Interrupt 21h Function 7139h
Interrupt 21h Function 713Ah
Interrupt 21h Function 713Bh
Interrupt 21h Function 7141h
Interrupt 21h Function 7143h
Interrupt 21h Function 7147h
Interrupt 21h Function 714Eh
Interrupt 21h Function 714Fh
Interrupt 21h Function 7156h
Interrupt 21h Function 7160h Minor Code 0h
Interrupt 21h Function 7160h Minor Code 1h
Interrupt 21h Function 7160h Minor Code 2h
Interrupt 21h Function 716Ch
Interrupt 21h Function 71A0h
Interrupt 21h Function 71A1h
Interrupt 21h Function 71A6h
Interrupt 21h Function 71A7h Minor Code 0h
Interrupt 21h Function 71A7h Minor Code 1h
Interrupt 21h Function 71A8h
Interrupt 21h Function 71A9h
Interrupt 21h Function 71AAh Minor Code 0h
Interrupt 21h Function 71AAh Minor Code 1h
Interrupt 21h Function 71AAh Minor Code 2h
Query Close
RegisterServiceProcess
Set Application Title
Set Virtual Machine Title


Acknowledge Close

Acknowledges the close state of the internal close flag.

mov ah, 16h    ; Windows multiplex function
mov al, 8Fh    ; VM Close
mov dh, 2      ; Acknowledge Close
mov dl, 0      ; always 0
int 2Fh
or ax, ax
jz success

Return Values

Returns zero in the AX register if successful.

Remarks

Acknowledging the close state is necessary if an application needs to perform additional keyboard input before exiting. If the close state has been signaled but not yet acknowledged by an application, all keyboard read operations will return NULL and buffered line input will return an empty string.


Cancel Close

Cancels the close operation.

mov ah, 16h    ; Windows multiplex function
mov al, 8Fh    ; VM Close
mov dh, 3      ; Cancel Close
mov dl, 0      ; always 0
int 2Fh
or ax, ax
jz success

Return Values

Returns zero in the AX register if successful.

Remarks

After acknowledging the close state of the internal close flag, an application should either exit or cancel the close operation by calling Cancel Close.


Enable or Disable Close Command

Enables or disables the Close command in the system menu.

mov ah, 16h    ; Windows multiplex function
mov al, 8Fh    ; VM Close
mov dh, 0      ; Enable or Disable Close Command
mov dl, Flags  ; see below
int 2Fh
or ax, ax
jz success

Parameters

Flags
Close flags. This parameter can be one of these values:
Value | Description
00h | Disables the Close command.
01h | Enables the Close command.

Return Values

Returns zero in the AX register if successful.


Get Application Title

Copies the application title to the specified buffer.

mov  ah, 16h           ; Windows multiplex function
mov  al, 8Eh           ; VM Title
mov  di, seg AppTitle  ; see below
mov  es, di
mov  di, offset AppTitle
mov  cx, Size          ; see below
mov  dx, 2             ; Get Application Title
int  2Fh
cmp  ax, 1
je   success

Parameters

AppTitle
Pointer to a buffer that receives the application title. This parameter must not be zero.
Size
Size, in bytes, of the buffer pointed to by AppTitle.

Return Values

Returns 1 in the AX register if successful or zero otherwise.

Remarks

Get Application Title copies as much of the title as possible, but never more than the specified number of bytes. The function always appends a terminating null character to the title in the buffer.


Get Virtual Machine Title

Copies the virtual machine title to the specified buffer.

mov  ah, 16h           ; Windows multiplex function
mov  al, 8Eh           ; VM Title
mov  di, seg VMTitle   ; see below
mov  es, di
mov  di, offset VMTitle
mov  cx, Size          ; see below
mov  dx, 3             ; Get Virtual Machine Title
int  2Fh
cmp  ax, 1
je   success

Parameters

VMTitle
Pointer to a buffer that receives the virtual machine title. This parameter must not be zero.
Size
Size, in bytes, of the buffer pointed to by VMTitle.

Return Values

Returns 1 in the AX register if successful or zero otherwise.

Remarks

Get Virtual Machine Title copies as much of the title as possible, but never more than the specified number of bytes. The function always appends a terminating null character to the title in the buffer.


Interrupt 21h Function 4302h

Obtains the compressed size, in bytes, of a given file or directory.

mov ax, 4302h            ; Get Compressed File Size
mov dx, seg PathName     ; see below
mov ds, dx
mov dx, offset PathName
int 21h

jc error

Parameters

PathName
Pointer to a null-terminated string that specifies the file or directory to retrieve the file size for.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The function obtains the actual number of bytes of disk storage used to store the file. If the file is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size of the specified file. If the file is not located on a volume that supports compression or if the file is not compressed, the value obtained is the file size, in bytes, rounded up to the nearest cluster boundary.


Interrupt 21h Function 440Dh Minor Code 48h

Locks or unlocks the volume in the given drive (preventing or permitting its removal) or returns the locked status of the given drive.

mov ax, 440Dh           ; generic IOCTL
mov bx, DriveNum        ; see below
mov ch, 8               ; device category
mov cl, 48h             ; Lock or Unlock Removable Media
mov dx, seg ParamBlock  ; see below
mov ds, dx
mov dx, offset ParamBlock
int 21h

jc  error

Parameters

DriveNum
Drive to lock or unlock. This parameter can be 0 for default drive, 1 for A, 2 for B, and so on.
ParamBlock
Pointer to a PARAMBLOCK structure that specifies the operation to carry out and receives a count of the number of locks on the drive.

Return Values

Clears the carry flag and copies the number of pending locks on the given drive to the NumLocks member of the PARAMBLOCK structure if successful. Otherwise, the function sets the carry flag and sets the AX register to one of the following error values.

Value | Meaning
01h | The function is not supported.
B0h | The volume is not locked in the drive.
B2h | The volume is not removable.
B4h | The lock count has been exceeded.


Interrupt 21h Function 440Dh Minor Code 49h

Ejects the specified media.

mov ax, 440Dh     ; generic IOCTL
mov bx, DriveNum  ; see below
mov ch, 8         ; device category
mov cl, 49h       ; Eject Removable Media
int 21h

jc  error

Parameters

DriveNum
Drive to eject. This parameter can be 0 for default drive, 1 for A, 2 for B, and so on.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to one of the following error values.

Value | Meaning
01h | The function is not supported.
B1h | The volume is locked in the drive.
B2h | The volume is not removable.
B5h | The valid eject request has failed.

Remarks

If a given physical drive has more than one logical volume, all volumes must be unlocked by using Lock/Unlock Removable Media (Interrupt 21h Function 440Dh Minor Code 48h) before the drive will eject.


Interrupt 21h Function 440Dh Minor Code 4Ah

Locks the logical volume.

mov ax, 440Dh        ; generic IOCTL
mov bh, LockLevel    ; see below
mov bl, DriveNum     ; see below
mov ch, 08h          ; device category (must be 08h)
mov cl, 4Ah          ; Lock Logical Volume
mov dx, Permissions  ; see below
int 21h

jc error

Parameters

LockLevel
Level of the lock. This parameter must be either 0, 1, 2, or 3.
DriveNum
Drive to lock. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
Permissions
Operations that the system permits while the volume is locked. This parameter is specified only when a level 1 lock is obtained or when a level 0 lock is obtained for the second time for formatting the volume. For other lock levels, this parameter is zero. When a level 1 lock is obtained, bits 0 and 1 of this parameter specify whether the system permits write operations, new file mappings, or both by other processes during a level 1 lock as well as during level 2 and 3 locks. If this parameter specifies that write operations, new file mappings, or both are failed, these operations are failed during level 1, 2, and 3 locks. This parameter has the following form:
Bit | Meaning
0 | 0 = Write operations are failed (specified when a level 1 lock is obtained).
0 | 1 = Write operations are allowed (specified when a level 1 lock is obtained).
1 | 0 = New file mapping are allowed (specified when a level 1 lock is obtained).
1 | 1 = New file mapping are failed (specified when a level 1 lock is obtained).
2 | 1 = The volume is locked for formatting (specified when a level 0 lock is obtained for the second time).

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The volume must be locked before the application performs direct disk write operations by using Interrupt 26h or the IOCTL control functions. Lock Physical Volume (Interrupt 21h Function 440Dh Minor Code 4Bh) is used instead of this function before a call to an Interrupt 13h function. Unlock Logical Volume (Interrupt 21h Function 440Dh Minor Code 6Ah) should be used to release the lock.


Interrupt 21h Function 440Dh Minor Code 4Bh

Locks the physical volume.

mov ax, 440Dh        ; generic IOCTL
mov bh, LockLevel    ; see below
mov bl, DriveNum     ; see below
mov ch, 08h          ; device category (must be 08h)
mov cl, 4Bh          ; Lock Physical Volume
mov dx, Permissions  ; see below
int 21h

jc error

Parameters

LockLevel
Level of the lock. This parameter must be either 0, 1, 2, or 3.
DriveNum
Drive to lock. This parameter must be one of the following values (same device unit numbers as for Interrupt 13h).
Value | Meaning
00 - 7Fh | Floppy disk drive (00 for the first floppy drive, 01 for the second, and so on).
80 - FFh | Hard disk drive (80 for the first hard disk drive, 81 for the second, and so on).

Permissions
Operations that the system permits while the volume is locked. This parameter is specified only when a level 1 lock is obtained or when a level 0 lock is obtained for the second time for formatting the volume. For other lock levels, this parameter is zero. When a level 1 lock is obtained, bits 0 and 1 of this parameter specify whether the system permits write operations, new file mappings, or both by other processes during a level 1 lock as well as during level 2 and 3 locks. If this parameter specifies that write operations, new file mappings, or both are failed, these operations are failed during level 1, 2, and 3 locks. This parameter has the following form.
Bit | Meaning
0 | 0 = Write operations are failed (specified when a level 1 lock is obtained).
0 | 1 = Write operations are allowed (specified when a level 1 lock is obtained).
1 | 0 = New file mapping are allowed (specified when a level 1 lock is obtained).
1 | 1 = New file mapping are failed (specified when a level 1 lock is obtained).
2 | 1 = The volume is locked for formatting (specified when a level 0 lock is obtained for the second time).

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The volume must be locked before the application performs direct disk write operations by using Interrupt 13h, Interrupt 26h, or the Interrupt 21h IOCTL functions. A single physical volume may be divided into more than one logical volume, which is also called a partition. The system automatically takes a logical volume lock on all logical volumes on the specified physical drive. If the application performs disk writes only to a logical drive, Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah) is used instead of this function. Unlock Physical Volume (Interrupt 21h Function 440Dh Minor Code 6Bh) should be called to release the lock.


Interrupt 21h Function 440Dh Minor Code 6Ah

Unlocks the logical volume or decrements the lock level.

mov ax, 440Dh      ; generic IOCTL
mov bl, DriveNum   ; see below
mov ch, 08h        ; device category (must be 08h)
mov cl, 6Ah        ; Unlock Logical Volume
int 21h

jc error
s

Parameters

DriveNum
Drive to unlock. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

This function is used to release the lock obtained by using Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah). Only the lock owner can release the lock on a volume.

To release the lock on the volume, an application must call Unlock Logical Volume the same number of times that Lock Logical Volume was called.


Interrupt 21h Function 440Dh Minor Code 6Bh

Unlocks the physical volume or decrements the lock level.

mov ax, 440Dh      ; generic IOCTL
mov bl, DriveNum   ; see below
mov ch, 08h        ; device category (must be 08h)
mov cl, 6Bh        ; Unlock Physical Volume
int 21h

jc enter

Parameters

DriveNum
Drive to unlock. This parameter must be one of the following values (same device unit numbers as for Interrupt 13h).
Value | Meaning
00 - 7Fh | Floppy disk drive (00 for the first floppy drive, 01 for the second, and so on).
80 - FFh | Hard disk drive (80 for the first hard disk drive, 81 for the second, and so on).

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

This function is used to release the lock obtained by using Lock Physical Volume (Interrupt 21h Function 440Dh Minor Code 4Bh). Only the lock owner can release the lock on a volume.

To release the lock on the volume, an application must call Unlock Physical Volume the same number of times that Lock Physical Volume was called.


Interrupt 21h Function 440Dh Minor Code 6Ch

Polls the state of the access flag on a volume to determine if a write operation (for example, deleting or renaming a file or writing to a file) or a new file mapping has occurred since the last poll.

mov ax, 440Dh        ; generic IOCTL
mov bl, DriveNum     ; see below
mov ch, 08h          ; device category (must be 08h)
mov cl, 6Ch          ; Get Lock Flag State
int 21h

jc error
mov [AccessFlag], ax  ; state of access flag

Parameters

DriveNum
Drive to poll. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.

Return Values

Clears the carry flag and sets the AX register to one of the following values if successful.

Value | Meaning
0 | No write operations or file mappings have occurred since the last poll.
1 | A write operation has occurred since the last poll (clears the volume access flag).
2 | A file mapping has occurred since the last poll, or a 32-bit Windows-based DLL or executable has been opened (clears the volume access flag).

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Only the current lock owner may poll the access flag. The system fails other processes with ERROR_ACCESS_DENIED error value. Write operations performed by the lock owner do not cause a change in the state of the access flag.

When a lock is obtained that allows write operations or new file mappings, the system sets a flag whenever one of these operations happens on the volume. If a write operation or new file mapping has occurred since the last poll, Get Lock Flag State returns 1 or 2 respectively in the AX register and clears the volume access flag. If the swap file has grown or shrunk since the last poll, Get Lock Flag State returns 1. Note that write operations to the swap file that do not cause a change in size do not cause a change in the state of the access flag. If a 32-bit Windows-based DLL or executable has been opened since the last poll, Get Lock Flag State returns 2.


Interrupt 21h Function 440Dh Minor Code 6Dh

Enumerates open files on the specified drive.

mov ax, 440Dh           ; generic IOCTL
mov bx, DriveNum        ; see below
mov ch, 08h             ; device category (must be 08h)
mov cl, 6Dh             ; Enumerate Open Files
mov dx, seg PathBuf     ; see below
mov ds, dx
mov dx, offset PathBuf
mov si, FileIndex       ; see below
mov di, EnumType        ; see below
int 21h

jc  error
mov [OpenMode], ax      ; mode file was opened in
mov [FileType], cx      ; normal file or memory-mapped file

Parameters

DriveNum
Drive on which to enumerate the files. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
PathBuf
Pointer to a buffer that receives the path of the open file. The length of the buffer varies depending on the volume. Get Volume Information (Interrupt 21h Function 71A0h) is used to determine the maximum allowed length of a path for the volume.
FileIndex
Index of the file to retrieve the path for.
EnumType
Kind of file to enumerate. This parameter can be 0 to enumerate all open files or 1 to enumerate only open unmovable files, including open memory-mapped files and other open unmovable files (32-bit Windows-based DLLs and executables).

Return Values

Clears the carry flag, copies the path of an open file to the given buffer, and sets the AX and CX registers to the following values if successful:

AX | Mode that the file was opened in, which is a combination of access mode, sharing mode, and open flags. It can be one value each from the access and sharing modes and any combination of open flags.
 | Access modes
 | OPEN_ACCESS_READONLY (0000h)
 | OPEN_ACCESS_WRITEONLY (0001h)
 | OPEN_ACCESS_READWRITE (0002h)
 | OPEN_ACCESS_RO_NOMODLASTACCESS (0004h)
 | Share modes
 | OPEN_SHARE_COMPATIBLE (0000h)
 | OPEN_SHARE_DENYREADWRITE (0010h)
 | OPEN_SHARE_DENYWRITE (0020h)
 | OPEN_SHARE_DENYREAD (0030h)
 | OPEN_SHARE_DENYNONE (0040h)
 | Open flags
 | OPEN_FLAGS_NOINHERIT (0080h)
 | OPEN_FLAGS_NO_BUFFERING (0100h)
 | OPEN_FLAGS_NO_COMPRESS (0200h)
 | OPEN_FLAGS_ALIAS_HINT (0400h)
 | OPEN_FLAGS_NOCRITERR (2000h)
 | OPEN_FLAGS_COMMIT (4000h)
CX | File type. It can be one of the following values:
 | 0 | For normal files
 | 1 | For a memory-mapped files (memory-mapped files are unmovable)
 | 2 | For any other unmovable files (32-bit Windows-based DLLs and executables)
 | 4 | For the swap file

Note that if a memory-mapped file is returned (CX = 1), the value returned in the AX register is limited to the following values:

OPEN_ACCESS_READONLY (0000h)
OPEN_ACCESS_READWRITE (0002h)

Otherwise, the function sets the carry flag and sets the AX register to the following error value.

Value | Meaning
ERROR_ACCESS_DENIED | The value of FileIndex exceeds the number of open files on the drive.

Remarks

This function returns information about one file at a time. To enumerate all open files, the function must be called repeatedly with FileIndex set to a new value for each call. FileIndex should be set to zero initially and then incremented by one for each subsequent call. The function returns the ERROR_NO_MORE_FILES error value when all open files on the volume have been enumerated.

This function may return inconsistent results when used to enumerate files on an active volume — that is, on a volume where other processes may be opening and closing files. Applications should use Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah) to take a level 3 lock before enumerating open files.


Interrupt 21h Function 440Dh Minor Code 6Eh

Retrieves information about the swap file.

mov ax, 440Dh           ; generic IOCTL
mov ch, 08h             ; device category (must be 08h)
mov cl, 6Eh             ; Find Swap File
mov dx, seg PathBuf     ; see below
mov ds, dx
mov dx, offset PathBuf
int 21h

jc  error
mov [PagerType], ax            ; pager type
mov WORD PTR [FileSize], bx    ; swap file size in 4K pages
mov WORD PTR [FileSize+2], cx

Parameters

PathBuf
Pointer to the buffer that receives the path of the swap file. To determine the maximum allowed length of a path for the volume, call Get Volume Information (Interrupt 21h Function 71A0h).

Return Values

Clears the carry flag, copies the swap file path to the given buffer, and sets the following registers if successful.

Register | Description
AX | Pager type. It can be 1 for no pager, 2 for paging through MS-DOS, and 3 for paging through the protected-mode input and output (I/O) supervisor.
CX:BX | Current size of the swap file in 4K pages.

Otherwise, this function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 440Dh Minor Code 6Fh

Retrieves information about the specified drive.

mov ax, 440Dh            ; generic IOCTL
mov bx, DriveNum         ; see below
mov ch, 8                ; device category
mov cl, 6Fh              ; Get Drive Map Info
mov dx, seg DriveMapInfo ; see below
mov ds, dx
mov dx, offset DriveMapInfo
int 21h

jc  error

Parameters

DriveNum
Drive to obtain information about. This parameter can be zero for the default drive, 1 for A, 2 for B, and so on.
DriveMapInfo
Pointer to the DRIVE_MAP_INFO structure that receives information about the specified drive.


Interrupt 21h Function 440Dh Minor Code 70h

Retrieves the current lock level and permissions on the specified drive.

mov ax, 440Dh        ; generic IOCTL
mov bl, DriveNum     ; see below
mov ch, 08h          ; device category (must be 08h)
mov cl, 70h          ; Get Current Lock State
int 21h

jc error

Parameters

DriveNum
Drive to retrieve lock information about. This parameter can be zero for the default drive, 1 for A, 2 for B, and so on.

Return Values

Clears the carry flag and sets the AX and CX registers to these values if successful:

AX | Current lock level. It may be either 0, 1, 2 or 3. If the volume is not locked, AX contains – 1
CX | Lock permissions. The bits have the following form:
 | Bit | Meaning
 | 0 | 0 = Write operations are failed.
 | 0 | 1 = Write operations are allowed, unless they are blocked by the lock level.
 | 1 | 0 = New file mapping are allowed, unless they are blocked by the lock level.
 | 1 | 1 = New file mapping are failed.
 | 2 | 1 = The volume is locked for formatting.

Remarks

The lock level and the permissions determine the kind of access processes other than the lock owner have to the volume while it is locked. The following operations are allowed by processes other than lock owner at each lock level.

Level | Operations
0 | Read operations, write operations, and new file mappings are failed.
1 | Read operations are allowed. Write operations and new file mappings are either allowed or failed based on permissions.
2 | Read operations are allowed. Write operations and new file mappings are either failed or blocked based on permissions.
3 | Read operations are blocked. Write operations and new file mappings are either failed or blocked based on permissions.


Interrupt 21h Function 440Dh Minor Code 71h

Retrieves the first cluster of the specified file or directory.

mov ax, 440Dh            ; generic IOCTL
mov bx, CharSet          ; see below
mov ch, 08h              ; device category
mov cl, 71h              ; Get First Cluster
mov dx, seg PathName     ; see below
mov ds, dx
mov dx, offset PathName
int 21h

jc error

Parameters

CharSet
Character set of PathName. This parameter must be one of the following values.
Value | Meaning
BCS_WANSI (0) | Windows ANSI character set
BCS_OEM (1) | Current OEM character set
BCS_UNICODE (2) | Unicode character set

PathName
Pointer to a null-terminated string containing the path of the file or directory for which to retrieve the first cluster.

Return Values

Clears the carry flag and sets DX:AX to the first cluster number if successful. Otherwise, the function sets the carry flag and returns either the ERROR_INVALID_FUNCTION or ERROR_ACCESS_DENIED value in AX.

Remarks

The first cluster of a file is the first cluster of the FAT cluster chain describing the data associated with the file. The first cluster of a directory is the first cluster of the FAT cluster chain associated with the directory. It is the cluster that contains the "." and ".." entries. The function finds any file or directory regardless of attribute (system, hidden, or read-only). It does not find volume labels.

If your application is unable to accommodate a 32-bit cluster number, you must check to see if the value returned in the DX register is greater than zero.

if(MAKELONG(regAX,regDX) > 0x0000FFF8)
    b32BitNum = TRUE;
else
    b32BitNum = FALSE;

It is the calling application's responsibility to check to see if the returned cluster number is valid.

if((MAKELONG(regAX,regDX) < 2L) || (MAKELONG(regAX,regDX) > maxClus))
    bInvalidNum = TRUE;
else
    bInvalidNum = FALSE;

In the preceding example, the maxClus variable is the maximum legal cluster number, as a DWORD type, computed from the drive parameters.


Interrupt 21h Function 5704h

Retrieves the last access date for the given file.

mov ax, 5704h   ; Get Last Access Date and Time
mov bx, Handle  ; see below
int 21h

jc  error
mov [Date], dx  ; last access date
mov [Time], cx  ; currently not supported, always 0

Parameters

Handle
File handle.

Return Values

Clears the carry flag and sets the CX register to zero and the DX register to the following values if successful.

Bits | Contents
0–4 | Day of the month (1–31)
5–8 | Month (1 = January, 2 = February, and so on)
9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 5705h

Sets the last access date for the given file.

mov ax, 5705h       ; Set Last Access Date and Time
mov bx, Handle      ; see below
mov cx, 0           ; time currently not supported, always 0
mov dx, AccessDate  ; see below
int 21h

jc  error

Parameters

Handle
File handle.
AccessDate
New access date. The date is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Day of the month (1–31)
5–8 | Month (1 = January, 2 = February, and so on)
9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 5706h

Retrieves the creation date and time for the given file.

mov ax, 5706h           ; Get Creation Date and Time
mov bx, Handle          ; see below
int 21h

jc  error
mov [Time], cx          ; creation time
mov [Date], dx          ; creation date
mov [MilliSeconds], si  ; number of 10 ms intervals in 2 seconds

Parameters

Handle
File handle.

Return Values

Clears the carry flag and sets the CX, DX, and SI registers to these values if successful:

CX | Creation time. The time is a packed 16-bit value with the following form:
 | Bits | Contents
 | 0–4 | Second divided by 2
 | 5–10 | Minute (0–59)
 | 11–15 | Hour (0–23 on a 24-hour clock)
DX | Creation date. The date is a packed 16-bit value with the following form:
 | Bits | Contents
 | 0–4 | Day of the month (1–31)
 | 5–8 | Month (1 = January, 2 = February, and so on)
 | 9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)
SI | Number of 10 millisecond intervals in 2 seconds to add to the MS-DOS time. The number can be a value in the range of 0 to 199.

Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 5707h

Sets the creation date and time for the given file.

mov ax, 5707h         ; Set Creation Date and Time
mov bx, Handle        ; see below
mov cx, Time          ; see below
mov dx, Date          ; see below
mov si, MilliSeconds  ; see below
int 21h

jc  error

Parameters

Handle
File handle.
Time
New creation time. The time is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Second divided by 2
5–10 | Minute (0–59)
11–15 | Hour (0–23 on a 24-hour clock)

Date
New creation date. The date is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Day of the month (1–31)
5–8 | Month (1 = January, 2 = February, and so on)
9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

MilliSeconds
Number of 10 millisecond intervals in 2 seconds to add to the MS-DOS time. The number can be a value in the range 0 to 199.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 6Ch

Opens or creates a file having the given name and attributes.

mov ah, 6Ch             ; Extended Open/Create
mov bx, ModeAndFlags    ; see below
mov cx, Attributes      ; see below
mov dx, Action          ; action to take
mov si, seg Filename    ; see below
mov ds, si
mov si, offset Filename
int 21h

jc error
mov [Handle], ax        ; file handle
mov [ActionTaken], cx   ; action taken to open file

Parameters

ModeAndFlags
Combination of access mode, sharing mode, and open flags. This parameter can be one value each from the access and sharing modes and any combination of open modes.
Access mode | Meaning
OPEN_ACCESS_READONLY (0000h) | Opens the file for reading only.
OPEN_ACCESS_WRITEONLY (0001h) | Opens the file for writing only.
OPEN_ACCESS_READWRITE (0002h) | Opens the file for reading and writing.
0003h | Reserved; do not use.
OPEN_ACCESS_RO_NOMODLASTACCESS (0004h) | Opens the file for reading only without modifying the file's last access date.

Sharing mode | Meaning
OPEN_SHARE_COMPATIBLE (0000h) | Opens the file with compatibility mode, allowing any process on a given computer to open the file any number of times.
OPEN_SHARE_DENYREADWRITE (0010h) | Opens the file and denies both read and write access to other processes.
OPEN_SHARE_DENYWRITE (0020h) | Opens the file and denies write access to other processes.
OPEN_SHARE_DENYREAD (0030h) | Opens the file and denies read access to other processes.
OPEN_SHARE_DENYNONE (0040h) | Opens the file without denying read or write access to other processes, but no process may open the file with compatibility mode.

Open mode | Meaning
OPEN_FLAGS_NOINHERIT (0080h) | If this flag is set, a child process created with Load and Execute Program (Interrupt 21h Function 4B00h) does not inherit the file handle. If the handle is needed by the child process, the parent process must pass the handle value to the child process. If this flag is not set, child processes inherit the file handle.
OPEN_FLAGS_NOCRITERR (2000h) | If a critical error occurs while MS-DOS is opening this file, Critical-Error Handler (Interrupt 24h) is not called. Instead, MS-DOS simply returns an error value to the program.
OPEN_FLAGS_COMMIT (4000h) | After each write operation, MS-DOS commits the file (flushes the contents of the cache buffer to disk).

Attributes
Attributes for files that are created or truncated. This parameter may be a combination of the following values.
Value | Meaning
_A_NORMAL (0000h) | The file can be read from or written to. This value is valid only if used alone.
_A_RDONLY (0001h) | The file can be read from, but not written to.
_A_HIDDEN (0002h) | The file is hidden and does not appear in an ordinary directory listing.
_A_SYSTEM (0004h) | The file is part of the operating system or is used exclusively by it.
_A_VOLID (0008h) | The name specified by Filename is used as the volume label for the current medium.
_A_ARCH (0020h) | The file is an archive file. Applications use this value to mark files for backup or removal.

Action
Action to take it the file exists or does not exist. This parameter can be a combination of the following values.
Value | Meaning
FILE_CREATE (0010h) | Creates a new file if it does not already exist or fails if the file already exists.
FILE_OPEN (0001h) | Opens the file. The function fails if the file does not exist.
FILE_TRUNCATE (0002h) | Opens the file and truncates it to zero length (replaces the existing file). The function fails if the file does not exist.

The only valid combinations are FILE_CREATE combined with FILE_OPEN or FILE_CREATE combined with FILE_TRUNCATE.

Filename
Pointer to a null-terminated string specifying the name of the file to be opened or created. The name must be in the standard MS-DOS 8.3 filename format. The string must be a valid path for the volume associated with the given drive.

Return Values

Clears the carry flag, copies the file handle to the AX register, and sets CX to one of the following values if successful:

ACTION_OPENED (0001h)
ACTION_CREATED_OPENED (0002h)
ACTION_REPLACED_OPENED (0003h)

Otherwise, this function sets the carry flag and sets the AX register to one of the following error values:

ERROR_INVALID_FUNCTION (0001h)
ERROR_FILE_NOT_FOUND (0002h)
ERROR_PATH_NOT_FOUND (0003h)
ERROR_TOO_MANY_OPEN_FILES (0004h)
ERROR_ACCESS_DENIED (0005h)

Remarks

This function does not support long filenames. If the specified name is too long, this function truncates the name to the standard 8.3 format following the same naming scheme that the system uses when creating an alias for a long filename.

A file on a remote directory — that is, a directory on the network — cannot be opened, unless appropriate permissions for the directory exist.


Interrupt 21h Function 710Dh

Flushes file system buffers and caches and optionally remounts the drivespace volume. Any write operations that the system has buffered are performed, and all waiting data is written to the appropriate drive.

mov ax, 710Dh      ; Reset Drive
mov cx, Flag       ; see below
mov dx, DriveNum   ; see below
int 21h

jc  error

Parameters

Flag
Flag specifying whether the system should flush and invalidate the data in the cache as well as the file system buffers. This parameter must be one of the following values.
Value | Meaning
0000h | Resets the drive and flushes the file system buffers for the given drive.
0001h | Resets the drive, flushes the file system buffers, and flushes and invalidates the cache for the specified drive.
0002h | Remounts the drivespace volume.

The Flag value of 0002h is only supported on drivespace volumes. You should specify this value when the on-media format of the drivespace volume has changed and you want the file system to reinitialize and read the new format.

DriveNum
Drive to reset. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.

Return Values

This function has no return value.


Interrupt 21h Function 7139h

Creates a new directory having the given name.

mov ax, 7139h     ; Make Directory
mov dx, seg Name  ; see below
mov ds, dx
mov dx, offset Name
int 21h

jc  error

Parameters

Name
Pointer to a null-terminated string specifying the name of the directory to create. Long filenames are allowed.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 713Ah

Removes the given directory. The directory must be empty.

mov ax, 713Ah     ; Remove Directory
mov dx, seg Name  ; see below
mov ds, dx
mov dx, offset Name
int 21h

jc  error

Parameters

Name
Pointer to a null-terminated string specifying the name of the directory to remove. Long filenames are allowed.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The root directory cannot be deleted.


Interrupt 21h Function 713Bh

Changes the current directory to the directory specified by the given path.

mov ax, 713Bh     ; Change Directory
mov dx, seg Path  ; see below
mov ds, dx
mov dx, offset Path
int 21h

jc error

Parameters

Path
Pointer to a null-terminated string specifying the directory to change to. The path, which can include the drive letter, must be a valid path for the given volume. Long filenames are allowed.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The current or default directory is the directory that the system uses whenever an application supplies a filename that does not explicitly specify a directory. Similarly, the current or default drive is the drive the system uses whenever an application supplies a path that does not explicitly specify a drive. If a drive other than the default drive is specified as part of the new directory path, this function changes the current directory on that drive but does not change the default drive. Set Default Drive (Interrupt 21h Function 0Eh) can be used to change the default drive.


Interrupt 21h Function 7141h

Deletes the given file or files. If the specified filename contains a wildcard character, this function can delete multiple files that match the wildcard.

mov ax, 7141h             ; Delete File
mov ch, MustMatchAttrs    ; see below
mov cl, SearchAttrs       ; see below
mov dx, seg Filename      ; see below
mov ds, dx
mov dx, offset Filename
mov si, WildcardAndAttrs  ; see below
int 21h

jc error

Parameters

MustMatchAttrs
Additional filter on the attributes specified in SearchAttrs. This parameter can be a combination of the following values.
Value | Meaning
_A_NORMAL (0000h) | The file can be read from or written to. This value is valid only if used alone.
_A_RDONLY (0001h) | The file can be read from, but not written to.
_A_HIDDEN (0002h) | The file is hidden and does not appear in an ordinary directory listing.
_A_SYSTEM (0004h) | The file is part of the operating system or is used exclusively by it.
_A_VOLID (0008h) | The name specified by Filename is used as the volume label for the current medium.
_A_SUBDIR (0010h) | The name specified by Filename is used as a directory, not a file.
_A_ARCH (0020h) | The file is an archive file. Applications use this value to mark files for backup or removal.

SearchAttrs
File attributes to search for. This parameter can be a combination of these values:

_A_NORMAL (0000h)
_A_RDONLY (0001h)
_A_HIDDEN (0002h)
_A_SYSTEM (0004h)
_A_VOLID (0008h)
_A_SUBDIR (0010h)
_A_ARCH (0020h)

Filename
Pointer to a null-terminated string specifying the name of the file to delete. If WildcardAndAttrs is 1, the "*" and "?" wildcard characters are permitted in the filename. Long filenames are allowed.
WildcardAndAttrs
Search criteria. This parameter must be one of the following values.
Value | Meaning
0 | Wildcard characters are not allowed in Filename. Any specified attributes are ignored.
1 | Wildcard characters are allowed in Filename. Files with specified attributes are matched.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Wildcard searches are more flexible in Windows 95/98/Me than in MS-DOS. Both long filenames and aliases are considered in searches. For example, *1 finds Windows 95/98/Me filenames (both long filenames and aliases) that end in a 1 and *mid* finds filenames that contain the characters mid. In MS-DOS and in Windows 95/98/Me searching on real-mode FAT directories, all characters after the first * are ignored.

For more information about how MustMatchAttrs and SearchAttrs are used, see the comments for Find First File (Interrupt 21h Function 714Eh).


Interrupt 21h Function 7143h

Retrieves or sets the file attributes, gets the compressed file size, or retrieves or sets the date and time for the given file.

mov ax, 7143h         ; Get or Set File Attributes
mov bl, Action        ; see below
mov cx, Attributes    ; see below
mov di, Date          ; see below
mov cx, Time          ; see below
mov si, MilliSeconds  ; see below
mov dx, seg Filename  ; see below
mov ds, dx
mov dx, offset Filename
int 21h

jc  error
; see below for return values

Parameters

Action
Action to take. This parameter can be one of the following values.
Value | Meaning
0 | Retrieve attributes.
1 | Set specified attributes.
2 | Get physical size of a compressed file.
3 | Set last write date/time.
4 | Get last write date/time.
5 | Set last access date.
6 | Get last access date.
7 | Set creation date/time.
8 | Get creation date/time.

Attributes
File attributes to set, which are used only if Action is 1. This parameter can be a combination of the following values.
Value | Meaning
_A_NORMAL (0000h) | The file can be read from or written to. This value is valid only if used alone.
_A_RDONLY (0001h) | The file can be read from, but not written to.
_A_HIDDEN (0002h) | The file is hidden and does not appear in an ordinary directory listing.
_A_SYSTEM (0004h) | The file is part of the operating system or is used exclusively by it.
_A_ARCH (0020h) | The file is an archive file. Applications use this value to mark files for backup or removal.

Time
New time to set, which is used only if Action is 3 (set last write date/time) or 7 (set creation date/time) The time is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Second divided by 2
5–10 | Minute (0–59)
11–15 | Hour (0–23 on a 24-hour clock)

Date
New date to set, which is used only if Action is 3 (set last write date/time), 5 (set last access date), or 7 (set creation date/time). The date is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Day of the month (1–31)
5–8 | Month (1 = January, 2 = February, and so on)
9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

MilliSeconds
Number of 10 millisecond intervals in 2 seconds to add to the MS-DOS time. The number can be a value in the range 0 to 199. This value is only used if Action is 7 (set creation date/time).
Filename
Pointer to a null-terminated string specifying the name of the file to retrieve or set attributes for. Long filenames are allowed.

Return Values

Clears the carry flag if successful.

If Action is zero (retrieve attributes), the file attributes returned in the CX register may be a combination of the following values :

_A_NORMAL (0000h)
_A_RDONLY (0001h)
_A_HIDDEN (0002h)
_A_SYSTEM (0004h)
_A_VOLID (0008h)
_A_SUBDIR (0010h)
_A_ARCH (0020h)

If Action is 2 (get physical size of a compressed file), the size, in bytes, of the compressed file is returned in DX:AX. This value is the physical size of the compressed file — that is, the actual number of bytes that the compressed file occupies on disk.

If Action is 4 (get last write date/time) or 8 (get creation date/time), the CX register contains the time as a packed 16-bit value with the following form.

Bits | Contents
0–4 | Second divided by 2
5–10 | Minute (0–59)
11–15 | Hour (0–23 on a 24-hour clock)

If Action is 4 (get last write date/time), 6 (get last access date), or 8 (get creation date/time), the DI register contains the date as a packed 16-bit value with the following form.

Bits | Contents
0–4 | Day of the month (1–31)
5–8 | Month (1 = January, 2 = February, and so on)
9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

If Action is 8 (get creation date/time), the SI register contains the number of 10 millisecond intervals in 2 seconds to add to the MS-DOS time. The number can be a value in the range of 0 to 199.

If the function is not successful, it sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 7147h

Copies the path of the current directory for the given drive to the buffer. The copied path does not include the drive letter or the leading backslash.

mov ax, 7147h       ; Get Current Directory
mov dl, Drive       ; see below
mov si, seg Buffer  ; see below
mov ds, si
mov si, offset Buffer
int 21h

jc  error

Parameters

Drive
Drive number. This parameter can be 0 for current drive, 1 for A, 2 for B, and so on.
Buffer
Pointer to the buffer that receives the path. The buffer must be at least as big as the maximum allowed path for this volume as returned by Get Volume Information (Interrupt 21h Function 71A0h).

Return Values

Clears the carry flag and copies the path if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 714Eh

Searches a directory for the first file or directory whose name and attributes match the specified name and attributes.

mov ax, 714Eh             ; Find First File
mov ch, MustMatchAttrs    ; see below
mov cl, SearchAttrs       ; see below
mov dx, seg Filename      ; see below
mov ds, dx
mov dx, offset Filename
mov di, seg FindData      ; see below
mov es, di
mov di, offset FindData
mov si, DateTimeFormat    ; see below
int 21h

jc  error
mov [Handle], ax          ; search handle
mov [ConversionCode], cx  ; Unicode to OEM/ANSI conversion OK?

Parameters

MustMatchAttrs
Additional filter on the attributes specified in SearchAttrs. This parameter can be a combination of the following values.
Value | Meaning
_A_NORMAL (0000h) | The file can be read from or written to. This value is valid only if used alone.
_A_RDONLY (0001h) | The file can be read from, but not written to.
_A_HIDDEN (0002h) | The file is hidden and does not appear in an ordinary directory listing.
_A_SYSTEM (0004h) | The file is part of the operating system or is used exclusively by it.
_A_VOLID (0008h) | The name specified by Filename is used as the volume label for the current medium.
_A_SUBDIR (0010h) | The name specified by Filename is used as a directory, not a file.
_A_ARCH (0020h) | The file is an archive file. Applications use this value to mark files for backup or removal.

SearchAttrs
File attributes to search for. This parameter can be a combination of these values:

_A_NORMAL (0000h)
_A_RDONLY (0001h)
_A_HIDDEN (0002h)
_A_SYSTEM (0004h)
_A_VOLID (0008h)
_A_SUBDIR (0010h)
_A_ARCH (0020h)

Filename
Pointer to a null-terminated string specifying the name of the file or directory to search for. The name, which must be a valid filename or directory name, can include the "*" and "?" wildcard characters. Long filenames are allowed.
FindData
Pointer to a WIN32_FIND_DATA structure that receives information about the file.
DateTimeFormat
Date and time format to be returned. This parameter must be one of the following values.
Value | Meaning
0 | Returns the date and time in 64-bit file time format.
1 | Returns the MS-DOS date and time values. MS-DOS date and time values are returned in the low doubleword of the FILETIME structure. Within the doubleword, the date is returned in the high-order word; the time is in the low-order word.

Return Values

Clears the carry flag, copies information about the file to the specified buffer, returns the search handle in the AX register, and sets the CX register to a combination of the following values if successful.

Value | Meaning
0x0000 | All characters in the primary and alternate name members in the structure specified by FindData were successfully converted from Unicode.
0x0001 | The primary name returned in the structure specified by FindData contains underscore characters in place of characters that could not be converted from Unicode.
0x0002 | The alternate name returned in the structure specified by FindData contains underscore characters in place of characters that could not be converted from Unicode.

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Find First File and subsequent calls to Find Next File (Interrupt 21h Function 714Fh) use the following algorithm to match the attributes of a file or directory (referred to as Attributes in the algorithm) against MustMatchAttrs and SearchAttrs.

if  ((((<MustMatchAttrs> & ~<Attributes>) & 0x3F) == 0)
      && (((~<SearchAttrs> & <Attributes>) & 0x1E) == 0))
{
     return the file or directory name
}
else
{
     continue searching for the next name
}

The following table lists the MustMatchAttrs and SearchAttrs values for some common searches where the specified filename is "*.*". In the table, the word normal means that the read only, hidden, or system attributes have not been set. Parentheses are used to indicate that a file or directory has more than one attribute. For example, (hidden and system) indicates that a file or directory has both the hidden attribute and the system attribute.

MustMatchAttrs | SearchAttrs | Find results
10h | 10h | All normal directories
10h | 12h | All normal and hidden directories
10h | 14h | All normal and system directories
10h | 16h | All normal, hidden, system and (hidden and system) directories
12h | 12h | All hidden directories
14h | 14h | All system directories
16h | 16h | All (hidden and system) directories
00h | 00h | All normal files
00h | 01h | All normal and read only files
00h | 02h | All normal and hidden files
00h | 04h | All normal and system files
00h | 06h | All normal, hidden, system, and (hidden and system) files
00h | 10h | All normal files and directories
01h | 01h | All read only files
02h | 02h | All hidden files
02h | 06h | All hidden and (hidden and system) files

This function can be used to return the volume label by specifying only _A_VOLID (0008h) in both MustMatchAttrs and SearchAttrs.

An application may use the handle returned in the AX register in subsequent calls to Find Next File (Interrupt 21h Function 714Fh). It is important to close the handle when it is no longer needed by calling Find Close (Interrupt 21h Function 71A1h).

Wildcard searches are more flexible in Windows 95/98/Me than in MS-DOS. For example, *1 finds the filenames (both long filenames and aliases) that end in a 1, and *mid* finds filenames that contain the characters mid. In MS-DOS and in Windows 95/98/Me searching on real-mode FAT directories, all characters after the first * are ignored.


Interrupt 21h Function 714Fh

Searches for the next file in a directory, returning information about the file in the given buffer.

mov ax, 714Fh            ; Find Next File
mov bx, Handle           ; see below
mov di, seg FindData     ; see below
mov es, di
mov di, offset FindData
mov si, DateTimeFormat   ; see below
int 21h

jc error
mov [ConversionCode], cx  ; Unicode to OEM/ANSI conversion OK?

Parameters

Handle
Search handle. It must have been previously returned from Find First File (Interrupt 21h Function 714Eh).
FindData
Pointer to a WIN32_FIND_DATA structure that receives information about the file.
DateTimeFormat
Date and time format to be returned. This parameter must be one of the following values.
Value | Meaning
0 | Returns the date and time in 64-bit file time format.
1 | Returns the MS-DOS date and time values. MS-DOS date and time values are returned in the low doubleword of the FILETIME structure. Within the doubleword, the date is returned in the high-order word; the time is in the low-order word.

Return Values

Clears the carry flag, copies information to the specified buffer, and sets the CX register to a combination of the following values if successful.

Value | Meaning
0x0000 | All characters in the primary and alternate name member in the structure specified by FindData were successfully converted from Unicode.
0x0001 | The primary name returned in the structure specified by FindData contains underscore characters in place of characters that could not be converted from Unicode.
0x0002 | The alternate name returned in the structure specified by FindData contains underscore characters in place of characters that could not be converted from Unicode.

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

It is important to close the handle when it is no longer needed by calling Find Close (Interrupt 21h Function 71A1h).


Interrupt 21h Function 7156h

Changes the name of the given file or directory to the new name.

mov ax, 7156h           ; Rename File
mov dx, seg OldName     ; see below
mov ds, dx
mov dx, offset OldName
mov di, seg NewName     ; see below
mov es, di
mov di, offset NewName
int 21h

jc  error

Parameters

OldName
Pointer to a null-terminated string specifying the original name of the file or the directory to rename. Long filenames are allowed.
NewName
Pointer to a null-terminated string specifying the new name for the file or the directory. The function will fail if this parameter specifies an existing file or directory. The new name must not specify a drive different than the original drive. Long filenames are allowed.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.


Interrupt 21h Function 7160h Minor Code 0h

Retrieves the full path for the specified file or path.

mov ax, 7160h
mov cl, 0                  ; Get Full Path Name
mov ch, SubstExpand        ; see below
mov si, seg SourcePath     ; see below
mov ds, si
mov si, offset SourcePath
mov di, seg DestPath       ; see below
mov es, di
mov di, offset DestPath
int 21h

jc  error

Parameters

SubstExpand
Flag that indicates whether the returned path should contain a SUBST drive letter or the path associated with the SUBST drive. Zero is specified to indicate that the returned path should contain the path associated with the SUBST drive, and 80h is specified to indicate that the returned path should contain the SUBST drive letter.
SourcePath
Pointer to a null-terminated string that names the file or path to retrieve the full path for. Either the long filename or the standard 8.3 filename format is acceptable.
DestPath
Pointer to the buffer that receives the full path. The buffer should be large enough to contain the largest possible Windows 95/98/Me path (260 characters, including the drive letter, colon, leading backslash, and terminating null character).

Return Values

Clears the carry flag, modifies the AX register, and returns the full path in the given buffer if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

When just a filename is specified, this function merges the name of the current drive and directory with the specified filename to determine the full path. Relative paths containing the characters "." and ".." in SourcePath are fully expanded. The function does no validation, so the specified filename or path does not need to exist.


Interrupt 21h Function 7160h Minor Code 1h

Retrieves the complete path in its short form (the standard 8.3 format) for the specified file or path. The function returns the 8.3 filename for all directories in the path.

mov ax, 7160h
mov cl, 1                  ; Get Short Path Name
mov ch, SubstExpand        ; see below
mov si, seg SourcePath     ; see below
mov ds, si
mov si, offset SourcePath
mov di, seg DestPath       ; see below
mov es, di
mov di, offset DestPath
int 21h
jc  error

Parameters

SubstExpand
Flag that indicates if the returned path should contain a SUBST drive letter or the path associated with the SUBST drive. Zero is specified to indicate that the returned path should contain the path associated with the SUBST drive, and 80h is specified to indicate that the returned path should contain the SUBST drive letter.
SourcePath
Pointer to a null-terminated string that names the file or path to retrieve the complete short path for. Either the long or short form is acceptable as the source string.
DestPath
Pointer to the buffer that receives the complete path. The buffer should be large enough to contain the largest possible Windows 95/98/Me path in the short form (260 characters, including the drive letter, colon, leading backslash, and terminating null character).

Return Values

Clears the carry flag, modifies the AX register, and returns the complete short path in the given buffer if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Relative paths containing the characters "." and ".." in SourcePath are fully expanded. Since this function performs validation, SourcePath must contain either a valid filename or path.


Interrupt 21h Function 7160h Minor Code 2h

Retrieves the complete path in its long filename form for the specified file or path. The function returns the long name for all directories in the path.

mov ax, 7160h
mov cl, 2                  ; Get Long Path Name
mov ch, SubstExpand        ; see below
mov si, seg SourcePath     ; see below
mov ds, si
mov si, offset SourcePath
mov di, seg DestPath       ; see below
mov es, di
mov di, offset DestPath
int 21h
jc  error

Parameters

SubstExpand
Flag that indicates if the returned path should contain a SUBST drive letter or the path associated with the SUBST drive. Zero is specified to indicate that the returned path should contain the path associated with the SUBST drive, and 80h is specified to indicate that the returned path should contain the SUBST drive letter.
SourcePath
Pointer to a null-terminated string that names the file or path to retrieve the complete long path for. Either the long filename or the short form is acceptable as the source string.
DestPath
Pointer to the buffer that receives the complete path. The buffer should be large enough to contain the largest possible Windows 95/98/Me path (260 characters, including the drive letter, colon, leading backslash, and terminating null character).

Return Values

Clears the carry flag, modifies the AX register, and returns the complete long path in the given buffer if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Relative paths containing the characters "." and ".." in SourcePath are fully expanded. Since this function performs validation, SourcePath must contain either a valid filename or path.


Interrupt 21h Function 716Ch

Creates or opens a file.

mov ax, 716Ch          ; Create or Open File
mov bx, ModeAndFlags   ; see below
mov cx, Attributes     ; see below
mov dx, Action         ; see below
mov si, seg Filename   ; see below
mov ds, si
mov si, offset Filename
mov di, AliasHint      ; see below
int 21h

jc error
mov [Handle], ax       ; file handle
mov [ActionTaken], cx  ; action taken to open file

Parameters

ModeAndFlags
Combination of access mode, sharing mode, and open flags. This parameter can be one value each from the access and sharing modes and any combination of open modes.
Access mode | Meaning
OPEN_ACCESS_READONLY (0000h) | Opens the file for reading only.
OPEN_ACCESS_WRITEONLY (0001h) | Opens the file for writing only.
OPEN_ACCESS_READWRITE (0002h) | Opens the file for reading and writing.
0003h | Reserved; do not use.
OPEN_ACCESS_RO_NOMODLASTACCESS (0004h) | Opens the file for reading only without modifying the file's last access date.

Sharing mode | Meaning
OPEN_SHARE_COMPATIBLE (0000h) | Opens the file with compatibility mode, allowing any process on a given computer to open the file any number of times.
OPEN_SHARE_DENYREADWRITE (0010h) | Opens the file and denies both read and write access to other processes.
OPEN_SHARE_DENYWRITE (0020h) | Opens the file and denies write access to other processes.
OPEN_SHARE_DENYREAD (0030h) | Opens the file and denies read access to other processes.
OPEN_SHARE_DENYNONE (0040h) | Opens the file without denying read or write access to other processes, but no process may open the file for compatibility access.

Open mode | Meaning
OPEN_FLAGS_NOINHERIT (0080h) | If this flag is set, a child process created with Load and Execute Program (Interrupt 21h Function 4B00h) does not inherit the file handle. If the handle is needed by the child process, the parent process must pass the handle value to the child process. If this flag is not set, child processes inherit the file handle.
OPEN_FLAGS_NO_BUFFERING (0100h) | The file is to be opened with no intermediate buffering or caching done by the system. Read and write operations access the disk directly. All reads and writes to the file must be done at file positions that are multiples of the disk sector size, in bytes, and the number of bytes read or written should also be a multiple of the sector size. Applications can determine the sector size, in bytes, with the Get Disk Free Space function (Interrupt 21h, Function 36h).
OPEN_FLAGS_NO_COMPRESS (0200h) | The file should not be compressed on a volume that performs file compression. If the volume does not perform file compression, this flag is ignored. This flag is valid only on file creation and is ignored on file open.
OPEN_FLAGS_ALIAS_HINT (0400h) | The number in the DI register is to be used as the numeric tail for the alias (short filename). For more information, see AliasHint below.
OPEN_FLAGS_NOCRITERR (2000h) | If a critical error occurs while MS-DOS is opening this file, Critical-Error Handler (Interrupt 24h) is not called. Instead, MS-DOS simply returns an error value to the program.
OPEN_FLAGS_COMMIT (4000h) | After each write operation, MS-DOS commits the file (flushes the contents of the cache buffer to disk).

Attributes
Attributes for files that are created or truncated. This parameter may be a combination of the following values.
Value | Meaning
_A_NORMAL (0000h) | The file can be read from or written to. This value is valid only if used alone.
_A_RDONLY (0001h) | The file can be read from, but not written to.
_A_HIDDEN (0002h) | The file is hidden and does not appear in an ordinary directory listing.
_A_SYSTEM (0004h) | The file is part of the operating system or is used exclusively by it.
_A_VOLID (0008h) | The name specified by Filename is used as the volume label for the current medium and is restricted to the standard 8.3 format. For information about an alternative way to set the volume label, see Set Media ID (Interrupt 21h Function 440Dh Minor Code 46h) in the Microsoft MS-DOS Programmer's Reference.
_A_ARCH (0020h) | The file is an archive file. Applications use this value to mark files for backup or removal.
Action
Action to take it the file exists or if it does not exist. This parameter can be a combination of the following values.
Value | Meaning
FILE_CREATE (0010h) | Creates a new file if it does not already exist. The function fails if the file already exists.
FILE_OPEN (0001h) | Opens the file. The function fails if the file does not exist.
FILE_TRUNCATE (0002h) | Opens the file and truncates it to zero length (replaces the existing file). The function fails if the file does not exist.

The only valid combinations are FILE_CREATE combined with FILE_OPEN or FILE_CREATE combined with FILE_TRUNCATE.

Filename
Pointer to a null-terminated string specifying the name of the file to be opened or created. The string must be a valid path for the volume associated with the given drive. Long filenames are allowed.
AliasHint
Number that is used in the numeric tail for the alias (short filename). A numeric tail, which consists of the tilde character (~) followed a number, is appended to the end of a filename. The system constructs the alias from the first few characters of the long filename followed by the numeric tail. The system starts with the number 1 in the numeric tail. If that filename is in use, it uses the number 2. It continues in this fashion until a unique name is found. To override the default numbering scheme, you must specify the OPEN_FLAGS_ALIAS_HINT value when you create the file in addition to specifying this parameter. If a filename already exists with the specified numeric tail, the system uses the default numbering scheme. You should specify a number for this parameter, not the tilde character.

Return Values

Clears carry flag, copies the file handle to the AX register, and sets the CX register to one of the following values if successful:

ACTION_OPENED (0001h)
ACTION_CREATED_OPENED (0002h)
ACTION_REPLACED_OPENED (0003h)

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

A file on a remote directory — that is, a directory on the network — cannot be opened, created, or modified, unless the appropriate permissions for the directory exist.


Interrupt 21h Function 71A0h

Returns information about the volume associated with the given root directory.

mov ax, 71A0h          ; Get Volume Information
mov di, seg Buffer     ; see below
mov es, di
mov di, offset Buffer
mov cx, BufSize        ; see below
mov dx, seg RootName   ; see below
mov ds, dx
mov dx, offset RootName
int 21h

jc  error
mov [Flags], bx        ; file system flags
mov [MaxFilename], cx  ; max. filename length, excluding null
mov [MaxPath], dx      ; max. path length, including null

Parameters

Buffer
Pointer to a buffer that receives a null-terminated string specifying the name of the file system.
BufSize
Size, in bytes, of the buffer that receives the name. The buffer should include space for the terminating null character.
RootName
Pointer to a null-terminated string specifying the name of the root directory of the volume to check. This parameter must not be NULL, or the function will fail. The format for this parameter is "C:\".

Return Values

Clears the carry flag, copies the file system name to the buffer given by the ES:DI register pair, and sets the BX, CX, and DX registers to the following values if successful:

BX | File system flags, which can be a combination of these values:
 | FS_CASE_SENSITIVE (0001h) Specifies that searches are case-sensitive.
 | FS_CASE_IS_PRESERVED (0002h) Preserves case in directory entries.
 | FS_UNICODE_ON_DISK (0004h) Uses Unicode characters in file and directory names.
 | FS_LFN_APIS (4000h) Supports new long filename functions.
 | FS_VOLUME_COMPRESSED (8000h) Specifies that the volume is compressed.
CX | Maximum allowed length, excluding the terminating null character, of a filename for this volume. For example, on the protected-mode FAT file system, this value is 255.
DX | Maximum allowed length of a path for this volume, including the drive letter, colon, leading slash, and terminating null character. For example, on the protected-mode FAT file system, this value is 260.

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

This function accesses the disk the first time it is called, but subsequent calls do not access the disk.


Interrupt 21h Function 71A1h

Closes the file search identified by the search handle.

mov ax, 71A1h   ; Find Close
mov bx, Handle  ; see below
int 21h

jc  error

Parameters

Handle
Search handle. It must have been previously returned from Find First File (Interrupt 21h Function 714Eh).

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Unlike MS-DOS Find First File (Interrupt 21h Function 4Eh), the long filename version of Find First File (Interrupt 21h Function 714Eh) allocates internal storage for the search operations and returns a handle that identifies the storage. This handle is used with Find Next File. To make sure this internal storage is freed, you must call Find Close to end the search.


Interrupt 21h Function 71A6h

Retrieves information about the specified file.

mov ax, 71a6h              ; Get File Info By Handle
mov bx, Handle             ; see below
mov dx, seg lpFileInfo     ; see below
mov ds, dx
mov dx, offset lpFileInfo
stc                        ; must set carry flag
int 21h

jnc success
cmp ax, 7100h
je not_supported

Parameters

Handle
File handle to retrieve information about.
lpFileInfo
Pointer to a BY_HANDLE_FILE_INFORMATION structure that receives the file information. The structure can be used in subsequent calls to Get File Info By Handle to refer to the information about the file.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Note that it is important to explicitly set the carry flag before calling this function.


Interrupt 21h Function 71A7h Minor Code 0h

Converts a 64-bit file time to MS-DOS date and time values.

mov ax, 71A7h           ; date and time format conversion
mov bl, 0               ; File Time To DOS Time
mov si, seg lpft        ; see below
mov ds, si
mov si, offset lpft
int 21h

jc  error
mov [DOSTime], cx
mov [DOSDate], dx
mov [MilliSeconds], bh  ; number of 10ms intervals in 2 seconds

Parameters

lpft
Pointer to a FILETIME structure containing the 64-bit file time to convert to the MS-DOS date and time format.

Return Values

Clears the carry flag, and sets the BH, CX, and DX registers to these values if successful:

BH | Number of 10 millisecond intervals in 2 seconds to add to the MS-DOS time. It can be a value in the range 0 to 199.
CX | MS-DOS time. The time is a packed 16-bit value with the following form:
 | Bits | Contents
 | 0–4 | Second divided by 2
 | 5–10 | Minute (0–59)
 | 11–15 | Hour (0–23 on a 24-hour clock)
DX | MS-DOS date. The date is a packed 16-bit value with the following form:
 | Bits | Contents
 | 0–4 | Day of the month (1–31)
 | 5–8 | Month (1 = January, 2 = February, and so on)
 | 9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The MS-DOS date format can represent only dates between 1/1/1980 and 12/31/2107; this conversion fails if the input file time is outside this range.

The time in FILETIME must be Coordinated Universal Time (UTC). The MS-DOS time is local time.


Interrupt 21h Function 71A7h Minor Code 1h

Converts MS-DOS date and time values to 64-bit file time.

mov ax, 71A7h         ; date and time format conversion
mov bl, 1             ; Dos Time To File Time
mov bh, MilliSeconds  ; see below
mov cx, DOSTime       ; see below
mov dx, DOSDate       ; see below
mov di, seg lpft      ; see below
mov es, di
mov di, offset lpft
int 21h

jc  error

Parameters

MilliSeconds
Number of 10 millisecond intervals in 2 seconds to add to the MS-DOS time. The number can be a value in the range 0 to 199.
DOSTime
MS-DOS time to convert. The time is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Second divided by 2
5–10 | Minute (0–59)
11–15 | Hour (0–23 on a 24-hour clock)

DOSDate
MS-DOS date to convert. The date is a packed 16-bit value with the following form.
Bits | Contents
0–4 | Day of the month (1–31)
5–8 | Month (1 = January, 2 = February, and so on)
9–15 | Year offset from 1980 (that is, add 1980 to get the actual year)

lpft
Pointer to a FILETIME structure to receive the converted 64-bit file time.

Return Values

Clears the carry flag and returns the 64-bit file time in the specified structure if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The time in FILETIME must be Coordinated Universal Time (UTC). The MS-DOS time is local time.


Interrupt 21h Function 71A8h

Generates an alias (a filename in the 8.3 format) for the specified long filename.

mov ax, 71a8h               ; generate short name
mov si, seg LongFilename    ; see below
mov ds, si
mov si, offset LongFilename
mov di, seg ShortFilename   ; see below
mov es, di
mov di, offset ShortFilename
mov dh, ShortNameFormat     ; see below
mov dl, CharSet             ; see below
int 21h

Parameters

LongFilename
Pointer to null-terminated string that names the long filename to generate an alias for. This string must contain only a filename, not a path.
ShortFilename
Pointer to null-terminated string that receives the generated alias.
ShortNameFormat
Format for the returned alias (0 is specified for an 11 character directory entry format or 1 for an 8.3 format).
CharSet
Character set of both the long filename and alias. This parameter is a packed 8-bit value with the following form.
Bits | Contents
0–3 | Specifies the character set of the source long filename.
4–7 | Specifies the character set of the destination alias.

Specify one of the following values to indicate the character set for the long filename and alias.
Value | Meaning
BCS_WANSI (0) | Windows ANSI character set
BCS_OEM (1) | Current OEM character set
BCS_UNICODE (2) | Unicode character set

Return Values

Returns the generated alias in the specified buffer if successful.

Remarks

This function generates the alias using the same algorithm that the system uses with the exception that the returned alias will never have a numeric tail. A numeric tail is appended to the end of an alias and consists of the tilde character (~) followed a number. When the system generates an alias, it may attach a numeric tail if the default alias already exists in the current directory. Because this function does not check the current directory to see if the alias already exists, the returned alias will never have a numeric tail. This service is useful for disk utilities that are trying to establish whether the alias, which seems to be associated with a long filename, is correctly associated.


Interrupt 21h Function 71A9h

Creates or opens a file. This function is for use by real-mode servers only. It takes the same parameters as Create or Open File (Interrupt 21h Function 716Ch) and returns a global file handle.


Interrupt 21h Function 71AAh Minor Code 0h

Associates a path with a drive letter.

mov ax, 71aah            ; SUBST
mov bh, 0                ; Create Subst
mov bl, DriveNum         ; see below
mov dx, seg PathName     ; see below
mov ds, dx
mov dx, offset PathName
int 21h

jc error

Parameters

DriveNum
Drive to SUBST. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
PathName
Pointer to path to associate the drive with.

Return Values

Clears the carry flag if successful. Otherwise the function sets the carry flag and returns an error value in the AX register


Interrupt 21h Function 71AAh Minor Code 1h

Terminate the association between a path and a drive letter.

mov ax, 71aah            ; SUBST
mov bh, 1                ; Terminate Subst
mov bl, DriveNum         ; see below
int 21h

jc error

Parameters

DriveNum
Drive to terminate SUBST. This parameter can 1 for A, 2 for B, and so on. Note that DriveNum cannot be 0 to indicate the default drive.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and returns an error value in the AX register.


Interrupt 21h Function 71AAh Minor Code 2h

Determines if the specified drive is associated with a path and, if it is, retrieves the associated path.

mov ax, 71aah            ; SUBST
mov bh, 2                ; Query SUBST
mov bl, DriveNum         ; see below
mov dx, seg PathName     ; see below
mov ds, dx
mov dx, offset PathName
int 21h

jc error

Parameters

DriveNum
Drive to SUBST. This parameter can 1 for A, 2 for B, and so on. Note that DriveNum cannot be 0 to indicate the default drive.
PathName
Pointer to buffer that receives the null-terminated string of the path associated with the specified drive. The buffer must be of MAXPATHLEN size.

Return Values

Clears the carry flag and retrieves the associated path in the specified buffer if successful. Otherwise, the function sets the carry flag and returns an error value in the AX register.


Query Close

Indicates whether the user has attempted to close an MS-DOS – based application from Windows by choosing the Close command from the system menu.

mov ah, 16h   ; Windows multiplex function
mov al, 8Fh   ; VM Close
mov dh, 1     ; Query Close
mov dl, 0     ; always 0
int 2Fh

Return Values

Returns one of the following values in the AX register:

Value | Meaning
0 | The close command was chosen, and the application has not acknowledged the close state.
1 | The close command was chosen, and the application has acknowledged the close state.
168Fh | The close command has not been chosen, and the application should continue running.

Remarks

Query Close returns a nonzero value if the application has not enabled the Close command by using the Enable or Disable Close Command function.


RegisterServiceProcess

The RegisterServiceProcess function registers or unregisters a service process. A service process continues to run after the user logs off.

To call RegisterServiceProcess, retrieve a function pointer using GetProcAddress on KERNEL32.DLL. Use the function pointer to call RegisterServiceProcess.

DWORD RegisterServiceProcess(
  DWORD dwProcessId,
  DWORD dwType
);

Parameters

dwProcessId
Specifies the identifier of the process to register as a service process. Specifies NULL to register the current process.
dwType
Specifies whether the service is to be registered or unregistered. This parameter can be one of the following values.
Value | Meaning
0 | Unregisters the process as a service process.
1 | Registers the process as a service process.

Return Values

The return value is 1 if successful or 0 if an error occurs.


Set Application Title

Sets the application title to the given string.

mov  ah, 16h           ; Windows multiplex function
mov  al, 8Eh           ; VM Title
mov  di, seg AppTitle  ; see below
mov  es, di
mov  di, offset AppTitle
mov  dx, 0             ; Set Application Title
int  2Fh
cmp   ax, 1
je   success

Parameters

AppTitle
Pointer to a null-terminated string specifying the application title. The title must not exceed 80 characters, including the terminating null character. If this parameter is zero or points to an empty string, the function removes the current application title.

Return Values

Returns 1 in the AX register if successful or zero otherwise.

Remarks

Although not common, Set Application Title can return 1 in the AX register even though the title was not changed. In general, applications must not rely on the operating system to keep an accurate copy of the current title.


Set Virtual Machine Title

Sets the virtual machine title to the given string. Applications should not change the virtual machine title except under explicit instructions from the user.

mov  ah, 16h           ; Windows multiplex function
mov  al, 8Eh           ; VM Title
mov  di, seg VMTitle   ; see below
mov  es, di
mov  di, offset VMTitle
mov  dx, 1             ; Set Virtual Machine Title
int  2Fh
cmp   ax, 1
je   success

Parameters

VMTitle
Pointer to a null-terminated string specifying the virtual machine title. The title must not exceed 30 characters, including the terminating null character. If this parameter is zero or points to an empty string, the function removes the current virtual machine title.

Return Values

Returns 1 in the AX register if successful or zero otherwise.

Remarks

Although not common, Set Virtual Machine Title can return 1 in the AX register even though the title was not changed. In general, applications must not rely on the operating system to keep an accurate copy of the current title.


Windows 95/98/Me Structures

The following structures are supported on Windows 95/98/Me.

DIOC_REGISTERS
DIOCParams
DRIVE_MAP_INFO
MID
PARAMBLOCK


DIOC_REGISTERS

Contains the register values for calling Interrupt 21h commands through the DeviceIoControl function. The meaning of the registers depends on the given command.

typedef struct DIOCRegs {
  DWORD   reg_EBX;
  DWORD   reg_EDX;
  DWORD   reg_ECX;
  DWORD   reg_EAX;
  DWORD   reg_EDI;
  DWORD   reg_ESI;
  DWORD   reg_Flags;
} DIOC_REGISTERS;

Members

reg_EBX
EBX register.
reg_EDX
EDX register.
reg_ECX
ECX register.
reg_EAX
EAX register
reg_EDI
EDI register.
reg_ESI
ESI register.
reg_Flags
Flags register.

Remarks

Some interrupt functions require far pointers passed in segment:offset pairs where the segment is placed in a segment register. Since the 32-bit code does not have segments, the DIOC_REGISTERS structure contains no segment registers. You should place the full pointer into the structure member that corresponds to the register used to hold the offset portion of the real-mode pointer. For example, use reg_EDX for pointers that go into the DS:DX registers.


DIOCParams

Contains information that an application has passed to the virtual device driver (VxD) by calling the DeviceIoControl function.

DIOCParams STRUC
  Internal1             DD  ?
  VMHandle              DD  ?
  Internal2             DD  ?
  dwIoControlCode       DD  ?
  lpvInBuffer           DD  ?
  cbInBuffer            DD  ?
  lpvOutBuffer          DD  ?
  cbOutBuffer           DD  ?
  lpcbBytesReturned     DD  ?
  lpoOverlapped         DD  ?
  hDevice               DD  ?
  tagProcess            DD  ?
DIOCParams ENDS

Members

Internal1
Reserved.
VMHandle
Handle of virtual machine.
Internal2
Reserved.
dwIoControlCode
Control code to process. This member can be a developer-defined value or one of these system-defined values.
Value | Meaning
DIOC_CLOSEHANDLE | Notifies a VxD that an application has closed its device handle for the VxD. The VxD should perform cleanup operations and release any structures associated with the application.
DIOC_GETVERSION | Queries the VxD to determine if it supports the device IOCTL interface. If the VxD supports the interface, it must clear the EAX register. Otherwise, it must place a nonzero value in EAX. If cbOutBuffer is nonzero and the VxD supports the interface, the VxD should copy version information to the lpvOutBuffer.

lpvInBuffer
Address of a buffer that contains data needed to process the control code.
cbInBuffer
Size, in bytes, of the buffer pointed to by lpvInBuffer.
lpvOutBuffer
Address of a buffer that receives the results of processing the control code.
cbOutBuffer
Size, in bytes, of the buffer pointed to by lpvOutBuffer.
lpcbBytesReturned
Number of bytes copied to the buffer pointed to by lpvOutBuffer.
lpoOverlapped
Address of an OVERLAPPED structure that contains information used to complete the command asynchronously. If the command is to be completed synchronously, this member is NULL.
hDevice
Handle of device.
tagProcess
Information that the VxD can use to tag the current request along with hDevice. When the VxD receives a DIOC_CLOSEHANDLE control code for hDevice and tagProcess, it should perform appropriate cleanup operations.


DRIVE_MAP_INFO

Contains information about the drive specified in the call to Get Drive Map Info (Interrupt 2lh Function 440Dh Minor Code 6Fh).

DRIVE_MAP_INFO    struc
  dmiAllocationLength   db ?
  dmiInfoLength         db ?
  dmiFlags              db ?
  dmiInt13Unit          db ?
  dmiAssociatedDriveMap dd ?
  dmiPartitionStartRBA  dq ?
DRIVE_MAP_INFO    ends

Members

dmiAllocationLength
Length of the buffer provided by the application calling Get Drive Map Info. This value should be the size of the DRIVE_MAP_INFO structure.
dmiInfoLength
Number of bytes that Get Drive Map Info used in the buffer provided by the calling application. Typically, this value is the size of the DRIVE_MAP_INFO structure.
dmiFlags
Flags describing the given drive. This member, which is filled by Get Drive Map Info, can be a combination of these values.
Value | Meaning
PROT_MODE_LOGICAL_DRIVE (01h) | A protected-mode driver is in use for this logical drive.
PROT_MODE_PHYSICAL_DRIVE (02h) | A protected-mode driver is in use for the physical drive corresponding to this logical drive.
PROT_MODE_ONLY_DRIVE (04h) | The drive is not available when running with MS-DOS.
PROT_MODE_EJECT (08h) | A protected-mode drive supports an electronic eject operation.
PROT_MODE_ASYNC_NOTIFY (10h) | The drive issues media arrival and removal notifications. This value is currently used for CD-ROM drives that are controlled by the protected-mode driver and that cause a broadcast message when media is removed or inserted without the application having to make a request to the drive. It can also be used by disk drivers.

dmiInt13Unit
Physical drive number of the given drive. This member, which is filled by Get Drive Map Info, can be one of these values.
Value | Meaning
00 - 7Fh | Floppy disk drive (00 for the first floppy drive, 01 for the second, and so on).
80 - FEh | Hard disk drive (80 for the first hard disk drive, 81 for the second, and so on).
FFh | The given drive does not map to a physical drive.

dmiAssociatedDriveMap
Logical drive numbers that are associated with the given physical drive. For example, a host drive C with child drive letters A and B would return with bits 0 and 1 set.
dmiPartitionStartRBA
Relative block address offset from the start of the physical volume to the start of the given partition.

Remarks

Before an application makes a call to Get Drive Map Info, the dmiAllocationLength member must be set to the size of the DRIVE_MAP_INFO structure. All other members of the structure are filled in by Get Drive Map Info.


MID

Contains information that uniquely identifies a disk or other storage medium.

MID struc
  midInfoLevel   dw 0
  midSerialNum   dd ?
  midVolLabel    db 11 dup (?)
  midFileSysType db 8 dup (?)
MID ends

Members

midInfoLevel
Information level. This member must be zero.
midSerialNum
Serial number for the medium.
midVolLabel
Volume label for the medium. If the label has fewer than 11 characters, space characters (ASCII 20h) fill the remaining bytes in this member.
midFileSysType
Type of file system as an 8-byte ASCII string. This member can be one of these values.
Value | Meaning
FAT12 | 12-bit file allocation table (FAT)
FAT16 | 16-bit FAT
CDROM | High Sierra file system
CD001 | ISO9660 file system
CDAUDIO | Audio disk

If the name has fewer than eight characters, space characters (ASCII 20h) fill the remaining bytes in this member.


PARAMBLOCK

Contains information about locked drives.

PARAMBLOCK struc
  Operation db ?
  NumLocks  db ?
PARAMBLOCK ends

Members

Operation
Operation to carry out provided by the calling application of Lock/Unlock Removable Media (Interrupt 21h Function 440Dh Minor Code 48h). This member can be one of these values:
Value | Meaning
0 | Locks the volume in the drive.
1 | Unlocks the volume in the drive.
2 | Returns the lock or unlock status.

All other values are reserved.

NumLocks
Number of locks pending on the given drive filled in by Lock/Unlock Removable Media.


Windows 95/98/Me Control Codes

The following control codes are supported on Windows 95/98/Me.

VWIN32_DIOCCompletionRoutine
W32_DEVICEIOCONTROL


VWIN32_DIOCCompletionRoutine

Notifies the system that an asynchronous operation in a virtual device driver is complete. The VxD calls this service after the asynchronous input and output (I/O) operation to signal the application.

mov ebx, Internal  ; see below
VxDCall VWIN32_DIOCCompletionRoutine

Parameters

Internal
Event identifier. This parameter must be the same value initially passed to the VxD in the Internal member of the OVERLAPPED structure.

Return Values

No return value.

Remarks

Before calling this service, the VxD must set the InternalHigh member of the OVERLAPPED structure to the number of bytes of return data.


W32_DEVICEIOCONTROL

Passes a control code and related information to a virtual device driver.

mov ebx, VMHandle
mov eax, W32_DEVICEIOCONTROL
mov esi, OFFSET32 dioparams
VMMCall System_Control

Parameters

VMHandle
Handle of the virtual machine.
dioparams
Address of a DIOCParams structure containing a control code and information that the VxD needs to process the control code.

Return Values

Returns one of the following values in the EAX register:

Value | Meaning
0 | The control code processed successfully.
– 1 | An asynchronous operation is in progress. A VxD must return this value only if the lpoOverlapped member of the DIOCParams structure is not NULL.
Error code | An error occurred.

Remarks

This message is sent to a VxD when an application specifies the name of a VxD in the CreateFile function and when an application specifies the device handle of the VxD in a call to the DeviceIoControl or CloseHandle function. This message uses the ESI register.


FAT32 API Reference

The following elements are associated with FAT32.

  • FAT32 Functions
  • FAT32 Structures


FAT32 Functions

The following are the FAT32 functions.

Int 21h Function 440Dh Minor Code 40h
Int 21h Function 440Dh Minor Code 41h
Int 21h Function 440Dh Minor Code 42h
Int 21h Function 440Dh Minor Code 46h
Int 21h Function 440Dh Minor Code 47h
Int 21h Function 440Dh Minor Code 48h
Int 21h Function 440Dh Minor Code 49h
Int 21h Function 440Dh Minor Code 4Ah
Int 21h Function 440Dh Minor Code 4Bh
Int 21h Function 440Dh Minor Code 60h
Int 21h Function 440Dh Minor Code 61h
Int 21h Function 440Dh Minor Code 62h
Int 21h Function 440Dh Minor Code 66h
Int 21h Function 440Dh Minor Code 67h
Int 21h Function 440Dh Minor Code 68h
Int 21h Function 440Dh Minor Code 6Ah
Int 21h Function 440Dh Minor Code 6Bh
Int 21h Function 440Dh Minor Code 6Ch
Int 21h Function 440Dh Minor Code 6Dh
Int 21h Function 440Dh Minor Code 6Eh
Int 21h Function 440Dh Minor Code 6Fh
Int 21h Function 440Dh Minor Code 70h
Int 21h Function 440Dh Minor Code 71h
Int 21h Function 6Ch
Int 21h Function 7302h Get_ExtDPB
Int 21h Function 7303h Get_ExtFreeSpace
Int 21h Function 7304h Set_DPBForFormat
SetDPB_SetAllocInfo
SetDPB_SetDPBFrmBPB
SetDPB_ForceMediaChng
SetDPB_GetSetActFATandMirr
SetDPB_GetSetRootDirClus
Int 21h Function 7305h Ext_ABSDiskReadWrite


Int 21h Function 440Dh Minor Code 40h (FAT32)

Sets the device parameters for the specified block device.

mov  bx, Drive           ;See below
mov  ch, DeviceCat       ;See below
mov  cl, 40h             ;Set device parameters
mov  dx, seg DriveDP     ;See below
mov  ds, dx
mov  dx, offset DriveDP  ;ds:dx points to a device parameters structure
mov  ax, 440Dh           ;IOCTL for block device
int  21h

jc  error_handler       ;carry set means error

Parameters

Drive
Specifies the drive that parameters are being set for (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies the expected format of the device parameters information structure.
Value | Expected device parameters structure
08h | DEVICEPARAMS (FAT16 or FAT12 drive. Will fail on FAT32 drives.)
48h | EA_DEVICEPARAMETERS (FAT32, FAT16 or FAT12 drives). This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

DriveDP
Pointer to the applicable device parameters structure that contains the parameters for the specified block device. The format of the expected device parameters is indicated in the above DeviceCat parameter.

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Set Device Parameters returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.

If the number of sectors specified in the applicable device parameters structure is not zero, a TRACKLAYOUT structure specifying the size of each sector must follow the device parameters structure.

In the case of a FAT16 or FAT12 drive, the device parameters structure is a DEVICEPARAMS structure. For FAT32 drives, the device parameters structure is an EA_DEVICEPARAMETERS structure.


Int 21h Function 440Dh Minor Code 41h (FAT32)

Writes data from a buffer to a track on the specified device.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 41h                 ;Write Track on Logical Drive
mov     dx, seg WriteBlock      ;See below
mov     ds, dx
mov     dx, offset WriteBlock   ;ds:dx points to RWBLOCK structure
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive information is to be written to (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive. (Will fail on FAT32 drives.)
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

WriteBlock
Points to an RWBLOCK structure that contains information specifying the sectors to be written to. The rwBuffer member must contain the address of the buffer that contains the data to write to the disk. The RWBLOCK structure has the following form:
RWBLOCK STRUC
    rwSpecFunc      db  0  ;special functions (must be zero)
    rwHead          dw  ?  ;head to read/write
    rwCylinder      dw  ?  ;cylinder to read/write
    rwFirstSector   dw  ?  ;first sector to read/write
    rwSectors       dw  ?  ;number of sectors to read/write
    rwBuffer        dd  ?  ;address of buffer for read/write data
RWBLOCK ENDS

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Write Track on Logical Drive returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 42h (FAT32)

Formats and verifies a track on the specified device.

mov     bx, Drive                 ;See below
mov     ch, DeviceCat             ;See below
mov     cl, 42h                   ;Format track on logical drive
mov     dx, seg FormatBlock       ;See below
mov     ds, dx
mov     dx, offset FormatBlock    ;ds:dx points to FVBLOCK structure
mov     ax, 440Dh                 ;IOCTL for block device
int     21h

jc      error_handler             ;carry set means error

Parameters

Drive
Specifies the drive on which the track is to be formatted and verified (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive. (Will fail on FAT32 drives.)
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

FormatBlock
Pointer to an FVBLOCK structure that specifies the head and cylinder to format. The FVBLOCK structure has the following form:
FVBLOCK STRUC
    fvSpecFunc    db  0   ;special functions
    fvHead        dw  ?   ;head to format/verify
    fvCylinder    dw  ?   ;cylinder to format/verify
    fvTracks      dw  ?   ;tracks to format/verify
FVBLOCK ENDS

The fvSpecFunc member can be 0, 1, or 2. The fvTracks member is ignored.

Return Values

If the fvSpecFunc member in the FVBLOCK structure is 1, clears the carry flag and sets the fvSpecFunc member to one of the following values.

Value | Meaning
0 | ROM support for given format combination
1 | No ROM support
2 | Illegal format combination
3 | No media present

If the fvSpecFunc member is 0 and the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Format Track on Logical Drive returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 46h (FAT32)

Sets the volume label, serial number, and file system for the specified drive.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 46h                 ;Set Media ID
mov     dx, seg MediaID         ;See below
mov     ds, dx
mov     dx, offset MediaID      ;ds:dx points to MID structure
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive for which identification is to be set (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive. (Will fail on FAT32 drives.)
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

MediaID
Points to a MID structure that contains information that uniquely identifies a disk or other storage medium. The MID structure has the following form:
MID STRUC
    midInfoLevel   dw  0           ;information level
    midSerialNum   dd  ?           ;serial number
    midVolLabel    db  11 dup (?)  ;ASCII volume label
    midFileSysType db  8 dup (?)   ;file system type
MID ENDS

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Set Media ID returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 47h (FAT32)

Sets the access flag for the specified drive.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 47h                 ;Set access flag
mov     dx, seg SpecialFunc     ;See below
mov     ds, dx
mov     dx, offset SpecialFunc  ;ds:dx points to SPECIALFUNC structure
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive for which the access flag is to be set (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive. (Will fail on FAT32 drives.)
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

SpecialFunc
Points to a SPECIALFUNC structure that contains information specifying the state of the access flag. The SPECIALFUNC structure has the following form:
SPECIALFUNC STRUC
    sfFunction  db  0   ;special function (must be 0)
    sfAccessFlg db  ?   ;access flag, 0 if access blocked
                        ;"unformatted"
SPECIALFUNC ENDS

Return Values

If the function is successful, clears the carry flag. Otherwise sets the carry flag, and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Set Access Flag returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 48h (FAT32)

Locks or unlocks the volume in the given drive (preventing or permitting its removal) or returns the locked status of the given drive.

mov ax, 440Dh           ; Generic IOCTL
mov bx, DriveNum        ; See below
mov ch, DeviceCat       ; See below
mov cl, 48h             ; Lock or unlock removable media
mov dx, seg ParamBlock  ; See below
mov ds, dx
mov dx, offset ParamBlock
int 21h

jc  error_handler       ; Carry set means error

Parameters

DriveNum
Drive to lock or unlock (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

ParamBlock
Pointer to a PARAMBLOCK structure that specifies the operation to carry out and receives a count of the number of locks on the drive.

Return Values

If the function is successful, clears the carry flag and copies the number of pending locks on the given drive to the NumLocks member of the PARAMBLOCK structure. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Description
01h | The function is not supported.
B0h | The volume is not locked in the drive.
B2h | The volume is not removable.
B4h | The lock count has been exceeded.


Int 21h Function 440Dh Minor Code 49h (FAT32)

Ejects the specified media.

mov ax, 440Dh      ; Generic IOCTL
mov bx, DriveNum   ; See below
mov ch, DeviceCat  ; See below
mov cl,            ; Eject Removable Media
int 21h

jc  error_handler  ; Carry set means error

Parameters

DriveNum
Drive to eject (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

01h | The function is not supported.
B1h | The volume is locked in the drive.
B2h | The volume is not removable.
B5h | The valid eject request has failed.

Remarks

If a given physical drive has more than one logical volume, all volumes must be unlocked by using Int 21h Function 440Dh Minor Code 48h before the drive will eject.


Int 21h Function 440Dh Minor Code 4Ah (FAT32)

Locks the logical volume.

mov ax, 440Dh        ; generic IOCTL
mov bh, LockLevel    ; see below
mov bl, DriveNum     ; see below
mov ch, DeviceCat    ; see below
mov cl, 4Ah          ; Lock Logical Volume
mov dx, Permissions  ; see below
int 21h

jc error_handler

Parameters

LockLevel
Level of the lock. This parameter must be either 0, 1, 2, or 3.
DriveNum
Drive to lock. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Permissions
Operations that the system permits while the volume is locked. This parameter is specified only when a level 1 lock is obtained or when a level 0 lock is obtained for the second time for formatting the volume. For other lock levels, this parameter is zero. When a level 1 lock is obtained, bits 0 and 1 of this parameter specify whether the system permits write operations, new file mappings, or both by other processes during a level 1 lock as well as during level 2 and 3 locks. If this parameter specifies that write operations, new file mappings, or both are failed, these operations are failed during level 1, 2, and 3 locks. This parameter has the following form:
Bit | Meaning
0 | 0 = Write operations are failed (specified when a level 1 lock is obtained).
0 | 1 = Write operations are allowed (specified when a level 1 lock is obtained).
1 | 0 = New file mapping are allowed (specified when a level 1 lock is obtained).
1 | 1 = New file mapping are failed (specified when a level 1 lock is obtained).
2 | 1 = The volume is locked for formatting (specified when a level 0 lock is obtained for the second time).

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The volume must be locked before the application performs direct disk write operations by using Interrupt 26h or the IOCTL control functions. Lock Physical Volume (Interrupt 21h Function 440Dh Minor Code 4Bh) is used instead of this function before a call to an Interrupt 13h function. You must use Unlock Logical Volume (Interrupt 21h Function 440Dh Minor Code 6Ah) to release the lock.


Int 21h Function 440Dh Minor Code 4Bh (FAT32)

Locks the physical volume.

mov ax, 440Dh        ; generic IOCTL
mov bh, LockLevel    ; see below
mov bl, DriveNum     ; see below
mov ch, DeviceCat    ; see below
mov cl, 4Bh          ; Lock Physical Volume
mov dx, Permissions  ; see below
int 21h

jc error_handler

Parameters

LockLevel
Level of the lock. This parameter must be either 0, 1, 2, or 3.
DriveNum
Drive to lock. This parameter must be one of the following values (same device unit numbers as for Interrupt 13h):
Value | Description
00 - 7Fh | Floppy disk drive (00 for the first floppy drive, 01 for the second, and so on).
80 - FFh | Hard disk drive (80 for the first hard disk drive, 81 for the second, and so on).

DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Permissions
Operations that the system permits while the volume is locked. This parameter is specified only when a level 1 lock is obtained or when a level 0 lock is obtained for the second time for formatting the volume. For other lock levels, this parameter is zero. When a level 1 lock is obtained, bits 0 and 1 of this parameter specify whether the system permits write operations, new file mappings, or both by other processes during a level 1 lock as well as during level 2 and 3 locks. If this parameter specifies that write operations, new file mappings, or both are failed, these operations are failed during level 1, 2, and 3 locks. This parameter has the following form:
Bit | Meaning
0 | 0 = Write operations are failed (specified when a level 1 lock is obtained).
0 | 1 = Write operations are allowed (specified when a level 1 lock is obtained).
1 | 0 = New file mapping are allowed (specified when a level 1 lock is obtained).
1 | 1 = New file mapping are failed (specified when a level 1 lock is obtained).
2 | 1 = The volume is locked for formatting (specified when a level 0 lock is obtained for the second time).

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

The volume must be locked before the application performs direct disk write operations by using Interrupt 13h, Interrupt 26h, or the Interrupt 21h IOCTL functions. A single physical volume may be divided into more than one logical volume, which is also called a partition. The system automatically takes a logical volume lock on all logical volumes on the specified physical drive. If the application performs disk writes only to a logical drive, Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah) is used instead of this function. Unlock Physical Volume (Interrupt 21h Function 440Dh Minor Code 6Bh) should be called to release the lock.


Int 21h Function 440Dh Minor Code 60h (FAT32)

Returns the device parameters for the specified block device.

mov  bx, Drive           ;See below
mov  ch, DeviceCat       ;See below
mov  cl, 60h             ;Get device parameters
mov  dx, seg DriveDP     ;See below
mov  ds, dx
mov  dx, offset DriveDP  ;ds:dx points to a device parameters structure
mov  ax, 440Dh           ;IOCTL for block device
int  21h

jc   error_handler       ;carry set means error

Parameters

Drive
Specifies the drive for which parameters are requested (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies the expected format of device parameters information structure.
Value | Expected device parameters structure
08h | DEVICEPARAMS (FAT16 or FAT12 drive. This call will work on FAT32 drives, but results are not reliable. Use the 48h form for FAT32 media).
48h | EA_DEVICEPARAMETERS (FAT32, FAT16 or FAT12) This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

DriveDP
Points to the applicable device parameters structure containing the parameters for the specified block device. The format of the expected device parameters is indicated in the DeviceCat parameter.

The special functions member in the device parameters structure determines whether the function retrieves current or default information. If the member is set to 1, the function retrieves information about the current medium in the drive. If the member is set to 0, the function retrieves information about the default medium for the drive.

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Get Device Parameters returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 61h (FAT32)

Reads data from a track on the specified device and places the data in memory.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 61h                 ;Read track on logical drive
mov     dx, seg ReadBlock       ;See below
mov     ds, dx
mov     dx, offset ReadBlock    ;ds:dx points to RWBLOCK structure
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive to be read from (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive. (Will fail on a FAT32 drive).
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

ReadBlock
Pointer to an RWBLOCK structure that contains information specifying the sectors to be read from. The RWBLOCK structure has the following form:
RWBLOCK STRUC
    rwSpecFunc      db  0  ;special functions (must be zero)
    rwHead          dw  ?  ;head to read/write
    rwCylinder      dw  ?  ;cylinder to read/write
    rwFirstSector   dw  ?  ;first sector to read/write
    rwSectors       dw  ?  ;number of sectors to read/write
    rwBuffer        dd  ?  ;address of buffer for read/write data
RWBLOCK ENDS

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Read Track on Logical Drive returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 62h (FAT32)

Verifies a track on the specified device.

mov     bx, Drive                 ;See below
mov     ch, DeviceCat             ;See below
mov     cl, 62h                   ;Verify track on logical drive
mov     dx, seg VerifyBlock       ;See below
mov     ds, dx
mov     dx, offset VerifyBlock    ;ds:dx points to FVBLOCK structure
mov     ax, 440Dh                 ;IOCTL for block device
int     21h

jc      error_handler             ;carry set means error

Parameters

Drive
Specifies the drive on which the track is to be verified (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT16 or FAT12 drive (Will fail on a FAT32 drive.)
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

VerifyBlock
Pointer to an FVBLOCK structure that specifies the head and cylinder to verify. The FVBLOCK structure has the following form:
FVBLOCK STRUC
    fvSpecFunc    db  0   ;special functions
    fvHead        dw  ?   ;head to format/verify
    fvCylinder    dw  ?   ;cylinder to format/verify
    fvTracks      dw  ?   ;tracks to format/verify
FVBLOCK ENDS

The fvSpecFunc member can be 0 or 2.

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Verify Track on Logical Drive returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 66h (FAT32)

Returns the volume label, serial number and file system for the specified drive.

mov     bx, Drive            ;See below
mov     ch, DeviceCat        ;See below
mov     cl, 66h              ;Get Media ID
mov     dx, seg MediaID      ;See below
mov     ds, dx
mov     dx, offset MediaID   ;ds:dx points to MID structure
mov     ax, 440Dh            ;IOCTL for block device
int     21h

jc      error_handler        ;carry set means error

Parameters

Drive
Specifies the drive for which information is to be returned (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

MediaID
Pointer to a MID structure that receives information that uniquely identifies a disk or other storage medium. The MID structure has the following form:
MID STRUC
    midInfoLevel   dw  0           ;information level
    midSerialNum   dd  ?           ;serial number
    midVolLabel    db  11 dup (?)  ;ASCII volume label
    midFileSysType db  8 dup (?)   ;file system type
MID ENDS

Return Values

If the function is successful, clears the carry flag, and fills in the parameter block (a MID structure) with information about the disk. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Get Media ID returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 67h (FAT32)

Retrieves the access flag for the specified drive.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 67h                 ;Get access flag
mov     dx, seg SpecialFunc     ;See below
mov     ds, dx
mov     dx, offset SpecialFunc  ;ds:dx points to SPECIALFUNC structure
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive for which the access flag is to be retrieved (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

SpecialFunc
Pointer to a SPECIALFUNC structure that receives the state of the access flag. The SPECIALFUNC structure has the following form:
SPECIALFUNC STRUC
    sfFunction  db  0   ;special function (must be 0)
    sfAccessFlg db  ?   ;access flag, 0 if access blocked
                        ;"unformatted"
SPECIALFUNC ENDS

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0002h | ERROR_FILE_NOT_FOUND
0005h | ERROR_ACCESS_DENIED

Remarks

Get Access Flag returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.


Int 21h Function 440Dh Minor Code 68h (FAT32)

Returns the media type for the specified block device.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 68h                 ;Sense media type
mov     dx, seg Media           ;See below
mov     ds, dx
mov     dx, offset Media        ;ds:dx points to buffer for media type
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive for which parameters are requested (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Media
Points to a 2-byte buffer that receives information about the media type for the given drive. The buffer has the following form.
Offset | Description
00h | Receives a value specifying whether the media type is the default value. This byte is set to 01h for the default media type and to 00h for any other media type.
01h | Receives a value specifying the media type. This byte is set to 02h for 720K disks, 07h for 1.44-MB disks, and 09h for 2.88-MB disks.

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value | Name
0001h | ERROR_INVALID_FUNCTION
0005h | ERROR_ACCESS_DENIED

Remarks

Sense Media Type may also return a device-dependent error value as specified by the device driver.

Sense Media Type returns 0005h (ERROR_ACCESS_DENIED) if the media type for the specified drive cannot be determined or if the given drive is not ready. Programs can use Get Extended Error (Function 59h) to retrieve additional information about the error.


Int 21h Function 440Dh Minor Code 6Ah (FAT32)

Unlocks the logical volume or decrements the lock level.

mov ax, 440Dh      ; generic IOCTL
mov bl, DriveNum   ; see below
mov ch, DeviceCat  ; see below
mov cl, 6Ah        ; Unlock Logical Volume
int 21h

jc error_handler

Parameters

DriveNum
Drive to unlock. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Use this function to release the lock obtained by using Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah). Only the lock owner can release the lock on a volume.

To release the lock on the volume, an application must call Unlock Logical Volume the same number of times that Lock Logical Volume was called.


Int 21h Function 440Dh Minor Code 6Bh (FAT32)

Unlocks the physical volume or decrements the lock level.

mov ax, 440Dh      ; generic IOCTL
mov bl, DriveNum   ; see below
mov ch, DeviceCat  ; see below
mov cl, 6Bh        ; Unlock Physical Volume
int 21h

jc error_handler

Parameters

DriveNum
Drive to unlock. This parameter must be one of these values (same device unit numbers as for Interrupt 13h):
Value | Description
00 - 7Fh | Floppy disk drive (00 for the first floppy drive, 01 for the second, and so on).
80 - FFh | Hard disk drive (80 for the first hard disk drive, 81 for the second, and so on).

DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Return Values

Clears the carry flag if successful. Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

This function is used to release the lock obtained by using Lock Physical Volume (Interrupt 21h Function 440Dh Minor Code 4Bh). Only the lock owner can release the lock on a volume.

To release the lock on the volume, an application must call Unlock Physical Volume the same number of times that Lock Physical Volume was called.


Int 21h Function 440Dh Minor Code 6Ch (FAT32)

Polls the state of the access flag on a volume to determine if a write operation (for example, deleting or renaming a file or writing to a file) or a new file mapping has occurred since the last poll.

mov ax, 440Dh        ; generic IOCTL
mov bl, DriveNum     ; see below
mov ch, DeviceCat    ; see below
mov cl, 6Ch          ; Get Lock Flag State
int 21h

jc error_handler
mov [AccessFlag], ax  ; state of access flag

Parameters

DriveNum
Drive to poll. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Return Values

Clears the carry flag and sets the AX register to one of the following values if successful.

Value | Description
0 | No write operations or file mappings have occurred since the last poll.
1 | A write operation has occurred since the last poll (clears the volume access flag).
2 | A file mapping has occurred since the last poll, or a 32-bit Windows-based DLL or executable has been opened (clears the volume access flag).

Otherwise, the function sets the carry flag and sets the AX register to an error value.

Remarks

Only the current lock owner may poll the access flag. The system fails other processes with ERROR_ACCESS_DENIED error value. Write operations performed by the lock owner do not cause a change in the state of the access flag.

When a lock is obtained that allows write operations or new file mappings, the system sets a flag whenever one of these operations happens on the volume. If a write operation or new file mapping has occurred since the last poll, Get Lock Flag State returns 1 or 2 respectively in the AX register and clears the volume access flag. If the swap file has grown or shrunk since the last poll, Get Lock Flag State returns 1. Note that write operations to the swap file that do not cause a change in size do not cause a change in the state of the access flag. If a 32-bit Windows-based DLL or executable has been opened since the last poll, Get Lock Flag State returns 2.


Int 21h Function 440Dh Minor Code 6Dh (FAT32)

Enumerates open files on the specified drive.

mov ax, 440Dh           ; generic IOCTL
mov bx, DriveNum        ; see below
mov ch, DeviceCat       ; see below
mov cl, 6Dh             ; Enumerate Open Files
mov dx, seg PathBuf     ; see below
mov ds, dx
mov dx, offset PathBuf
mov si, FileIndex       ; see below
mov di, EnumType        ; see below
int 21h

jc  error
mov [OpenMode], ax      ; mode file was opened in
mov [FileType], cx      ; normal file or memory-mapped file

Parameters

DriveNum
Drive on which to enumerate the files. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

PathBuf
Address of a buffer that receives the path of the open file. The length of the buffer varies depending on the volume. Get Volume Information (Interrupt 21h Function 71A0h) is used to determine the maximum allowed length of a path for the volume.
FileIndex
Index of the file to retrieve the path for.
EnumType
Kind of file to enumerate. This parameter can be 0 to enumerate all open files or 1 to enumerate only open unmovable files, including open memory-mapped files and other open unmovable files (32-bit Windows-based DLLs and executables).

Return Values

Clears the carry flag, copies the path of an open file to the given buffer, and sets the AX and CX registers to the following values if successful:

AX | Mode that the file was opened in, which is a combination of access mode, sharing mode, and open flags. It can be one value each from the access and sharing modes and any combination of open flags.
 | Access modes
 | OPEN_ACCESS_READONLY (0000h)
 | OPEN_ACCESS_WRITEONLY (0001h)
 | OPEN_ACCESS_READWRITE (0002h)
 | OPEN_ACCESS_RO_NOMODLASTACCESS (0004h)
 | Share modes
 | OPEN_SHARE_COMPATIBLE (0000h)
 | OPEN_SHARE_DENYREADWRITE (0010h)
 | OPEN_SHARE_DENYWRITE (0020h)
 | OPEN_SHARE_DENYREAD (0030h)
 | OPEN_SHARE_DENYNONE (0040h)
 | Open flags
 | OPEN_FLAGS_NOINHERIT (0080h)
 | OPEN_FLAGS_NO_BUFFERING (0100h)
 | OPEN_FLAGS_NO_COMPRESS (0200h)
 | OPEN_FLAGS_ALIAS_HINT (0400h)
 | OPEN_FLAGS_NOCRITERR (2000h)
 | OPEN_FLAGS_COMMIT (4000h)
CX | File type. It can be one of the following values:

0 | For normal files
1 | For a memory-mapped files (memory-mapped files are unmovable)
2 | For any other unmovable files (32-bit Windows-based DLLs and executables)
4 | For the swap file

Note that if a memory-mapped file is returned (CX = 1), the value returned in the AX register is limited to the following values:

OPEN_ACCESS_READONLY (0000h)
OPEN_ACCESS_READWRITE (0002h)

Otherwise, the function sets the carry flag and sets the AX register to the following error value:

ERROR_ACCESS_DENIED The value of FileIndex exceeds the number of open files on the drive.

Remarks

This function returns information about one file at a time. To enumerate all open files, the function must be called repeatedly with FileIndex set to a new value for each call. FileIndex should be set to zero initially and then incremented by one for each subsequent call. The function returns the ERROR_NO_MORE_FILES error value when all open files on the volume have been enumerated.

This function may return inconsistent results when used to enumerate files on an active volume 3/4 that is, on a volume where other processes may be opening and closing files. Applications should use Lock Logical Volume (Interrupt 21h Function 440Dh Minor Code 4Ah) to take a level 3 lock before enumerating open files.


Int 21h Function 440Dh Minor Code 6Eh (FAT32)

Retrieves information about the swap file.

mov ax, 440Dh       ; generic IOCTL
mov ch, DeviceCat       ; see below
mov cl, 6Eh             ; Find Swap File
mov dx, seg PathBuf     ; see below
mov ds, dx
mov dx, offset PathBuf
int 21h

jc  error_handler
mov [PagerType], ax            ; pager type
mov WORD PTR [FileSize], bx    ; swap file size in 4K pages
mov WORD PTR [FileSize+2], cx

Parameters

DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

PathBuf
Address of the buffer that receives the path of the swap file. To determine the maximum allowed length of a path for the volume, call Get Volume Information (Interrupt 21h Function 71A0h).

Return Values

Clears the carry flag, copies the swap file path to the given buffer, and sets the following registers if successful:

Value |  | Description
AX | Pager type. It can be 1 for no pager, 2 for paging through MS-DOS, and 3 for paging through the protected-mode input and output (I/O) supervisor.
CX:BX | Current size of the swap file in 4K pages.

Otherwise, this function sets the carry flag and sets the AX register to an error value.


Int 21h Function 440Dh Minor Code 6Fh (FAT32)

Retrieves information about the specified drive. This call only works under Windows 95. It will fail if called from exclusive MS-DOS mode.

mov ax, 440Dh             ; Generic IOCTL
mov bx, DriveNum          ; See below
mov ch, DeviceCat         ; See below
mov cl, 6Fh               ; Get drive map info
mov dx, seg DriveMapInfo  ; See below
mov ds, dx
mov dx, offset DriveMapInfo
int 21h

jc  error_handler         ; Carry set means error

Parameters

DriveNum
Drive to obtain information about (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

DriveMapInfo
Pointer to the DRIVE_MAP_INFO structure that receives information about the specified drive. The DRIVE_MAP_INFO structure has the following form:
DRIVE_MAP_INFO    struc
    dmiAllocationLength   db ?
    dmiInfoLength         db ?
    dmiFlags              db ?
    dmiInt13Unit          db ?
    dmiAssociatedDriveMap dd ?
    dmiPartitionStartRBA  dq ?
DRIVE_MAP_INFO    ends


Int 21h Function 440Dh Minor Code 70h (FAT32)

Retrieves the current lock level and permissions on the specified drive.

mov ax, 440Dh        ; generic IOCTL
mov bl, DriveNum     ; see below
mov ch, DeviceCat    ; see below
mov cl, 70h          ; Get Current Lock State
int 21h

jc error_handler

Parameters

DriveNum
Drive to retrieve lock information about. This parameter can be 0 for the default drive, 1 for A, 2 for B, and so on.
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

Return Values

Clears the carry flag and sets the AX and CX registers to these values if successful:

AX | Current lock level. It may be either 0, 1, 2 or 3. If the volume is not locked, AX contains - 1
CX | Lock permissions. The bits have the following form:

Bit | Meaning
0 | 0 = Write operations are failed.
0 | 1 = Write operations are allowed, unless they are blocked by the lock level.
1 | 0 = New file mapping are allowed, unless they are blocked by the lock level.
1 | 1 = New file mapping are failed.
2 | 1 = The volume is locked for formatting.

Remarks

The lock level and the permissions determine the kind of access processes other than the lock owner have to the volume while it is locked. The following operations are allowed by processes other than lock owner at each lock level.

Level | Operations
0 | Read operations, write operations, and new file mappings are failed.
1 | Read operations are allowed. Write operations and new file mappings are either allowed or failed based on permissions.
2 | Read operations are allowed. Write operations and new file mappings are either failed or blocked based on permissions.
3 | Read operations are blocked. Write operations and new file mappings are either failed or blocked based on permissions.


Int 21h Function 440Dh Minor Code 71h (FAT32)

Retrieves the first cluster of the specified file or directory. This function is only supported by Windows 95. It will fail if called under MS-DOS. To call this function, the caller must hold a level 3 lock on the drive.

mov ax, 440Dh            ; Generic IOCTL
mov bx, CharSet          ; See below
mov ch, DeviceCat        ; See below
mov cl, 71h              ; Get first cluster
mov dx, seg PathName     ; See below
mov ds, dx
mov dx, offset PathName
int 21h

jc error_handler         ; Carry set means error

Parameters

CharSet
The character set of PathName. This parameter must be one of the following values.
Value | Description
BCS_WANSI (0) | Windows ANSI character set
BCS_OEM (1) | Current OEM character set
BCS_UNICODE (2) | Unicode character set

DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value | Description
08h | FAT32, FAT16, or FAT12 drive.
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

PathName
Pointer to a null-terminated string containing the path of the file or directory to retrieve the first cluster for.

Return Values

If the function is successful, clears the carry flag and sets DX:AX to the first cluster number. Otherwise, sets the carry flag and returns either the ERROR_INVALID_FUNCTION or ERROR_ACCESS_DENIED value in AX.

Remarks

The first cluster of a file is the first cluster of the FAT cluster chain describing the data associated with the file. The first cluster of a directory is the first cluster of the FAT cluster chain associated with the directory. The first cluster is the cluster that contains the "." and ".." entries. The Get First Cluster function finds any file or directory regardless of attribute (system, hidden, or read-only). It does not find volume labels.

It is the calling application's responsibility to check to see if the returned cluster number is valid. The following code fragment checks for a valid cluster number and sets a flag accordingly. Note that the maxClus variable is a DWORD that represents the maximum legal cluster number computed from the drive parameters.

if((MAKELONG(regAX,regDX) < 2L) || (MAKELONG(regAX,regDX) > maxClus))
    bInvalidNum = TRUE;
else
    bInvalidNum = FALSE;


Int 21h Function 6Ch (FAT32)

Opens or creates a file that has the given name and attributes.

mov ah, 6Ch             ; Extended Open/Create
mov bx, ModeAndFlags    ; See below
mov cx, Attributes      ; See below
mov dx, Action          ; See below
mov si, seg Filename    ; See below
mov ds, si
mov si, offset Filename
int 21h

jc error_handler        ; Carry set means error

mov [Handle], ax        ; file handle
mov [ActionTaken], cx   ; action taken to open file

Parameters

ModeAndFlags
A combination of access mode, sharing mode, and open flags. This parameter can be a combination of one value from the access and sharing modes and any combination of open flags:
Access mode | Meaning
OPEN_ACCESS_READONLY (0000h) | Opens the file for reading only.
OPEN_ACCESS_WRITEONLY (0001h) | Opens the file for writing only.
OPEN_ACCESS_READWRITE (0002h) | Opens the file for reading and writing.
0003h | Reserved; do not use.
OPEN_ACCESS_RO_NOMODLASTACCESS (0004h) | Opens the file for reading only without modifying the file's last access date.

Sharing mode | Meaning
OPEN_SHARE_COMPATIBLE (0000h) | Opens the file in compatibility mode, allowing any process on a given computer to open the file any number of times.
OPEN_SHARE_DENYREADWRITE (0010h) | Opens the file and denies both read and write access to other processes.
OPEN_SHARE_DENYWRITE (0020h) | Opens the file and denies write access to other processes.
OPEN_SHARE_DENYREAD (0030h) | Opens the file and denies read access to other processes.
OPEN_SHARE_DENYNONE (0040h) | Opens the file without denying read or write access to other processes, but no process may open the file in compatibility mode.

Open flags | Meaning
OPEN_FLAGS_NOINHERIT (0080h) | Child processes created with Load and Execute Program (Interrupt 21h Function 4B00h) do not inherit the file handle. If the handle is needed by a child process, the parent process must pass the handle value to the child process. If this flag is not set, child processes inherit the file handle.
EXTENDED_SIZE (1000h) | The file is opened in extended mode. This allows access to files up to 4GB minus 2 bytes. Access includes open and create functions.
OPEN_FLAGS_NOCRITERR (2000h) | If a critical error occurs while MS-DOS is opening this file, Critical-Error Handler (Interrupt 24h) is not called. Instead, MS-DOS simply returns an error value to the program.
OPEN_FLAGS_COMMIT (4000h) | After each write operation, MS-DOS commits the file (flushes the contents of the cache buffer to disk).

Attributes
Attributes for files that are created or truncated. This parameter may be a combination of these values.
Value | Description
FILE_ATTRIBUTE_NORMAL (0000h) | The file can be read from or written to. This value is valid only if used alone.
FILE_ATTRIBUTE_READONLY (0001h) | The file can be read from, but not written to.
FILE_ATTRIBUTE_HIDDEN (0002h) | The file is hidden and does not appear in an ordinary directory listing.
FILE_ATTRIBUTE_SYSTEM (0004h) | The file is part of the operating system or is used exclusively by it.
FILE_ATTRIBUTE_VOLUME (0008h) | The name specified by Filename is used as the volume label for the current medium.
FILE_ATTRIBUTE_ARCHIVE (0020h) | The file is an archive file. Applications use this value to mark files for backup or removal.

Action
Action to take it the file exists or does not exist. This parameter can be a limited combination of the following values.
Value | Description
FILE_CREATE (0010h) | Creates a new file if it does not already exist or fails if the file already exists.
FILE_OPEN (0001h) | Opens the file. The function fails if the file does not exist.
FILE_TRUNCATE (0002h) | Opens the file and truncates it to zero length (replaces the existing file). The function fails if the file does not exist.

Note that valid combinations of the above values are limited to FILE_CREATE combined with FILE_OPEN or FILE_CREATE combined with FILE_TRUNCATE.

Filename
Pointer to a null-terminated string specifying the name of the file to be opened or created. The name must be in the standard MS-DOS 8.3 filename format. The string must be a valid path for the volume associated with the given drive.

Return Values

If the function is successful, clears the carry flag, copies the file handle to the AX register, and sets CX to one of the following values.

  • ACTION_OPENED (0001h)
  • ACTION_CREATED_OPENED (0002h)
  • ACTION_REPLACED_OPENED (0003h)

Otherwise, sets the carry flag and sets the AX register to one of the following error values.

  • ERROR_INVALID_FUNCTION (0001h)
  • ERROR_FILE_NOT_FOUND (0002h)
  • ERROR_PATH_NOT_FOUND (0003h)
  • ERROR_TOO_MANY_OPEN_FILES (0004h)
  • ERROR_ACCESS_DENIED (0005h)

Remarks

This function does not support long filenames. If the specified name is too long, this function truncates the name to the standard 8.3 format following the same naming scheme that the system uses when creating an alias for a long filename.

A file on a remote directory-that is, a directory on the network-cannot be opened, unless appropriate permissions for the directory exist.


Int 21h Function 7302h Get_ExtDPB (FAT32)

Returns a copy of the extended DPB for any valid drive.

Buffer   dw  ?
DriveDPB DPB <>
BufferSize equ sizeof DPB + sizeof WORD
...
mov  dx, seg Buffer
mov  es, dx
mov  di, offset Buffer  ;See below

mov  dl, DriveNum       ;See below
mov  cx, BufferSize     ;See below
mov  ax, 7302h          ;Get_ExtDPB
int  21h

jc  error_handler       ;carry set means error

Parameters

Buffer
The address of the buffer at ES:DI that will receive the WORD (the size value), followed by the copy of the extended DPB.
DriveNum
The 1-based drive number (0=default; 1=A, 2=B, and so on).
BufferSize
The size of the buffer, in bytes.

The size value returned by this function represents the size of DPB only. It does not include the two bytes of the size member itself.

This call will not work when the VDEF file system is mounted on the drive (for example during formatting).

Return Values

Clears the carry flag, and returns a copy of the DPB to ES:DI. The copy is a WORD equal to the size (in bytes) of the extended DPB, followed by the extended DPB itself (see EA_DEVICEPARAMETERS).

Remarks

When calling this function with DeviceIoControl, it is recommended to set the dwloControlCode parameter to VWIN32_DIOC_DOS_IOCTL (defined as 6 in VWIN32.H). For more information, see Using VWIN32 to Carry Out MS-DOS Functions.


Int 21h Function 7303h Get_ExtFreeSpace (FAT32)

Returns the total disk space and the free disk space.

mov  dx, seg Buffer
mov  es, dx
mov  di, offset Buffer    ;See below
mov  es:[di].ExtGetDskFreSpcStruc.ExtFree_Level, ExpectLevel
mov  cx, BufferSize       ;See below

mov  dx, seg DriveName    ;See below
mov  ds, dx
mov  dx, offset DriveName ;See below

mov  ax, 7303h            ;Get_ExtFreeSpace
int  21h

jc  error_handler         ;carry set means error

Parameters

Buffer
The address of the buffer at ES:DI that will receive the disk space information.
BufferSize
The size (in bytes) of the buffer.
DriveName
The address of a null terminated string at DS:DX. In real mode, this must be in standard form ("C:\"). In Windows, either the standard name or a universal naming convention form ("\\Server\Share") is acceptable.

Return Values

Clears the carry flag and returns the total disk space and the free disk space of the specified drive, in the form of an ExtGetDskFreSpcStruc structure, to a buffer at ES:DI. It is recommended to initialize the buffer to the level value the application expects to receive.

Remarks

When calling this function with DeviceIoControl, the dwloControlCode parameter must be set to VWIN32_DIOC_DOS_IOCTL (defined as 6 in VWIN32.H). For more information, see Using VWIN32 to Carry Out MS-DOS Functions.


Int 21h Function 7304h Set_DPBForFormat (FAT32)

Implements a sub-function to perform DPB operations.

There are five sub-functions that can be implemented. The buffer at ES:DI must contain a SDPDFormatStruc structure. The value in the DWORD member, SetDPB_Function, determines which sub-function is called.

mov  dx, seg Buffer
mov  es, dx
mov  di, offset Buffer   ;See below

mov  es:[di].SDPDFormatStruc.SetDPB_Level, ExpectLevel   ;See below

mov  ax, word ptr Value1 ; initialize SDPDFormatStruc values.
                         ; See specific sub-function for details.

mov  word ptr es:[di].SDPDFormatStruc.SetDPB_Value1, ax
mov  ax, word ptr Value1 + 2
mov  word ptr es:[di].SDPDFormatStruc.SetDPB_Value1+2, ax

mov  ax, word ptr SubFunction
mov  word ptr es:[di].SDPDFormatStruc.SetDPB_Function, ax
mov  word ptr es:[di].SDPDFormatStruc.SetDPB_Function+2, 0

mov  dl, DriveNum       ;See below
mov  cx, BufferSize     ;See below
mov  ax, 7304h          ;Set_DPBForFormat
int 21h

Parameters

Buffer
The address of a buffer containing a SDPDFormatStruc structure at ES:DI.
ExpectLevel
The expected return level value. This should be 0.
DriveNum
The 1-based drive number (0=default; 1=A, 2=B, and so on).
BufferSize
The size of the buffer, in bytes.

Remarks

The value in the SetDPB_Function member of the SDPDFormatStruc structure determines which sub-function is implemented.

Value | Description
0 | SetDPB_SetAllocInfo
1 | SetDPB_SetDPBFrmBPB
2 | SetDPB_ForceMediaChng
3 | SetDPB_GetSetActFATandMirr
4 | SetDPB_GetSetRootDirClus

It is important to be aware of the state of the file system when using this call. If sectors of the drive are cached, or if there are files open, the function may produce unexpected results. To avoid this, ensure that the application closes all files and calls DiskReset to flush and invalidate any caches.

The SDPDFormatStruc also contains four ULONG fields: SetDPB_Value1, SetDPB_Value2, SetDPB_Value3, and SetDPB_Value4. Set these appropriately according to the requirements for each of the sub-functions.

When calling this function with DeviceIoControl, set the dwloControlCode parameter to VWIN32_DIOC_DOS_IOCTL (defined as 6 in VWIN32.H). For more information, see Using VWIN32 to Carry Out MS-DOS Functions.


SetDPB_SetAllocInfo (FAT32)

Sets the dpb_free_cnt and dpb_next_free fields in the DPB.

This sub-function is called when the SetDPB_Function member of the SDPDFormatStruc structure is set to 0.

Return Values

Clears the carry flag and sets the dpb_free_cnt and dpb_next_free fields in the DPB based upon the values in the SetDPB_Value1 and SetDPB_Value2 fields within the Set_DPB_ForFormat structure.

Remarks

The value in the SetDPB_Value1 member of the Set_DPB_ForFormat structure determines the following results.

SetDPB_Value1 setting | Result within DPB
0 | Does not change the dpb_free_cnt member.
0xFFFFFFFF | Sets dpb_free_cnt to unknown.
(any other value) | Sets dpb_free_cnt to the specified value if it is a valid cluster count for the drive,.

The free cluster count cannot be explicitly set to zero by this call. This can only be done by setting SetDPB_Value1 to 0xFFFFFFFF, which forces the free space to be re-computed. Also, setting this value improperly causes the free count value to be reported improperly by the GetDiskFreeSpace function. The settings of 0 or 0xFFFFFFFF are recommended.

SetDPB_Value2 setting | Result within DPB
0 | Does not change the dpb_next_free member.
0xFFFFFFFF | Sets dpb_next_free to force the cluster search to begin at the beginning of the FAT.
(any other value) | Sets dpb_next_free to the given value if it is a valid cluster number for the drive. This causes the search for free clusters to begin at the specified cluster.

The assembler calling sequence for all Int 21h 7304h sub-functions is almost identical. See the main listing for a sample. (Int 21h Function 7304h Set_DPBForFormat)


SetDPB_SetDPBFrmBPB (FAT32)

Rebuilds the file system drive DPB from a passed-in BPB.

This sub-function is called when the SetDPB_Function member of the SDPDFormatStruc structure is set to 1.

Remarks

On input, the SetDPB_Value2 member in SDPDFormatStruc must be a DWORD pointer to the BPB.

The PB to which SetDPB_Value2 points can be in FAT12, FAT16 or FAT32 format.

The drive parameters are often held in the device driver for the drive as well. As a result, it is recommended to accompany this call with a call to Int 21h Function 440Dh Minor Code 40h.

The assembler calling sequence for all Int 21h 7304h sub-functions is almost identical. See the main listing for a sample. (Int 21h Function 7304h Set_DPBForFormat)


SetDPB_ForceMediaChng (FAT32)

Forces a media change.

This sub-function is called when the SetDPB_Function member of the SDPDFormatStruc structure is set to 2.

Return Values

Sets a flag which causes the next MS-DOS access to the drive to call the BUILD_DPD routine in the drive's device driver.

Remarks

This is similar to the SetDPB_SetDPBFrmBPB call, except that the BPB is obtained from the device driver instead of a passed-in parameter.

The function does not take effect on this call. Rather, it takes effect upon the next access to the drive. Therefore, it is recommended to immediately follow this with some other Int 21h call to the drive (for example Int 21h Function 7303h Get_ExtFreeSpace).

As a side effect of this call, the next access to the drive also causes dpb_next_free (or extdpb_next_free) to be reset to 2, and the dpb_free_cnt to be reset to 0xFFFFFFFF.

The assembler calling sequence for all Int 21h 7304h sub-functions is almost identical. See the main listing for a sample. (Int 21h Function 7304h Set_DPBForFormat)


SetDPB_GetSetActFATandMirr (FAT32)

Allows the active FAT and FAT mirror properties of a FAT32 drive to be read and changed. This call is invalid on FAT12 and FAT16 drives.

This sub-function is called when the SetDPB_Function member of the SDPDFormatStruc structure is set to 3.

Parameters

SetDPB_Value1
The SetDPB_Value1 member in the SPDPFormatStruc structure determines the SET behavior. If the SetDPB_Value1 member is set to 0xFFFFFFFF, then no changes are made and the ActiveFat and FAT mirror property are returned to SetDPB_Value2.

The low four bits of this value are the zero-based ActiveFAT number. If the ActiveFAT number is greater than or equal to the number of FATs on the drive, the call will fail.

Bit 0x00000080 is the "Disable FAT Mirror" bit. If any bits other than 0x80 and the low four bits are set, the call will fail.

If the FAT Mirror is enabled (bit 0x80 clear) and the ActiveFAT value specified in SetDPB_Value1 is not zero, the call will fail.

SetDPB_Value2
Used as a return value for the previous ActiveFAT and FAT mirror properties. Bits 0 through 3 indicate the active FAT number, bit 7 indicates the mirror state, and all other bits are reserved. If SetDPB_Value1 is 0xFFFFFFFF, the previous state is also the current state.
Bit 7 | Description
Set | Enable FAT Mirroring
Clear | Disable FAT Mirroring

Return Values

If the function is unsuccessful, the function sets the carry flag and returns ERROR_GEN_FAILURE (error code 31) to AX. Receiving ERROR_GEN_FAILURE as the return value indicates that a disk error occurred during the attempt to write. In this case, the DPB mirror property is changed, but not properly written to disk. If the function fails, it is recommended that the caller re-write the value returned to SetDBP_Value2 to attempt to undo the change.

Remarks

The BPB(s) and boot sector(s) of the drive are also written. This is because the ActiveFAT and FAT mirror properties are also stored in the BPB.

If the FAT Mirror is being enabled (that is, bit 0x80 is set in the current state, and bit 0x80 is clear in SetDPB_Value1.) this call will copy the active FAT sectors to all of the other FATs. This process can be very slow.

Note that the device driver may also contain these values as part of its current device parameters. This call will have no effect on the FAT Mirror properties held by the device driver. As a result, it is recommended to immediately follow the set form of the call with a SetDeviceParameters Generic IOCTL call to set the current BPB that the BuildBPB routine of the device returns.

Next Free DPB variable is reset to 2, and the Free Count DPB is reset to 0xFFFFFFFF.

The assembler calling sequence for all Int 21h 7304h sub-functions is almost identical. See the main listing for a sample. (Int 21h Function 7304h Set_DPBForFormat)


SetDPB_GetSetRootDirClus (FAT32)

Allows the first cluster of the root directory of a FAT32 drive to be read and changed. This call is invalid on FAT12 and FAT16 drives.

This sub-function is called when the SetDPB_Function member of the SDPDFormatStruc structure is set to 4.

Parameters

SetDPB_Value1
This member in the SPDPFormatStruc specifies the SET behavior. If the value is 0xFFFFFFFF, then no changes are made and the current root directory first cluster number is returned in SetDPB_Value2.

The value is range checked. It must be >=2 and <= the maximum valid cluster number for the drive.

SetDPB_Value2
This member in the SPDPFormatStruc is used as a return value where the previous root directory first cluster is held. When SetDPB_Value1 is 0xFFFFFFFF, the previous cluster is also the current root directory cluster.

Return Values

If the function is unsuccessful, the function sets the carry flag and returns ERROR_GEN_FAILURE (error code 31) to AX. Receiving ERROR_GEN_FAILURE as the return value indicates that a disk error occurred during the attempt to write. In this case, the DPB mirror property is changed, but not properly written to disk. If the function fails, it is recommended that the caller re-write the value returned to SetDBP_Value2 to attempt to undo the change.

Remarks

Since the start cluster of the root directory is also stored in the BPB of the boot sector(s) of the drive, this call re-writes these boot sectors as a side effect.

Note that the device driver may also contain these values as part of its current device parameters. This call will have no effect on the FAT Mirror properties held by the device driver. Because of this, it is recommended to immediately follow the set form of the call with a SetDeviceParameters Generic IOCTL call. This sets the current BPB that the BuildBPB routine of the device returns.

The assembler calling sequence for all Int 21h 7304h sub-functions is almost identical. See the main listing for a sample. (Int 21h Function 7304h Set_DPBForFormat)


Int 21h Function 7305h Ext_ABSDiskReadWrite (FAT32)

Allows absolute disk read/write to FAT32, FAT16, and FAT12 drives. This call replaces Int 25h/26h.

mov  si, 6001h          ;write normal file data. SI=0 for read
                        ;see "In Write Mode" below for more write values

mov  cx, -1             ;cx must be -1
mov  dx, seg Buffer
mov  ds, dx
mov  bx, offset Buffer  ;See below
mov  dl, DriveNum       ;See below

mov  ax, 7305h          ;Ext_ABSDiskReadWrite
int 21h

jc  error_handler       ;carry set means error

Parameters

Buffer
Points to a DISKIO structure that contains the starting sector, the sector count and an address of the buffer to receive the data. The structure must be initialized according to Int 25h/26h documentation. The DISKIO structure has the following form:
DISKIO  STRUC
    diStartSector   dd  ?   ;sector number to start
    diSectors       dw  ?   ;number of sectors
    diBuffer        dd  ?   ;address of buffer
DISKIO  ENDS
DriveNum
The 1-based drive number (0=default; 1=A, 2=B, and so on).

This function operates the same as Int 25h/26h, with the following exceptions:

CX must equal -1 (only the 32-bit starting sector number form is allowed).

The drive number is 1-based (0 = default drive) and is specified in DL instead of AL.

This call does not leave a flag word on the stack like Interrupts 25h and 26h.

This call modifies only the AX register and the flags.

Bit 0 of SI specifies whether the call is to do a READ (INT 0x25) or a WRITE (INT 0x26).
SI bit 0 | Read/write mode
Clear | READ
Set | WRITE

When bit 0 of SI is set (that is, WRITE mode), bits 13, 14 and 15 of SI categorize what type of data is being written:
15 | 14 | 13 | Description
0 | 0 | 0 | Other/Unknown.
0 | 0 | 1 | FAT data.
0 | 1 | 0 | Directory data.
0 | 1 | 1 | Normal file data.
1 | x | x | Reserved. Bit 15 must be 0.

All other bits of SI (1 through 12) are reserved and must be 0.

This provides information to apps (like compression drivers) so that they can write the data properly based upon the data type specified by the above bits.

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag, and sets the AX register with the error code as it is documented for Int 25h/26h.

Remarks

When calling this function with DeviceIoControl, it is recommended to set the dwloControlCode parameter to VWIN32_DIOC_DOS_DRIVEINFO (defined as 6 in VWIN32.H). For more information, see Using VWIN32 to Carry Out MS-DOS Functions.

Warnings

Do not set these flags in an attempt to make a compression driver write uncompressed data onto a compressed drive. Compression drivers are not the only applications use these flags.

Do not set the flags improperly, this information is to be used only to indicate what "type" the data is.


FAT32 Structures

The following are the FAT32 structures.

BPB
BIGFATBOOTFSINFO
DPB
EA_DEVICEPARAMETERS
ExtGetDskFreSpcStruc
s_partition
SDPDFormatStruc


BPB (FAT32)

The BPB for FAT32 drives is an extended version of the FAT16/FAT12 BPB. It contains identical information to a standard BPB, but also includes several extra fields for FAT32 specific information.

This structure is implemented in Windows OEM Service Release 2 and later.

A_BF_BPB    STRUC
    A_BF_BPB_BytesPerSector       DW    ?
    A_BF_BPB_SectorsPerCluster    DB    ?
    A_BF_BPB_ReservedSectors      DW    ?
    A_BF_BPB_NumberOfFATs         DB    ?
    A_BF_BPB_RootEntries          DW    ?
    A_BF_BPB_TotalSectors         DW    ?
    A_BF_BPB_MediaDescriptor      DB    ?
    A_BF_BPB_SectorsPerFAT        DW    ?
    A_BF_BPB_SectorsPerTrack      DW    ?
    A_BF_BPB_Heads                DW    ?
    A_BF_BPB_HiddenSectors        DW    ?
    A_BF_BPB_HiddenSectorsHigh    DW    ?
    A_BF_BPB_BigTotalSectors      DW    ?
    A_BF_BPB_BigTotalSectorsHigh  DW    ?
    A_BF_BPB_BigSectorsPerFat     DW    ?
    A_BF_BPB_BigSectorsPerFatHi   DW    ?
    A_BF_BPB_ExtFlags             DW    ?
    A_BF_BPB_FS_Version           DW    ?
    A_BF_BPB_RootDirStrtClus      DW    ?
    A_BF_BPB_RootDirStrtClusHi    DW    ?
    A_BF_BPB_FSInfoSec            DW    ?
    A_BF_BPB_BkUpBootSec          DW    ?
    A_BF_BPB_Reserved             DW    6 DUP (?)
A_BF_BPB    ENDS

Members

A_BF_BPB_BytesPerSector
The number of bytes per sector.
A_BF_BPB_SectorsPerCluster
The number of sectors per cluster.
A_BF_BPB_ReservedSectors
The number of reserved sectors, beginning with sector 0.
A_BF_BPB_NumberOfFATs
The number of File Allocation Tables.
A_BF_BPB_RootEntries
This member is ignored on FAT32 drives.
A_BF_BPB_TotalSectors
The size of the partition, in sectors.
A_BF_BPB_MediaDescriptor
The media descriptor. Values in this member are identical to standard BPB.
A_BF_BPB_SectorsPerFAT
The number of sectors per FAT.

Note: This member will always be zero in a FAT32 BPB. Use the values from A_BF_BPB_BigSectorsPerFat and A_BF_BPB_BigSectorsPerFatHi for FAT32 media.

A_BF_BPB_SectorsPerTrack
The number of sectors per track.
A_BF_BPB_Heads
The number of read/write heads on the drive.
A_BF_BPB_HiddenSectors
The number of hidden sectors on the drive.
A_BF_BPB_HiddenSectorsHigh
The high word of the hidden sectors value.
A_BF_BPB_BigTotalSectors
The total number of sectors on the FAT32 drive.
A_BF_BPB_BigTotalSectorsHigh
The high word of the FAT32 total sectors value.
A_BF_BPB_BigSectorsPerFat
The number of sectors per FAT on the FAT32 drive.
A_BF_BPB_BigSectorsPerFatHi
The high word of the FAT32 sectors per FAT value.
A_BF_BPBExtFlags
Flags describing the drive. Bit 8 of this value indicates whether or not information written to the active FAT will be written to all copies of the FAT. The low 4 bits of this value contain the 0-based FAT number of the Active FAT, but are only meaningful if bit 8 is set. This member can contain a combination of the following values.
Value | Description
BGBPB_F_ActiveFATMsk (000Fh) | Mask for low four bits.
BGBPB_F_NoFATMirror (0080h) | Mask indicating FAT mirroring state. If set, FAT mirroring is disabled. If clear, FAT mirroring is enabled.

Bits 4-6 and 8-15 are reserved.

A_BF_BPB_FS_Version
The file system version number of the FAT32 drive. The high byte represents the major version, and the low byte represents the minor version.
A_BF_BPB_RootDirStrtClus
The cluster number of the first cluster in the FAT32 drive's root directory.
A_BF_BPB_RootDirStrtClusHi
The high word of the FAT32 starting cluster number.
A_BF_BPB_FSInfoSec
The sector number of the file system information sector. The file system info sector contains a BIGFATBOOTFSINFO structure. This member is set to 0FFFFh if there is no FSINFO sector. Otherwise, this value must be non-zero and less than the reserved sector count.
A_BF_BPB_BkUpBootSec
The sector number of the backup boot sector. This member is set to 0FFFFh if there is no backup boot sector. Otherwise, this value must be non-zero and less than the reserved sector count.
A_BF_BPB_Reserved
Reserved member. Do not use.


BIGFATBOOTFSINFO (FAT32)

Contains information about the file system on a FAT32 volume. This structure is implemented in Windows OEM Service Release 2 and later.

BIGFATBOOTFSINFO STRUC
    bfFSInf_Sig               DD    ?
    bfFSInf_free_clus_cnt     DD    ?
    bfFSInf_next_free_clus    DD    ?
    bfFSInf_resvd             DD    3 DUP (?)
BIGFATBOOTFSINFO ENDS

Members

bfFSInf_Sig
The signature of the file system information sector. The value in this member is FSINFOSIG (0x61417272L).
bfFSInf_free_clus_cnt
The count of free clusters on the drive. Set to -1 when the count is unknown.
bfFSInf_next_free_clus
The cluster number of the cluster that was most recently allocated.
bfFSInf_resvd
Reserved member. Do not use.


DPB (FAT32)

The DPB was extended to include FAT32 information. Changes are effective for Windows 95 OEM Service Release 2 and later.

DPB STRUC
    dpb_drive            DB    ?
    dpb_unit             DB    ?
    dpb_sector_size      DW    ?
    dpb_cluster_mask     DB    ?
    dpb_cluster_shift    DB    ?
    dpb_first_fat        DW    ?
    dpb_fat_count        DB    ?
    dpb_root_entries     DW    ?
    dpb_first_sector     DW    ?
    dpb_max_cluster      DW    ?
    dpb_fat_size         DW    ?
    dpb_dir_sector       DW    ?
    dpb_reserved2        DD    ?
    dpb_media            DB    ?
ifdef NOTFAT32
    dpb_first_access     DB    ?
else
    dpb_reserved         DB    ?
endif
    dpb_reserved3        DD    ?
    dpb_next_free        DW    ?
    dpb_free_cnt         DW    ?
ifndef NOTFAT32
    extdpb_free_cnt_hi   DW    ?
    extdpb_flags         DW    ?
    extdpb_FSInfoSec     DW    ?
    extdpb_BkUpBootSec   DW    ?
    extdpb_first_sector  DD    ?
    extdpb_max_cluster   DD    ?
    extdpb_fat_size      DD    ?
    extdpb_root_clus     DD    ?
    extdpb_next_free     DD    ?
endif
DPB ENDS

Members

dpb_drive
The drive number (0 = A, 1 = B, and so on).
dpb_unit
Specifies the unit number. The device driver uses the unit number to distinguish the specified drive from the other drives it supports.
dpb_sector_size
The size of each sector, in bytes.
dpb_cluster_mask
The number of sectors per cluster minus 1.
dpb_cluster_shift
The number of sectors per cluster, expressed as a power of 2.
dpb_first_fat
The sector number of the first sector containing the file allocation table (FAT).
dpb_fat_count
The number of FATs on the drive.
dpb_root_entries
The number of entries in the root directory.
dpb_first_sector
The sector number of the first sector in the first cluster.
dpb_max_cluster
The number of clusters on the drive plus 1. This member is undefined for FAT32 drives.
dpb_fat_size
The number of sectors occupied by each FAT. The value of zero indicates a FAT32 drive. Use the value in extdpb_fat_size instead.
dpb_dir_sector
The sector number of the first sector containing the root directory. This member is undefined for FAT32 drives.
dpb_reserved2
Reserved member. Do not use.
dpb_media
Specifies the media descriptor for the medium in the specified drive.
reserved
Reserved member. Do not use.
dpb_first_access
Indicates whether the medium in the drive has been accessed. This member is initialized to -1 to force a media check the first time this DPB is used.
dpb_reserved3
Reserved member. Do not use.
dpb_next_free
The cluster number of the most recently allocated cluster.
dpb_free_cnt
The number of free clusters on the medium. This member is 0FFFFh if the number is unknown.
extdpb_free_cnt_hi
The high word of free count.
extdpb_flags
Flags describing the drive. The low 4 bits of this value contain the 0-based FAT number of the Active FAT. This member can contain a combination of the following values.
Value | Description
BGBPB_F_ActiveFATMsk (000Fh) | Mask for low four bits.
BGBPB_F_NoFATMirror (0080h) | Do not mirror active FAT to inactive FATs.

Bits 4-6 and 8-15 are reserved.

extdpb_FSInfoSec
The sector number of the file system information sector. This member is set to 0FFFFh if there is no FSINFO sector. Otherwise, this value must be non-zero and less than the reserved sector count.
extdpb_BkUpBootSec
The sector number of the backup boot sector. This member is set to 0FFFFh if there is no backup boot sector. Otherwise, this value must be non-zero and less than the reserved sector count.
extdpb_first_sector
The first sector of the first cluster.
extdpb_max_cluster
The number of clusters on the drive plus 1.
extdpb_fat_size
The number of sectors occupied by the FAT.
extdpb_root_clus
The cluster number of the first cluster in the root directory.
extdpb_next_free
The number of the cluster that was most recently allocated.


EA_DEVICEPARAMETERS (FAT32)

The equivalent of the DEVICEPARAMS structure, but includes FAT32 specific information. This structure is implemented in Windows OEM Service Release 2 and later.

EA_DEVICEPARAMETERS STRUC
    EDP_SPECIALFUNCTIONS     DB     ?
    EDP_DEVICETYPE           DB     ?
    EDP_DEVICEATTRIBUTES     DW     ?
    EDP_CYLINDERS            DW     ?
    EDP_MEDIATYPE            DB     ?
    EDP_BPB                  DB     SIZE A_BF_BPB DUP (?)
    EDP_RESERVED1            DB     32 DUP (?)
    EDP_TRACKTABLEENTRIES    DW     ?
    EDP_SECTORTABLE          DB MAX_SECTORS_IN_TRACK * SIZE A_SECTORTABLE DUP (?)
EA_DEVICEPARAMETERS ENDS

This structure is identical to DEVICEPARAMS, but includes a FAT32 BPB instead of a standard BPB, followed by a 32 byte reserved member.


ExtGetDskFreSpcStruc (FAT32)

A structure used by Int 21h Function 7303h Get_ExtFreeSpace. The structure contains information about the drive's total disk space and free disk space.

This structure is implemented in Windows OEM Service Release 2 and later.

ExtGetDskFreSpcStruc STRUC
    ExtFree_Size                      DW    ?
    ExtFree_Level                     DW    ?
    ExtFree_SectorsPerCluster         DD    ?
    ExtFree_BytesPerSector            DD    ?
    ExtFree_AvailableClusters         DD    ?
    ExtFree_TotalClusters             DD    ?
    ExtFree_AvailablePhysSectors      DD    ?
    ExtFree_TotalPhysSectors          DD    ?
    ExtFree_AvailableAllocationUnits  DD    ?
    ExtFree_TotalAllocationUnits      DD    ?
    ExtFree_Rsvd                      DD    2 DUP (?)
ExtGetDskFreSpcStruc ENDS

Members

ExtFree_Size
A return value that represents the size of the ExtGetDskFreSpcStruc structure, in bytes. The Get_ExtFreeSpace sub-function returns the size value to this member. This member is used only as a return value.
ExtFree_Level
An input and return level value. This must be initialized to zero.
ExtFree_SectorsPerCluster
The number of sectors per cluster.
ExtFree_BytesPerSector
The number of bytes per sector.
ExtFree_AvailClusters
The number of available clusters.
ExtFree_TotalClusters
The total number of clusters on the drive.
ExtFree_AvailablePhysSectors
The number of physical sectors available on the drive, without adjustment for compression.
ExtFree_TotalPhysSectors
The total number of physical sectors on the drive, without adjustment for compression.
ExtFree_AvailableAllocationUnits
The number of available allocation units on the drive, without adjustment for compression.
ExtFree_TotalAllocationUnits
The total number of allocation units on the drive, without adjustment for compression.
ExtFree_Rsvd
Reserved member.


s_partition (FAT32)

Note: Values for head and track are 0-based. Sector values are 1-based. This structure is implemented in Windows OEM Service Release 2 and later.

s_partition    STRUC
    Part_BootInd        DB    ?
    Part_FirstHead      DB    ?
    Part_FirstSector    DB    ?
    Part_FirstTrack     DB    ?
    Part_FileSystem     DB    ?
    Part_LastHead       DB    ?
    Part_LastSector     DB    ?
    Part_LastTrack      DB    ?
    Part_StartSector    DD    ?
    Part_NumSectors     DD    ?
s_partition    ENDS

Members

Part_BootInd
Specifies whether the partition is bootable or not. This value could be set to PART_BOOTABLE (80h), or PART_NON_BOOTABLE(00h). The first partition designated as PART_BOOTABLE is the boot partition. All others are not. Setting multiple partitions to PART_BOOTABLE will result in boot errors.
Part_FirstHead
The first head of this partition. This is a 0-based number representing the offset from the beginning of the disk. The partition includes this head.
Part_FirstSector
The first sector of this partition. This is a 1-based, 6-bit number representing the offset from the beginning of the disk. The partition includes this sector. Bits 0 through 5 specify the 6-bit value; bits 6 and 7 are used with the Part_FirstTrack member.
Part_FirstTrack
The first track of this partition. This is an inclusive 0-based, 10-bit number that represents the offset from the beginning of the disk. The high 2 bits of this value are specified by bits 6 and 7 of the Part_FirstSector member.
PartFileSystem
Specifies the file system for the partition. The following are acceptable values:
Value | Description
PART_UNKNOWN(00h) | Unknown.
PART_DOS2_FAT(01h) | 12-bit FAT.
PART_DOS3_FAT(04h) | 16-bit FAT. Partition smaller than 32MB.
PART_EXTENDED(05h) | Extended MS-DOS Partition.
PART_DOS4_FAT(06h) | 16-bit FAT. Partition larger than or equal to 32MB.
PART_DOS32(0Bh) | 32-bit FAT. Partition up to 2047GB.
PART_DOS32X(0Ch) | Same as PART_DOS32(0Bh), but uses Logical Block Address Int 13h extensions.
PART_DOSX13(0Eh) | Same as PART_DOS4_FAT(06h), but uses Logical Block Address Int 13h extensions.
PART_DOSX13X(0Fh) | Same as PART_EXTENDED(05h), but uses Logical Block Address Int 13h extensions.

Part_LastHead
The last head of the partition. This is a 0-based number that represents the offset from the beginning of the disk. The partition includes the head specified by this member.
Part_LastSector
The last sector of this partition. This is a 1-based, 6-bit number representing offset from the beginning of the disk. The partition includes the sector specified by this member. Bits 0 through 5 specify the 6-bit value; bits 6 and 7 are used with the Part_LastTrack member.
Part_LastTrack
The last track of this partition. This is a 0-based, 10-bit number that represents offset from the beginning of the disk. The partition includes this track. The high 2 bits of this value are specified by bits 6 and 7 of the Part_LastSector member.
Part_StartSector
Specifies the 1-based number of the first sector on the disk. This value may not be accurate for extended partitions. Use the Part_FirstSector value for extended partitions.
Part_NumSectors
The 1-based number of sectors in the partition.


SDPDFormatStruc (FAT32)

Structure used to hold information on executing the various sub-functions of Int 21h Function 7304h Set_DPBForFormat. This structure is implemented in Windows OEM Service Release 2 and later.

SDPDFormatStruc STRUC
    SetDPB_Size        DW    ?
    SetDPB_Level       DW    ?
    SetDPB_Function    DD    ?
    SetDPB_Value1      DD    ?
    SetDPB_Value2      DD    ?
    SetDPB_Value3      DD    ?
    SetDPB_Value4      DD    ?
SDPDFormatStruc ENDS

Members

SetDPB_Size
A return value member for the sub-functions. This is not an input member.
SetDPB_Level
An input and return level value member. This must be set to 0.
SetDPB_Funtion
Specifies which sub-function will be implemented. The acceptable values are as follows:
Value | Description
0 | SetDPB_SetAllocInfo
1 | SetDPB_SetDPBFrmBPB
2 | SetDPB_ForceMediaChng
3 | SetDPB_GetSetActFATandMirr
4 | SetDPB_GetSetRootDirClus

SetDPB_Value1
Input member for sub-function. See specific sub-function for details.
SetDPB_Value2
Input member for sub-function. See specific sub-function for details.
SetDPB_Value3
Input member for sub-function. See specific sub-function for details.
SetDPB_Value4
Input member for sub-function. See specific sub-function for details.


Compatibility with the Windows API

One of the major design goals of the Win32 Application Programming Interface (API) was to minimize the effort required to port existing 16-bit Windows-based applications. However, some changes were mandated by the larger address space. Pointers, handles, and graphics coordinates were widened to 32 bits.

When porting your code from 16-bit Windows to 32-bit Windows, you may need to revise code that uses functions that are no longer supported. However, the majority of Windows functions are supported in the Win32 API or maintained for backward compatibility. If you are updating your code or creating new code, do not use the functions maintained only for backward compatibility. Instead, use the new functions introduced in the Win32 API.

  • Deleted Windows Programming Elements
  • Obsolete Windows Programming Elements


Deleted Windows Programming Elements

The following table provides a list of functions and messages that were in the 16-bit Windows API but were not implemented in the Win32 API.

16-bit Windows API | Win32 API support
AccessResource | No equivalent.
AllocDSToCSAlias | No equivalent.
AllocResource | No equivalent.
AllocSelector | No equivalent.
ChangeMenu | Replaced by the AppendMenu, InsertMenu, ModifyMenu, and RemoveMenu functions.
ChangeSelector | No equivalent.
CloseSound | Replaced by multimedia sound support.
CountVoiceNotes | Replaced by multimedia sound support.
DECLARE_HANDLE | No equivalent.
DeviceMode | Replaced by the DocumentProperties function.
DlgDirSelect | Replaced by the DlgDirSelectEx function.
DlgDirSelectComboBox | Replaced by the DlgDirSelectComboBoxEx function.
DOS3Call | Replaced by named, portable functions.
ExtDeviceMode | Replaced by the DocumentProperties function.
FIELDOFFSET | No equivalent.
FlushComm | Replaced by the PurgeComm function.
FreeSelector | No equivalent.
GCW_HCURSOR | Replaced by GCL_HCURSOR.
GCW_HBRBACKGROUND | Replaced by GCL_HBRBACKGROUND.
GCW_HICON | Replaced by GCL_HICON.
GetAspectRatioFilter | Replaced by the GetAspectRatioFilterEx function.
GetBitmapDimension | Replaced by the GetBitmapDimensionEx function.
GetBrushOrg | Replaced by the GetBrushOrgEx function.
GetCodeHandle | No equivalent.
GetCodeInfo | No equivalent.
GetCommError | Replaced by the GetCommState function.
GetCurrentPDB | No equivalent.
GetCurrentPosition | Replaced by the GetCurrentPositionEx function.
GetDCOrg | Replaced by the GetDCOrgEx function.
GetDOSEnvironment | No equivalent.
GetEnvironment | No equivalent.
GetFreeSystemResources | Replaced by the GlobalMemoryStatus function.
GetInstanceData | No equivalent; use an IPC mechanism.
GetMetaFileBits | Replaced by the GetEnhMetaFileBits function.
GetSystemDebugState | No equivalent.
GetTempDrive | Replaced by the GetTempPath function.
GetTextExtent | Replaced by the GetTextExtentPoint32 function.
GetTextExtentEx | Replaced by the GetTextExtentExPoint function.
GetThresholdEvent | Replaced by multimedia sound support.
GetThresholdStatus | Replaced by multimedia sound support.
GetViewportExt | Replaced by the GetViewportExtEx function.
GetViewportOrg | Replaced by the GetViewportOrgEx function.
GetWindowExt | Replaced by the GetWindowExtEx function.
GetWindowOrg | Replaced by the GetWindowOrgEx function.
GetWinFlags | No equivalent.
GlobalDosAlloc | No equivalent.
GlobalDosFree | No equivalent.
GlobalNotify | No equivalent.
GlobalPageLock | No equivalent.
GlobalPageUnlock | No equivalent.
GWW_HINSTANCE | Replaced by GWL_HINSTANCE.
GWW_HWNDPARENT | Replaced by GWL_HWNDPARENT.
GWW_ID | Replaced by GWL_ID.
GWW_USERDATA | Replaced by GWL_USERDATA.
IsGDIObject | No equivalent.
LocalInit | No equivalent.
LocalNotify | No equivalent.
LockData | No equivalent.
LockInput | No equivalent.
MAKELP | No equivalent.
MAKEPOINT | No equivalent.
MoveTo | Replaced by the MoveToEx function.
NetBIOSCall | Replaced by the Netbios function.
OFFSETOF | No equivalent.
OffsetViewportOrg | Replaced by the OffsetViewportOrgEx function.
OffsetWindowOrg | Replaced by the OffsetWindowOrgEx function.
OpenComm | Replaced by the CreateFile function.
OpenSound | Replaced by multimedia sound support.
ProfClear | No equivalent.
ProfFinish | No equivalent.
ProfFlush | No equivalent.
ProfInsChk | No equivalent.
ProfSampRate | No equivalent.
ProfSetup | No equivalent.
ProfStart | No equivalent.
ProfStop | No equivalent.
READ | Replaced by OF_READ.
ReadComm | Replaced by the ReadFile function.
READ_WRITE | Replaced by OF_READ_WRITE.
ScaleViewportExt | Replaced by the ScaleViewportExtEx function.
ScaleWindowExt | Replaced by the ScaleWindowExtEx function.
SEGINFO | No equivalent.
SELECTOROF | No equivalent.
SetBitmapDimension | Replaced by the SetBitmapDimensionEx function.
SetCommEventMask | Replaced by the SetCommMask function.
SetEnvironment | No equivalent.
SetMetaFileBits | Replaced by the SetEnhMetaFileBits function.
SetResourceHandler | No equivalent.
SetSoundNoise | Replaced by multimedia sound support.
SetViewportExt | Replaced by the SetViewportExtEx function.
SetViewportOrg | Replaced by the SetViewportOrgEx function.
SetVoiceAccent | Replaced by multimedia sound support.
SetVoiceEnvelope | Replaced by multimedia sound support.
SetVoiceNote | Replaced by multimedia sound support.
SetVoiceQueueSize | Replaced by multimedia sound support.
SetVoiceSound | Replaced by multimedia sound support.
SetVoiceThreshold | Replaced by multimedia sound support.
SetWindowExt | Replaced by the SetWindowExtEx function.
SetWindowOrg | Replaced by the SetWindowOrgEx function.
StartSound | Replaced by multimedia sound support.
StopSound | Replaced by multimedia sound support.
SwitchStackBack | No equivalent.
SwitchStackTo | No equivalent.
SyncAllVoices | Replaced by multimedia sound support.
UngetCommChar | No equivalent.
UnlockData | No equivalent.
ValidateCodeSegments | No equivalent.
ValidateFreeSpaces | No equivalent.
WaitSoundState | Replaced by multimedia sound support.
WM_CTLCOLOR | Replaced by the following messages: WM_CTLCOLORBTN WM_CTLCOLORDLG WM_CTLCOLOREDIT WM_CTLCOLORLISTBOX WM_CTLCOLORSCROLLBAR WM_CTLCOLORSTATIC
WM_CTLCOLORMSGBOX |
WRITE | Replaced by OF_WRITE.
WriteComm | Replaced by the WriteFile function.


Obsolete Windows Programming Elements

The following table provides a list of functions that are included in the Win32 API only for backward compatibility with the 16-bit Windows API.

16-bit Windows API | Win32 API support
_hread | Replaced by the ReadFile function.
_hwrite | Replaced by the WriteFile function.
_lclose | Replaced by the CloseHandle function.
_lcreat | Replaced by the CreateFile function.
_llseek | Replaced by the SetFilePointer function.
_lopen | Replaced by the CreateFile function.
_lread | Replaced by the ReadFile function.
_lwrite | Replaced by the WriteFile function.
AnsiLower | Replaced by the CharLower function.
AnsiLowerBuff | Replaced by the CharLowerBuff function.
AnsiNext | Replaced by the CharNext function.
AnsiPrev | Replaced by the CharPrev function.
AnsiToOem | Replaced by the CharToOem function.
AnsiToOemBuff | Replaced by the CharToOemBuff function.
AnsiUpper | Replaced by the CharUpper function.
AnsiUpperBuff | Replaced by the CharUpperBuff function.
AnyPopup | No equivalent.
CloseMetaFile | Replaced by the CloseEnhMetaFile function.
CopyLZFile | Replaced by the LZCopy function.
CopyMetaFile | Replaced by the CopyEnhMetaFile function.
CreateDIBPatternBrush | Replaced by the CreateDIBPatternBrush function.
CreateDiscardableBitmap | Replaced by the CreateCompatibleBitmap function.
CreateMetaFile | Replaced by the CreateEnhMetaFile function.
DefHookProc | Replaced by the CallNextHookEx function.
DefineHandleTable | No equivalent.
DeleteMetaFile | Replaced by the DeleteEnhMetaFile function.
EnumFontFamilies | Replaced by the EnumFontFamiliesEx function.
EnumFontFamProc | Replaced by the EnumFontFamExProc function.
EnumFonts | Replaced by the EnumFontFamiliesEx function.
EnumFontsProc | Replaced by the EnumFontFamExProc function.
EnumMetaFile | Replaced by the EnumEnhMetaFile function.
EnumMetaFileProc | Replaced by the EnhMetaFileProc function.
EnumTaskWindows | Replaced by the EnumThreadWindows function.
FixBrushOrgEx | No equivalent.
FloodFill | Replaced by the ExtFloodFill function.
FreeModule | Replaced by the FreeLibrary function.
FreeProcInstance | No equivalent.
FreeResource | Replaced as follows: Accelerator: DestroyAcceleratorTable Bitmap: DeleteObject Cursor: DestroyCursor Icon: DestroyIcon Menu: DestroyMenu
GetBitmapBits | Replaced by the GetDIBits function.
GetCharWidth | Replaced by the GetCharWidth32 function.
GetClassWord | Replaced by the GetClassLong function.
GetCurrentTime | Replaced by the GetTickCount function.
GetFreeSpace | Replaced by the GlobalMemoryStatus function.
GetKBCodePage | Replaced by the GetOEMCP function.
GetMetaFile | Replaced by the GetEnhMetaFile function.
GetMetaFileBitsEx | Replaced by the GetEnhMetaFileBits function.
GetPrivateProfileInt | Replaced by registry support.
GetPrivateProfileSection | Replaced by registry support.
GetPrivateProfileSectionNames | Replaced by registry support.
GetPrivateProfileString | Replaced by registry support.
GetPrivateProfileStruct | Replaced by registry support.
GetProfileInt | Replaced by registry support.
GetProfileSection | Replaced by registry support.
GetProfileString | Replaced by registry support.
GetSysModalWindow | No equivalent. The new input model does not support system modal windows.
GetTextExtentPoint | Replaced by the GetTextExtentPoint32 function.
GetWindowTask | Replaced by the GetWindowThreadProcessId function.
GetWindowWord | Replaced by the GetWindowLong function.
GlobalAlloc | Replaced by memory management functions.
GlobalCompact | Replaced by memory management functions.
GlobalDiscard | No equivalent.
GlobalFix | No equivalent.
GlobalFlags | No equivalent.
GlobalFree | Replaced by memory management functions.
GlobalHandle | No equivalent.
GlobalLock | No equivalent.
GlobalLRUNewest | No equivalent.
GlobalLRUOldest | No equivalent.
GlobalReAlloc | Replaced by memory management functions.
GlobalSize | Replaced by memory management functions.
GlobalUnfix | No equivalent.
GlobalUnlock | No equivalent.
GlobalUnWire | No equivalent.
GlobalWire | No equivalent.
IsBadHugeReadPtr | Equivalent to the IsBadReadPtr function.
IsBadHugeWritePtr | Equivalent to the IsBadWritePtr function.
LimitEmsPages | No equivalent.
LoadModule | Replaced by the CreateProcess function.
LocalAlloc | Replaced by memory management functions.
LocalCompact | Replaced by memory management functions.
LocalDiscard | No equivalent.
LocalFlags | No equivalent.
LocalFree | Replaced by memory management functions.
LocalHandle | No equivalent.
LocalLock | No equivalent.
LocalReAlloc | Replaced by memory management functions.
LocalShrink | No equivalent.
LocalSize | Replaced by memory management functions.
LocalUnlock | No equivalent.
LockSegment | No equivalent.
LZDone | Replaced by the LZCopy function.
LZStart | Replaced by the LZCopy function.
MakeProcInstance | No equivalent. Functions can be called directly.
OemToAnsi | Replaced by the OemToChar function.
OemToAnsiBuff | Replaced by the OemToCharBuff function.
OpenFile | Replaced by the CreateFile function.
PlayMetaFile | Replaced by the PlayEnhMetaFile function.
PlayMetaFileRecord | Replaced by the PlayEnhMetaFileRecord function.
PostAppMessage | Replaced by the PostThreadMessage function.
PrinterMessageBox | No equivalent.
RegCreateKey | Replaced by the RegCreateKeyEx function.
RegEnumKey | Replaced by the RegEnumKeyEx function.
RegOpenKey | Replaced by the RegOpenKeyEx function.
RegQueryValue | Replaced by the RegQueryValueEx function.
RegSetValue | Replaced by the RegSetValueEx function.
SetBitmapBits | Replaced by the SetDIBits function.
SetClassWord | Replaced by the SetClassLong function.
SetDebugErrorLevel | No equivalent.
SetHandleCount | No equivalent. There is no explicit file handle limit.
SetMessageQueue | No equivalent. Message queues are expanded as needed.
SetMetaFileBitsEx | Replaced by the SetEnhMetaFileBits function.
SetSwapAreaSize | No equivalent.
SetSysModalWindow | No equivalent.
SetWindowsHook | Replaced by the SetWindowsHookEx function.
SetWindowWord | Replaced by the SetWindowLong function.
UnhookWindowsHook | Replaced by the UnhookWindowsHookEx function.
UnlockResource | No equivalent.
UnlockSegment | No equivalent.
WaitForPrinterChange | Replaced by the FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification, and FindClosePrinterChangeNotification functions.
WinExec | Replaced by the CreateProcess function.
WNetAddConnection | Replaced by the WNetAddConnection2 function.
WritePrivateProfileSection | Replaced by registry support.
WritePrivateProfileString | Replaced by registry support.
WritePrivateProfileStruct | Replaced by registry support.
WriteProfileSection | Replaced by registry support.
WriteProfileString | Replaced by registry support.
Yield | No equivalent. The message loop handles synchronization. Threads that create processes can use WaitForInputIdle to wait until the new process has finished its initialization.


Data Types

The data types supported by the Microsoft® Win32® API are used to define function return values, function and message parameters, and structure members. They define the size and meaning of these elements

The following table contains the following types: character, integer, Boolean, pointer, and handle. The character, integer, and Boolean types are common to most C compilers. Most of the pointer-type names begin with a prefix of P or LP. Handles refer to a resource that has been loaded into memory.

Type | Definition
ATOM | Atom (a reference to a character string in an atom table).
BOOL | Boolean variable (should be TRUE or FALSE).
BOOLEAN | Boolean variable (should be TRUE or FALSE).
BYTE | Byte (8 bits).
CALLBACK | Calling convention for callback functions.
CHAR | 8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts.
COLORREF | Red, green, blue (RGB) color value (32 bits). See COLORREF for information on this type.
CONST | Variable whose value is to remain constant during execution.
CRITICAL_SECTION | Critical-section object.
CTRYID | Country/region identifier.
DWORD | 32-bit unsigned integer.
DWORD_PTR | Unsigned long type for pointer precision. Use when casting a pointer to a long type to perform pointer arithmetic.
DWORD32 | 32-bit unsigned integer.
DWORD64 | 64-bit unsigned integer.
FLOAT | Floating-point variable.
FILE_SEGMENT_ELEMENT | 64-bit pointer to a buffer.
HACCEL | Handle to an accelerator table.
HANDLE | Handle to an object.
HBITMAP | Handle to a bitmap.
HBRUSH | Handle to a brush.
HCOLORSPACE | Handle to a logical color space.
HCONV | Handle to a dynamic data exchange (DDE) conversation.
HCONVLIST | Handle to a DDE conversation list.
HCURSOR | Handle to a cursor.
HDC | Handle to a device context (DC).
HDDEDATA | Handle to DDE data.
HDESK | Handle to a desktop.
HDROP | Handle to an internal drop structure.
HDWP | Handle to a deferred window position structure.
HENHMETAFILE | Handle to an enhanced metafile.
HFILE | Handle to a file opened by OpenFile, not CreateFile.
HFONT | Handle to a font.
HGDIOBJ | Handle to a GDI object.
HGLOBAL | Handle to a global memory block.
HHOOK | Handle to a hook.
HICON | Handle to an icon.
HIMAGELIST | Handle to an image list.
HIMC | Handle to input context.
HINSTANCE | Handle to an instance.
HKEY | Handle to a registry key.
HKL | Input locale identifier.
HLOCAL | Handle to a local memory block.
HMENU | Handle to a menu.
HMETAFILE | Handle to a metafile.
HMODULE | Handle to a module.
HMONITOR | Handle to a display monitor.
HPALETTE | Handle to a palette.
HPEN | Handle to a pen.
HRGN | Handle to a region.
HRSRC | Handle to a resource.
HSZ | Handle to a DDE string.
HWINSTA | Handle to a window station.
HWND | Handle to a window.
INT | 32-bit signed integer.
INT_PTR | Signed integral type for pointer precision. Use when casting a pointer to an integer to perform pointer arithmetic.
INT32 | 32-bit signed integer.
INT64 | 64-bit signed integer.
IPADDR | IP address. To convert this value to the "a.b.c.d" string form of an IP address, map the high-order byte to a, the low-order byte to d, and so on.
IPMASK | Subnet mask. Uses the same format as IPADDR.
LANGID | Language identifier. For more information, see Locales.
LCID | Locale identifier. For more information, see Locales.
LCSCSTYPE | Color space type.
LCSGAMUTMATCH | Gamut-matching method.
LCTYPE | Locale information type. For a list, see Locale and Language Information
LONG | 32-bit signed integer.
LONG_PTR | Signed long type for pointer precision. Use when casting a pointer to a long to perform pointer arithmetic.
LONG32 | 32-bit signed integer.
LONG64 | 64-bit signed integer.
LONGLONG | 64-bit signed integer.
LPARAM | Message parameter.
LPBOOL | Pointer to a BOOL.
LPBYTE | Pointer to a BYTE.
LPCOLORREF | Pointer to a COLORREF value.
LPCRITICAL_SECTION | Pointer to a CRITICAL_SECTION.
LPCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPCTSTR | An LPCWSTR if UNICODE is defined, an LPCSTR otherwise.
LPCVOID | Pointer to a constant of any type.
LPCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LPDWORD | Pointer to a DWORD.
LPHANDLE | Pointer to a HANDLE.
LPINT | Pointer to an INT.
LPLONG | Pointer to a LONG.
LPSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPTSTR | An LPWSTR if UNICODE is defined, an LPSTR otherwise.
LPVOID | Pointer to any type.
LPWORD | Pointer to a WORD.
LPWSTR | Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LRESULT | Signed result of message processing.
LUID | Locally unique identifier.
PBOOL | Pointer to a BOOL.
PBOOLEAN | Pointer to a BOOL.
PBYTE | Pointer to a BYTE.
PCHAR | Pointer to a CHAR.
PCRITICAL_SECTION | Pointer to a CRITICAL_SECTION.
PCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PCTSTR | A PCWSTR if UNICODE is defined, a PCSTR otherwise.
PCWCH | Pointer to a constant WCHAR.
PCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
PDWORD | Pointer to a DWORD.
PFLOAT | Pointer to a FLOAT.
PHANDLE | Pointer to a HANDLE.
PHKEY | Pointer to an HKEY.
PINT | Pointer to an INT.
PLCID | Pointer to an LCID.
PLONG | Pointer to a LONG.
PLUID | Pointer to a LUID.
POINTER_32 | 32-bit pointer. On a 32-bit system, this is a native pointer. On a 64-bit system, this is a truncated 64-bit pointer.
POINTER_64 | 64-bit pointer. On a 64-bit system, this is a native pointer. On a 32-bit system, this is a sign-extended 32-bit pointer.
PSHORT | Pointer to a SHORT.
PSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PTBYTE | Pointer to a TBYTE.
PTCHAR | Pointer to a TCHAR.
PTSTR | A PWSTR if UNICODE is defined, a PSTR otherwise.
PUCHAR | Pointer to a UCHAR.
PUINT | Pointer to a UINT.
PULONG | Pointer to a ULONG.
PUSHORT | Pointer to a USHORT.
PVOID | Pointer to any type.
PWCHAR | Pointer to a WCHAR.
PWORD | Pointer to a WORD.
PWSTR | Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
REGSAM | Security access mask for registry key.
SC_HANDLE | Handle to a service control manager database.
SC_LOCK | Handle to a service control manager database lock.
SERVICE_STATUS_HANDLE | Handle to a service status value.
SHORT | Short integer (16 bits).
SIZE_T | The maximum number of bytes to which a pointer can point. Use for a count that must span the full range of a pointer.
SSIZE_T | Signed SIZE_T.
TBYTE | A WCHAR if UNICODE is defined, a CHAR otherwise.
TCHAR | A WCHAR if UNICODE is defined, a CHAR otherwise.
UCHAR | Unsigned CHAR.
UINT | Unsigned INT.
UINT_PTR | Unsigned INT_PTR.
UINT32 | Unsigned INT32.
UINT64 | Unsigned INT64.
ULONG | Unsigned LONG.
ULONG_PTR | Unsigned LONG_PTR.
ULONG32 | Unsigned LONG32.
ULONG64 | Unsigned LONG64.
ULONGLONG | 64-bit unsigned integer.
UNSIGNED | Unsigned attribute.
USHORT | Unsigned SHORT.
VOID | Any type.
WCHAR | 16-bit Unicode character. For more information, see Character Sets Used By Fonts.
WINAPI | Calling convention for the Win32 API.
WORD | 16-bit unsigned integer.
WPARAM | Message parameter.


Win32 Error Codes

The following table provides a list of Win32 error codes. They are returned by the GetLastError function when many of the Win32 functions fail.

Code | Description | Name
0 | The operation completed successfully. | ERROR_SUCCESS
1 | Incorrect function. | ERROR_INVALID_FUNCTION
2 | The system cannot find the file specified. | ERROR_FILE_NOT_FOUND
3 | The system cannot find the path specified. | ERROR_PATH_NOT_FOUND
4 | The system cannot open the file. | ERROR_TOO_MANY_OPEN_FILES
5 | Access is denied. | ERROR_ACCESS_DENIED
6 | The handle is invalid. | ERROR_INVALID_HANDLE
7 | The storage control blocks were destroyed. | ERROR_ARENA_TRASHED
8 | Not enough storage is available to process this command. | ERROR_NOT_ENOUGH_MEMORY
9 | The storage control block address is invalid. | ERROR_INVALID_BLOCK
10 | The environment is incorrect. | ERROR_BAD_ENVIRONMENT
11 | An attempt was made to load a program with an incorrect format. | ERROR_BAD_FORMAT
12 | The access code is invalid. | ERROR_INVALID_ACCESS
13 | The data is invalid. | ERROR_INVALID_DATA
14 | Not enough storage is available to complete this operation. | ERROR_OUTOFMEMORY
15 | The system cannot find the drive specified. | ERROR_INVALID_DRIVE
16 | The directory cannot be removed. | ERROR_CURRENT_DIRECTORY
17 | The system cannot move the file to a different disk drive. | ERROR_NOT_SAME_DEVICE
18 | There are no more files. | ERROR_NO_MORE_FILES
19 | The media is write protected. | ERROR_WRITE_PROTECT
20 | The system cannot find the device specified. | ERROR_BAD_UNIT
21 | The device is not ready. | ERROR_NOT_READY
22 | The device does not recognize the command. | ERROR_BAD_COMMAND
23 | Data error (cyclic redundancy check). | ERROR_CRC
24 | The program issued a command but the command length is incorrect. | ERROR_BAD_LENGTH
25 | The drive cannot locate a specific area or track on the disk. | ERROR_SEEK
26 | The specified disk or diskette cannot be accessed. | ERROR_NOT_DOS_DISK
27 | The drive cannot find the sector requested. | ERROR_SECTOR_NOT_FOUND
28 | The printer is out of paper. | ERROR_OUT_OF_PAPER
29 | The system cannot write to the specified device. | ERROR_WRITE_FAULT
30 | The system cannot read from the specified device. | ERROR_READ_FAULT
31 | A device attached to the system is not functioning. | ERROR_GEN_FAILURE
32 | The process cannot access the file because it is being used by another process. | ERROR_SHARING_VIOLATION
33 | The process cannot access the file because another process has locked a portion of the file. | ERROR_LOCK_VIOLATION
34 | The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1. | ERROR_WRONG_DISK
36 | Too many files opened for sharing. | ERROR_SHARING_BUFFER_EXCEEDED
38 | Reached the end of the file. | ERROR_HANDLE_EOF
39 | The disk is full. | ERROR_HANDLE_DISK_FULL
50 | The request is not supported. | ERROR_NOT_SUPPORTED
51 | The remote computer is not available. | ERROR_REM_NOT_LIST
52 | A duplicate name exists on the network. | ERROR_DUP_NAME
53 | The network path was not found. | ERROR_BAD_NETPATH
54 | The network is busy. | ERROR_NETWORK_BUSY
55 | The specified network resource or device is no longer available. | ERROR_DEV_NOT_EXIST
56 | The network BIOS command limit has been reached. | ERROR_TOO_MANY_CMDS
57 | A network adapter hardware error occurred. | ERROR_ADAP_HDW_ERR
58 | The specified server cannot perform the requested operation. | ERROR_BAD_NET_RESP
59 | An unexpected network error occurred. | ERROR_UNEXP_NET_ERR
60 | The remote adapter is not compatible. | ERROR_BAD_REM_ADAP
61 | The printer queue is full. | ERROR_PRINTQ_FULL
62 | Space to store the file waiting to be printed is not available on the server. | ERROR_NO_SPOOL_SPACE
63 | Your file waiting to be printed was deleted. | ERROR_PRINT_CANCELLED
64 | The specified network name is no longer available. | ERROR_NETNAME_DELETED
65 | Network access is denied. | ERROR_NETWORK_ACCESS_DENIED
66 | The network resource type is not correct. | ERROR_BAD_DEV_TYPE
67 | The network name cannot be found. | ERROR_BAD_NET_NAME
68 | The name limit for the local computer network adapter card was exceeded. | ERROR_TOO_MANY_NAMES
69 | The network BIOS session limit was exceeded. | ERROR_TOO_MANY_SESS
70 | The remote server has been paused or is in the process of being started. | ERROR_SHARING_PAUSED
71 | No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept. | ERROR_REQ_NOT_ACCEP
72 | The specified printer or disk device has been paused. | ERROR_REDIR_PAUSED
80 | The file exists. | ERROR_FILE_EXISTS
82 | The directory or file cannot be created. | ERROR_CANNOT_MAKE
83 | Fail on INT 24. | ERROR_FAIL_I24
84 | Storage to process this request is not available. | ERROR_OUT_OF_STRUCTURES
85 | The local device name is already in use. | ERROR_ALREADY_ASSIGNED
86 | The specified network password is not correct. | ERROR_INVALID_PASSWORD
87 | The parameter is incorrect. | ERROR_INVALID_PARAMETER
88 | A write fault occurred on the network. | ERROR_NET_WRITE_FAULT
89 | The system cannot start another process at this time. | ERROR_NO_PROC_SLOTS
100 | Cannot create another system semaphore. | ERROR_TOO_MANY_SEMAPHORES
101 | The exclusive semaphore is owned by another process. | ERROR_EXCL_SEM_ALREADY_OWNED
102 | The semaphore is set and cannot be closed. | ERROR_SEM_IS_SET
103 | The semaphore cannot be set again. | ERROR_TOO_MANY_SEM_REQUESTS
104 | Cannot request exclusive semaphores at interrupt time. | ERROR_INVALID_AT_INTERRUPT_TIME
105 | The previous ownership of this semaphore has ended. | ERROR_SEM_OWNER_DIED
106 | Insert the diskette for drive %1. | ERROR_SEM_USER_LIMIT
107 | The program stopped because an alternate diskette was not inserted. | ERROR_DISK_CHANGE
108 | The disk is in use or locked by another process. | ERROR_DRIVE_LOCKED
109 | The pipe has been ended. | ERROR_BROKEN_PIPE
110 | The system cannot open the device or file specified. | ERROR_OPEN_FAILED
111 | The file name is too long. | ERROR_BUFFER_OVERFLOW
112 | There is not enough space on the disk. | ERROR_DISK_FULL
113 | No more internal file identifiers available. | ERROR_NO_MORE_SEARCH_HANDLES
114 | The target internal file identifier is incorrect. | ERROR_INVALID_TARGET_HANDLE
117 | The IOCTL call made by the application program is not correct. | ERROR_INVALID_CATEGORY
118 | The verify-on-write switch parameter value is not correct. | ERROR_INVALID_VERIFY_SWITCH
119 | The system does not support the command requested. | ERROR_BAD_DRIVER_LEVEL
120 | This function is not supported on this system. | ERROR_CALL_NOT_IMPLEMENTED
121 | The semaphore timeout period has expired. | ERROR_SEM_TIMEOUT
122 | The data area passed to a system call is too small. | ERROR_INSUFFICIENT_BUFFER
123 | The filename, directory name, or volume label syntax is incorrect. | ERROR_INVALID_NAME
124 | The system call level is not correct. | ERROR_INVALID_LEVEL
125 | The disk has no volume label. | ERROR_NO_VOLUME_LABEL
126 | The specified module could not be found. | ERROR_MOD_NOT_FOUND
127 | The specified procedure could not be found. | ERROR_PROC_NOT_FOUND
128 | There are no child processes to wait for. | ERROR_WAIT_NO_CHILDREN
129 | The %1 application cannot be run in Win32 mode. | ERROR_CHILD_NOT_COMPLETE
130 | Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O. | ERROR_DIRECT_ACCESS_HANDLE
131 | An attempt was made to move the file pointer before the beginning of the file. | ERROR_NEGATIVE_SEEK
132 | The file pointer cannot be set on the specified device or file. | ERROR_SEEK_ON_DEVICE
133 | A JOIN or SUBST command cannot be used for a drive that contains previously joined drives. | ERROR_IS_JOIN_TARGET
134 | An attempt was made to use a JOIN or SUBST command on a drive that has already been joined. | ERROR_IS_JOINED
135 | An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted. | ERROR_IS_SUBSTED
136 | The system tried to delete the JOIN of a drive that is not joined. | ERROR_NOT_JOINED
137 | The system tried to delete the substitution of a drive that is not substituted. | ERROR_NOT_SUBSTED
138 | The system tried to join a drive to a directory on a joined drive. | ERROR_JOIN_TO_JOIN
139 | The system tried to substitute a drive to a directory on a substituted drive. | ERROR_SUBST_TO_SUBST
140 | The system tried to join a drive to a directory on a substituted drive. | ERROR_JOIN_TO_SUBST
141 | The system tried to SUBST a drive to a directory on a joined drive. | ERROR_SUBST_TO_JOIN
142 | The system cannot perform a JOIN or SUBST at this time. | ERROR_BUSY_DRIVE
143 | The system cannot join or substitute a drive to or for a directory on the same drive. | ERROR_SAME_DRIVE
144 | The directory is not a subdirectory of the root directory. | ERROR_DIR_NOT_ROOT
145 | The directory is not empty. | ERROR_DIR_NOT_EMPTY
146 | The path specified is being used in a substitute. | ERROR_IS_SUBST_PATH
147 | Not enough resources are available to process this command. | ERROR_IS_JOIN_PATH
148 | The path specified cannot be used at this time. | ERROR_PATH_BUSY
149 | An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute. | ERROR_IS_SUBST_TARGET
150 | System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed. | ERROR_SYSTEM_TRACE
151 | The number of specified semaphore events for DosMuxSemWait is not correct. | ERROR_INVALID_EVENT_COUNT
152 | DosMuxSemWait did not execute; too many semaphores are already set. | ERROR_TOO_MANY_MUXWAITERS
153 | The DosMuxSemWait list is not correct. | ERROR_INVALID_LIST_FORMAT
154 | The volume label you entered exceeds the label character limit of the target file system. | ERROR_LABEL_TOO_LONG
155 | Cannot create another thread. | ERROR_TOO_MANY_TCBS
156 | The recipient process has refused the signal. | ERROR_SIGNAL_REFUSED
157 | The segment is already discarded and cannot be locked. | ERROR_DISCARDED
158 | The segment is already unlocked. | ERROR_NOT_LOCKED
159 | The address for the thread ID is not correct. | ERROR_BAD_THREADID_ADDR
160 | The argument string passed to DosExecPgm is not correct. | ERROR_BAD_ARGUMENTS
161 | The specified path is invalid. | ERROR_BAD_PATHNAME
162 | A signal is already pending. | ERROR_SIGNAL_PENDING
164 | No more threads can be created in the system. | ERROR_MAX_THRDS_REACHED
167 | Unable to lock a region of a file. | ERROR_LOCK_FAILED
170 | The requested resource is in use. | ERROR_BUSY
173 | A lock request was not outstanding for the supplied cancel region. | ERROR_CANCEL_VIOLATION
174 | The file system does not support atomic changes to the lock type. | ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
180 | The system detected a segment number that was not correct. | ERROR_INVALID_SEGMENT_NUMBER
182 | The operating system cannot run %1. | ERROR_INVALID_ORDINAL
183 | Cannot create a file when that file already exists. | ERROR_ALREADY_EXISTS
186 | The flag passed is not correct. | ERROR_INVALID_FLAG_NUMBER
187 | The specified system semaphore name was not found. | ERROR_SEM_NOT_FOUND
188 | The operating system cannot run %1. | ERROR_INVALID_STARTING_CODESEG
189 | The operating system cannot run %1. | ERROR_INVALID_STACKSEG
190 | The operating system cannot run %1. | ERROR_INVALID_MODULETYPE
191 | Cannot run %1 in Win32 mode. | ERROR_INVALID_EXE_SIGNATURE
192 | The operating system cannot run %1. | ERROR_EXE_MARKED_INVALID
193 | %1 is not a valid Win32 application. | ERROR_BAD_EXE_FORMAT
194 | The operating system cannot run %1. | ERROR_ITERATED_DATA_EXCEEDS_64k
195 | The operating system cannot run %1. | ERROR_INVALID_MINALLOCSIZE
196 | The operating system cannot run this application program. | ERROR_DYNLINK_FROM_INVALID_RING
197 | The operating system is not presently configured to run this application. | ERROR_IOPL_NOT_ENABLED
198 | The operating system cannot run %1. | ERROR_INVALID_SEGDPL
199 | The operating system cannot run this application program. | ERROR_AUTODATASEG_EXCEEDS_64k
200 | The code segment cannot be greater than or equal to 64K. | ERROR_RING2SEG_MUST_BE_MOVABLE
201 | The operating system cannot run %1. | ERROR_RELOC_CHAIN_XEEDS_SEGLIM
202 | The operating system cannot run %1. | ERROR_INFLOOP_IN_RELOC_CHAIN
203 | The system could not find the environment option that was entered. | ERROR_ENVVAR_NOT_FOUND
205 | No process in the command subtree has a signal handler. | ERROR_NO_SIGNAL_SENT
206 | The filename or extension is too long. | ERROR_FILENAME_EXCED_RANGE
207 | The ring 2 stack is in use. | ERROR_RING2_STACK_IN_USE
208 | The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified. | ERROR_META_EXPANSION_TOO_LONG
209 | The signal being posted is not correct. | ERROR_INVALID_SIGNAL_NUMBER
210 | The signal handler cannot be set. | ERROR_THREAD_1_INACTIVE
212 | The segment is locked and cannot be reallocated. | ERROR_LOCKED
214 | Too many dynamic-link modules are attached to this program or dynamic-link module. | ERROR_TOO_MANY_MODULES
215 | Cannot nest calls to LoadModule. | ERROR_NESTING_NOT_ALLOWED
216 | The image file %1 is valid, but is for a machine type other than the current machine. | ERROR_EXE_MACHINE_TYPE_MISMATCH
230 | The pipe state is invalid. | ERROR_BAD_PIPE
231 | All pipe instances are busy. | ERROR_PIPE_BUSY
232 | The pipe is being closed. | ERROR_NO_DATA
233 | No process is on the other end of the pipe. | ERROR_PIPE_NOT_CONNECTED
234 | More data is available. | ERROR_MORE_DATA
240 | The session was canceled. | ERROR_VC_DISCONNECTED
254 | The specified extended attribute name was invalid. | ERROR_INVALID_EA_NAME
255 | The extended attributes are inconsistent. | ERROR_EA_LIST_INCONSISTENT
258 | The wait operation timed out. | WAIT_TIMEOUT
259 | No more data is available. | ERROR_NO_MORE_ITEMS
266 | The copy functions cannot be used. | ERROR_CANNOT_COPY
267 | The directory name is invalid. | ERROR_DIRECTORY
275 | The extended attributes did not fit in the buffer. | ERROR_EAS_DIDNT_FIT
276 | The extended attribute file on the mounted file system is corrupt. | ERROR_EA_FILE_CORRUPT
277 | The extended attribute table file is full. | ERROR_EA_TABLE_FULL
278 | The specified extended attribute handle is invalid. | ERROR_INVALID_EA_HANDLE
282 | The mounted file system does not support extended attributes. | ERROR_EAS_NOT_SUPPORTED
288 | Attempt to release mutex not owned by caller. | ERROR_NOT_OWNER
298 | Too many posts were made to a semaphore. | ERROR_TOO_MANY_POSTS
299 | Only part of a ReadProcessMemory or WriteProcessMemory request was completed. | ERROR_PARTIAL_COPY
300 | The oplock request is denied. | ERROR_OPLOCK_NOT_GRANTED
301 | An invalid oplock acknowledgment was received by the system. | ERROR_INVALID_OPLOCK_PROTOCOL
302 | The volume is too fragmented to complete this operation. | ERROR_DISK_TOO_FRAGMENTED
303 | The file cannot be opened because it is in the process of being deleted. | ERROR_DELETE_PENDING
317 | The system cannot find message text for message number 0x%1 in the message file for %2. | ERROR_MR_MID_NOT_FOUND
487 | Attempt to access invalid address. | ERROR_INVALID_ADDRESS
534 | Arithmetic result exceeded 32 bits. | ERROR_ARITHMETIC_OVERFLOW
535 | There is a process on other end of the pipe. | ERROR_PIPE_CONNECTED
536 | Waiting for a process to open the other end of the pipe. | ERROR_PIPE_LISTENING
994 | Access to the extended attribute was denied. | ERROR_EA_ACCESS_DENIED
995 | The I/O operation has been aborted because of either a thread exit or an application request. | ERROR_OPERATION_ABORTED
996 | Overlapped I/O event is not in a signaled state. | ERROR_IO_INCOMPLETE
997 | Overlapped I/O operation is in progress. | ERROR_IO_PENDING
998 | Invalid access to memory location. | ERROR_NOACCESS
999 | Error performing inpage operation. | ERROR_SWAPERROR
1001 | Recursion too deep; the stack overflowed. | ERROR_STACK_OVERFLOW
1002 | The window cannot act on the sent message. | ERROR_INVALID_MESSAGE
1003 | Cannot complete this function. | ERROR_CAN_NOT_COMPLETE
1004 | Invalid flags. | ERROR_INVALID_FLAGS
1005 | The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted. | ERROR_UNRECOGNIZED_VOLUME
1006 | The volume for a file has been externally altered so that the opened file is no longer valid. | ERROR_FILE_INVALID
1007 | The requested operation cannot be performed in full-screen mode. | ERROR_FULLSCREEN_MODE
1008 | An attempt was made to reference a token that does not exist. | ERROR_NO_TOKEN
1009 | The configuration registry database is corrupt. | ERROR_BADDB
1010 | The configuration registry key is invalid. | ERROR_BADKEY
1011 | The configuration registry key could not be opened. | ERROR_CANTOPEN
1012 | The configuration registry key could not be read. | ERROR_CANTREAD
1013 | The configuration registry key could not be written. | ERROR_CANTWRITE
1014 | One of the files in the registry database had to be recovered by use of a log or alternate copy. The recovery was successful. | ERROR_REGISTRY_RECOVERED
1015 | The registry is corrupted. The structure of one of the files containing registry data is corrupted, or the system's memory image of the file is corrupted, or the file could not be recovered because the alternate copy or log was absent or corrupted. | ERROR_REGISTRY_CORRUPT
1016 | An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry. | ERROR_REGISTRY_IO_FAILED
1017 | The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format. | ERROR_NOT_REGISTRY_FILE
1018 | Illegal operation attempted on a registry key that has been marked for deletion. | ERROR_KEY_DELETED
1019 | System could not allocate the required space in a registry log. | ERROR_NO_LOG_SPACE
1020 | Cannot create a symbolic link in a registry key that already has subkeys or values. | ERROR_KEY_HAS_CHILDREN
1021 | Cannot create a stable subkey under a volatile parent key. | ERROR_CHILD_MUST_BE_VOLATILE
1022 | A notify change request is being completed and the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes. | ERROR_NOTIFY_ENUM_DIR
1051 | A stop control has been sent to a service that other running services are dependent on. | ERROR_DEPENDENT_SERVICES_RUNNING
1052 | The requested control is not valid for this service. | ERROR_INVALID_SERVICE_CONTROL
1053 | The service did not respond to the start or control request in a timely fashion. | ERROR_SERVICE_REQUEST_TIMEOUT
1054 | A thread could not be created for the service. | ERROR_SERVICE_NO_THREAD
1055 | The service database is locked. | ERROR_SERVICE_DATABASE_LOCKED
1056 | An instance of the service is already running. | ERROR_SERVICE_ALREADY_RUNNING
1057 | The account name is invalid or does not exist, or the password is invalid for the account name specified. | ERROR_INVALID_SERVICE_ACCOUNT
1058 | The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. | ERROR_SERVICE_DISABLED
1059 | Circular service dependency was specified. | ERROR_CIRCULAR_DEPENDENCY
1060 | The specified service does not exist as an installed service. | ERROR_SERVICE_DOES_NOT_EXIST
1061 | The service cannot accept control messages at this time. | ERROR_SERVICE_CANNOT_ACCEPT_CTRL
1062 | The service has not been started. | ERROR_SERVICE_NOT_ACTIVE
1063 | The service process could not connect to the service controller. | ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
1064 | An exception occurred in the service when handling the control request. | ERROR_EXCEPTION_IN_SERVICE
1065 | The database specified does not exist. | ERROR_DATABASE_DOES_NOT_EXIST
1066 | The service has returned a service-specific error code. | ERROR_SERVICE_SPECIFIC_ERROR
1067 | The process terminated unexpectedly. | ERROR_PROCESS_ABORTED
1068 | The dependency service or group failed to start. | ERROR_SERVICE_DEPENDENCY_FAIL
1069 | The service did not start due to a logon failure. | ERROR_SERVICE_LOGON_FAILED
1070 | After starting, the service hung in a start-pending state. | ERROR_SERVICE_START_HANG
1071 | The specified service database lock is invalid. | ERROR_INVALID_SERVICE_LOCK
1072 | The specified service has been marked for deletion. | ERROR_SERVICE_MARKED_FOR_DELETE
1073 | The specified service already exists. | ERROR_SERVICE_EXISTS
1074 | The system is currently running with the last-known-good configuration. | ERROR_ALREADY_RUNNING_LKG
1075 | The dependency service does not exist or has been marked for deletion. | ERROR_SERVICE_DEPENDENCY_DELETED
1076 | The current boot has already been accepted for use as the last-known-good control set. | ERROR_BOOT_ALREADY_ACCEPTED
1077 | No attempts to start the service have been made since the last boot. | ERROR_SERVICE_NEVER_STARTED
1078 | The name is already in use as either a service name or a service display name. | ERROR_DUPLICATE_SERVICE_NAME
1079 | The account specified for this service is different from the account specified for other services running in the same process. | ERROR_DIFFERENT_SERVICE_ACCOUNT
1080 | Failure actions can only be set for Win32 services, not for drivers. | ERROR_CANNOT_DETECT_DRIVER_FAILURE
1081 | This service runs in the same process as the service control manager. Therefore, the service control manager cannot take action if this service's process terminates unexpectedly. | ERROR_CANNOT_DETECT_PROCESS_ABORT
1082 | No recovery program has been configured for this service. | ERROR_NO_RECOVERY_PROGRAM
1083 | The executable program that this service is configured to run in does not implement the service. | ERROR_SERVICE_NOT_IN_EXE
1084 | This service cannot be started in Safe Mode. | ERROR_NOT_SAFEBOOT_SERVICE
1100 | The physical end of the tape has been reached. | ERROR_END_OF_MEDIA
1101 | A tape access reached a filemark. | ERROR_FILEMARK_DETECTED
1102 | The beginning of the tape or a partition was encountered. | ERROR_BEGINNING_OF_MEDIA
1103 | A tape access reached the end of a set of files. | ERROR_SETMARK_DETECTED
1104 | No more data is on the tape. | ERROR_NO_DATA_DETECTED
1105 | Tape could not be partitioned. | ERROR_PARTITION_FAILURE
1106 | When accessing a new tape of a multivolume partition, the current block size is incorrect. | ERROR_INVALID_BLOCK_LENGTH
1107 | Tape partition information could not be found when loading a tape. | ERROR_DEVICE_NOT_PARTITIONED
1108 | Unable to lock the media eject mechanism. | ERROR_UNABLE_TO_LOCK_MEDIA
1109 | Unable to unload the media. | ERROR_UNABLE_TO_UNLOAD_MEDIA
1110 | The media in the drive may have changed. | ERROR_MEDIA_CHANGED
1111 | The I/O bus was reset. | ERROR_BUS_RESET
1112 | No media in drive. | ERROR_NO_MEDIA_IN_DRIVE
1113 | No mapping for the Unicode character exists in the target multi-byte code page. | ERROR_NO_UNICODE_TRANSLATION
1114 | A dynamic link library (DLL) initialization routine failed. | ERROR_DLL_INIT_FAILED
1115 | A system shutdown is in progress. | ERROR_SHUTDOWN_IN_PROGRESS
1116 | Unable to abort the system shutdown because no shutdown was in progress. | ERROR_NO_SHUTDOWN_IN_PROGRESS
1117 | The request could not be performed because of an I/O device error. | ERROR_IO_DEVICE
1118 | No serial device was successfully initialized. The serial driver will unload. | ERROR_SERIAL_NO_DEVICE
1119 | Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened. | ERROR_IRQ_BUSY
1120 | A serial I/O operation was completed by another write to the serial port. (The IOCTL_SERIAL_XOFF_COUNTER reached zero.) | ERROR_MORE_WRITES
1121 | A serial I/O operation completed because the timeout period expired. (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.) | ERROR_COUNTER_TIMEOUT
1122 | No ID address mark was found on the floppy disk. | ERROR_FLOPPY_ID_MARK_NOT_FOUND
1123 | Mismatch between the floppy disk sector ID field and the floppy disk controller track address. | ERROR_FLOPPY_WRONG_CYLINDER
1124 | The floppy disk controller reported an error that is not recognized by the floppy disk driver. | ERROR_FLOPPY_UNKNOWN_ERROR
1125 | The floppy disk controller returned inconsistent results in its registers. | ERROR_FLOPPY_BAD_REGISTERS
1126 | While accessing the hard disk, a recalibrate operation failed, even after retries. | ERROR_DISK_RECALIBRATE_FAILED
1127 | While accessing the hard disk, a disk operation failed even after retries. | ERROR_DISK_OPERATION_FAILED
1128 | While accessing the hard disk, a disk controller reset was needed, but even that failed. | ERROR_DISK_RESET_FAILED
1129 | Physical end of tape encountered. | ERROR_EOM_OVERFLOW
1130 | Not enough server storage is available to process this command. | ERROR_NOT_ENOUGH_SERVER_MEMORY
1131 | A potential deadlock condition has been detected. | ERROR_POSSIBLE_DEADLOCK
1132 | The base address or the file offset specified does not have the proper alignment. | ERROR_MAPPED_ALIGNMENT
1140 | An attempt to change the system power state was vetoed by another application or driver. | ERROR_SET_POWER_STATE_VETOED
1141 | The system BIOS failed an attempt to change the system power state. | ERROR_SET_POWER_STATE_FAILED
1142 | An attempt was made to create more links on a file than the file system supports. | ERROR_TOO_MANY_LINKS
1150 | The specified program requires a newer version of Windows. | ERROR_OLD_WIN_VERSION
1151 | The specified program is not a Windows or MS-DOS program. | ERROR_APP_WRONG_OS
1152 | Cannot start more than one instance of the specified program. | ERROR_SINGLE_INSTANCE_APP
1153 | The specified program was written for an earlier version of Windows. | ERROR_RMODE_APP
1154 | One of the library files needed to run this application is damaged. | ERROR_INVALID_DLL
1155 | No application is associated with the specified file for this operation. | ERROR_NO_ASSOCIATION
1156 | An error occurred in sending the command to the application. | ERROR_DDE_FAIL
1157 | One of the library files needed to run this application cannot be found. | ERROR_DLL_NOT_FOUND
1158 | The current process has used all of its system allowance of handles for Window Manager objects. | ERROR_NO_MORE_USER_HANDLES
1159 | The message can be used only with synchronous operations. | ERROR_MESSAGE_SYNC_ONLY
1160 | The indicated source element has no media. | ERROR_SOURCE_ELEMENT_EMPTY
1161 | The indicated destination element already contains media. | ERROR_DESTINATION_ELEMENT_FULL
1162 | The indicated element does not exist. | ERROR_ILLEGAL_ELEMENT_ADDRESS
1163 | The indicated element is part of a magazine that is not present. | ERROR_MAGAZINE_NOT_PRESENT
1164 | The indicated device requires reinitialization due to hardware errors. | ERROR_DEVICE_REINITIALIZATION_NEEDED
1165 | The device has indicated that cleaning is required before further operations are attempted. | ERROR_DEVICE_REQUIRES_CLEANING
1166 | The device has indicated that its door is open. | ERROR_DEVICE_DOOR_OPEN
1167 | The device is not connected. | ERROR_DEVICE_NOT_CONNECTED
1168 | Element not found. | ERROR_NOT_FOUND
1169 | There was no match for the specified key in the index. | ERROR_NO_MATCH
1170 | The property set specified does not exist on the object. | ERROR_SET_NOT_FOUND
1171 | The point passed to GetMouseMovePointsEx is not in the buffer. | ERROR_POINT_NOT_FOUND
1172 | The tracking (workstation) service is not running. | ERROR_NO_TRACKING_SERVICE
1173 | The Volume ID could not be found. | ERROR_NO_VOLUME_ID
1175 | Unable to remove the file to be replaced. | ERROR_UNABLE_TO_REMOVE_REPLACED
1176 | Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name. | ERROR_UNABLE_TO_MOVE_REPLACEMENT
1177 | Unable to move the replacement file to the file to be replaced. The file to be replaced has been renamed using the backup name. | ERROR_UNABLE_TO_MOVE_REPLACEMENT_2
1178 | The volume change journal is being deleted. | ERROR_JOURNAL_DELETE_IN_PROGRESS
1179 | The volume change journal is not active. | ERROR_JOURNAL_NOT_ACTIVE
1180 | A file was found, but it may not be the correct file. | ERROR_POTENTIAL_FILE_FOUND
1181 | The journal entry has been deleted from the journal. | ERROR_JOURNAL_ENTRY_DELETED
1200 | The specified device name is invalid. | ERROR_BAD_DEVICE
1201 | The device is not currently connected but it is a remembered connection. | ERROR_CONNECTION_UNAVAIL
1202 | The local device name has a remembered connection to another network resource. | ERROR_DEVICE_ALREADY_REMEMBERED
1203 | No network provider accepted the given network path. | ERROR_NO_NET_OR_BAD_PATH
1204 | The specified network provider name is invalid. | ERROR_BAD_PROVIDER
1205 | Unable to open the network connection profile. | ERROR_CANNOT_OPEN_PROFILE
1206 | The network connection profile is corrupted. | ERROR_BAD_PROFILE
1207 | Cannot enumerate a noncontainer. | ERROR_NOT_CONTAINER
1208 | An extended error has occurred. | ERROR_EXTENDED_ERROR
1209 | The format of the specified group name is invalid. | ERROR_INVALID_GROUPNAME
1210 | The format of the specified computer name is invalid. | ERROR_INVALID_COMPUTERNAME
1211 | The format of the specified event name is invalid. | ERROR_INVALID_EVENTNAME
1212 | The format of the specified domain name is invalid. | ERROR_INVALID_DOMAINNAME
1213 | The format of the specified service name is invalid. | ERROR_INVALID_SERVICENAME
1214 | The format of the specified network name is invalid. | ERROR_INVALID_NETNAME
1215 | The format of the specified share name is invalid. | ERROR_INVALID_SHARENAME
1216 | The format of the specified password is invalid. | ERROR_INVALID_PASSWORDNAME
1217 | The format of the specified message name is invalid. | ERROR_INVALID_MESSAGENAME
1218 | The format of the specified message destination is invalid. | ERROR_INVALID_MESSAGEDEST
1219 | The credentials supplied conflict with an existing set of credentials. | ERROR_SESSION_CREDENTIAL_CONFLICT
1220 | An attempt was made to establish a session to a network server, but there are already too many sessions established to that server. | ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
1221 | The workgroup or domain name is already in use by another computer on the network. | ERROR_DUP_DOMAINNAME
1222 | The network is not present or not started. | ERROR_NO_NETWORK
1223 | The operation was canceled by the user. | ERROR_CANCELLED
1224 | The requested operation cannot be performed on a file with a user-mapped section open. | ERROR_USER_MAPPED_FILE
1225 | The remote system refused the network connection. | ERROR_CONNECTION_REFUSED
1226 | The network connection was gracefully closed. | ERROR_GRACEFUL_DISCONNECT
1227 | The network transport endpoint already has an address associated with it. | ERROR_ADDRESS_ALREADY_ASSOCIATED
1228 | An address has not yet been associated with the network endpoint. | ERROR_ADDRESS_NOT_ASSOCIATED
1229 | An operation was attempted on a nonexistent network connection. | ERROR_CONNECTION_INVALID
1230 | An invalid operation was attempted on an active network connection. | ERROR_CONNECTION_ACTIVE
1231 | The network location cannot be reached. For information about network troubleshooting, see Windows Help. | ERROR_NETWORK_UNREACHABLE
1232 | The network location cannot be reached. For information about network troubleshooting, see Windows Help. | ERROR_HOST_UNREACHABLE
1233 | The network location cannot be reached. For information about network troubleshooting, see Windows Help. | ERROR_PROTOCOL_UNREACHABLE
1234 | No service is operating at the destination network endpoint on the remote system. | ERROR_PORT_UNREACHABLE
1235 | The request was aborted. | ERROR_REQUEST_ABORTED
1236 | The network connection was aborted by the local system. | ERROR_CONNECTION_ABORTED
1237 | The operation could not be completed. A retry should be performed. | ERROR_RETRY
1238 | A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached. | ERROR_CONNECTION_COUNT_LIMIT
1239 | Attempting to log in during an unauthorized time of day for this account. | ERROR_LOGIN_TIME_RESTRICTION
1240 | The account is not authorized to log in from this station. | ERROR_LOGIN_WKSTA_RESTRICTION
1241 | The network address could not be used for the operation requested. | ERROR_INCORRECT_ADDRESS
1242 | The service is already registered. | ERROR_ALREADY_REGISTERED
1243 | The specified service does not exist. | ERROR_SERVICE_NOT_FOUND
1244 | The operation being requested was not performed because the user has not been authenticated. | ERROR_NOT_AUTHENTICATED
1245 | The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist. | ERROR_NOT_LOGGED_ON
1246 | Continue with work in progress. | ERROR_CONTINUE
1247 | An attempt was made to perform an initialization operation when initialization has already been completed. | ERROR_ALREADY_INITIALIZED
1248 | No more local devices. | ERROR_NO_MORE_DEVICES
1249 | The specified site does not exist. | ERROR_NO_SUCH_SITE
1250 | A domain controller with the specified name already exists. | ERROR_DOMAIN_CONTROLLER_EXISTS
1251 | This operation is supported only when you are connected to the server. | ERROR_ONLY_IF_CONNECTED
1252 | The group policy framework should call the extension even if there are no changes. | ERROR_OVERRIDE_NOCHANGES
1253 | The specified user does not have a valid profile. | ERROR_BAD_USER_PROFILE
1254 | This operation is not supported on a Microsoft Small Business Server. | ERROR_NOT_SUPPORTED_ON_SBS
1255 | The server machine is shutting down. | ERROR_SERVER_SHUTDOWN_IN_PROGRESS
1256 | The remote system is not available. For information about network troubleshooting, see Windows Help. | ERROR_HOST_DOWN
1257 | The security identifier provided is not from an account domain. | ERROR_NON_ACCOUNT_SID
1258 | The security identifier provided does not have a domain component. | ERROR_NON_DOMAIN_SID
1259 | AppHelp dialog canceled thus preventing the application from starting. | ERROR_APPHELP_BLOCK
1260 | Access to the requested resource has been disabled by your administrator. | ERROR_ACCESS_DISABLED_BY_POLICY
1261 | A program attempt to use an invalid register value. Normally caused by an uninitialized register. This error is Itanium specific. | ERROR_REG_NAT_CONSUMPTION
1262 | The share is currently offline or does not exist. | ERROR_CSCSHARE_OFFLINE
1300 | Not all privileges referenced are assigned to the caller. | ERROR_NOT_ALL_ASSIGNED
1301 | Some mapping between account names and security IDs was not done. | ERROR_SOME_NOT_MAPPED
1302 | No system quota limits are specifically set for this account. | ERROR_NO_QUOTAS_FOR_ACCOUNT
1303 | No encryption key is available. A well-known encryption key was returned. | ERROR_LOCAL_USER_SESSION_KEY
1304 | The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string. | ERROR_NULL_LM_PASSWORD
1305 | The revision level is unknown. | ERROR_UNKNOWN_REVISION
1306 | Indicates two revision levels are incompatible. | ERROR_REVISION_MISMATCH
1307 | This security ID may not be assigned as the owner of this object. | ERROR_INVALID_OWNER
1308 | This security ID may not be assigned as the primary group of an object. | ERROR_INVALID_PRIMARY_GROUP
1309 | An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client. | ERROR_NO_IMPERSONATION_TOKEN
1310 | The group may not be disabled. | ERROR_CANT_DISABLE_MANDATORY
1311 | There are currently no logon servers available to service the logon request. | ERROR_NO_LOGON_SERVERS
1312 | A specified logon session does not exist. It may already have been terminated. | ERROR_NO_SUCH_LOGON_SESSION
1313 | A specified privilege does not exist. | ERROR_NO_SUCH_PRIVILEGE
1314 | A required privilege is not held by the client. | ERROR_PRIVILEGE_NOT_HELD
1315 | The name provided is not a properly formed account name. | ERROR_INVALID_ACCOUNT_NAME
1316 | The specified user already exists. | ERROR_USER_EXISTS
1317 | The specified user does not exist. | ERROR_NO_SUCH_USER
1318 | The specified group already exists. | ERROR_GROUP_EXISTS
1319 | The specified group does not exist. | ERROR_NO_SUCH_GROUP
1320 | Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member. | ERROR_MEMBER_IN_GROUP
1321 | The specified user account is not a member of the specified group account. | ERROR_MEMBER_NOT_IN_GROUP
1322 | The last remaining administration account cannot be disabled or deleted. | ERROR_LAST_ADMIN
1323 | Unable to update the password. The value provided as the current password is incorrect. | ERROR_WRONG_PASSWORD
1324 | Unable to update the password. The value provided for the new password contains values that are not allowed in passwords. | ERROR_ILL_FORMED_PASSWORD
1325 | Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirement of the domain. | ERROR_PASSWORD_RESTRICTION
1326 | Logon failure: unknown user name or bad password. | ERROR_LOGON_FAILURE
1327 | Logon failure: user account restriction. | ERROR_ACCOUNT_RESTRICTION
1328 | Logon failure: account logon time restriction violation. | ERROR_INVALID_LOGON_HOURS
1329 | Logon failure: user not allowed to log on to this computer. | ERROR_INVALID_WORKSTATION
1330 | Logon failure: the specified account password has expired. | ERROR_PASSWORD_EXPIRED
1331 | Logon failure: account currently disabled. | ERROR_ACCOUNT_DISABLED
1332 | No mapping between account names and security IDs was done. | ERROR_NONE_MAPPED
1333 | Too many local user identifiers (LUIDs) were requested at one time. | ERROR_TOO_MANY_LUIDS_REQUESTED
1334 | No more local user identifiers (LUIDs) are available. | ERROR_LUIDS_EXHAUSTED
1335 | The subauthority part of a security ID is invalid for this particular use. | ERROR_INVALID_SUB_AUTHORITY
1336 | The access control list (ACL) structure is invalid. | ERROR_INVALID_ACL
1337 | The security ID structure is invalid. | ERROR_INVALID_SID
1338 | The security descriptor structure is invalid. | ERROR_INVALID_SECURITY_DESCR
1340 | The inherited access control list (ACL) or access control entry (ACE) could not be built. | ERROR_BAD_INHERITANCE_ACL
1341 | The server is currently disabled. | ERROR_SERVER_DISABLED
1342 | The server is currently enabled. | ERROR_SERVER_NOT_DISABLED
1343 | The value provided was an invalid value for an identifier authority. | ERROR_INVALID_ID_AUTHORITY
1344 | No more memory is available for security information updates. | ERROR_ALLOTTED_SPACE_EXCEEDED
1345 | The specified attributes are invalid, or incompatible with the attributes for the group as a whole. | ERROR_INVALID_GROUP_ATTRIBUTES
1346 | Either a required impersonation level was not provided, or the provided impersonation level is invalid. | ERROR_BAD_IMPERSONATION_LEVEL
1347 | Cannot open an anonymous level security token. | ERROR_CANT_OPEN_ANONYMOUS
1348 | The validation information class requested was invalid. | ERROR_BAD_VALIDATION_CLASS
1349 | The type of the token is inappropriate for its attempted use. | ERROR_BAD_TOKEN_TYPE
1350 | Unable to perform a security operation on an object that has no associated security. | ERROR_NO_SECURITY_ON_OBJECT
1351 | Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied. | ERROR_CANT_ACCESS_DOMAIN_INFO
1352 | The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation. | ERROR_INVALID_SERVER_STATE
1353 | The domain was in the wrong state to perform the security operation. | ERROR_INVALID_DOMAIN_STATE
1354 | This operation is only allowed for the Primary Domain Controller of the domain. | ERROR_INVALID_DOMAIN_ROLE
1355 | The specified domain either does not exist or could not be contacted. | ERROR_NO_SUCH_DOMAIN
1356 | The specified domain already exists. | ERROR_DOMAIN_EXISTS
1357 | An attempt was made to exceed the limit on the number of domains per server. | ERROR_DOMAIN_LIMIT_EXCEEDED
1358 | Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk. | ERROR_INTERNAL_DB_CORRUPTION
1359 | An internal error occurred. | ERROR_INTERNAL_ERROR
1360 | Generic access types were contained in an access mask which should already be mapped to nongeneric types. | ERROR_GENERIC_NOT_MAPPED
1361 | A security descriptor is not in the right format (absolute or self-relative). | ERROR_BAD_DESCRIPTOR_FORMAT
1362 | The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process. | ERROR_NOT_LOGON_PROCESS
1363 | Cannot start a new logon session with an ID that is already in use. | ERROR_LOGON_SESSION_EXISTS
1364 | A specified authentication package is unknown. | ERROR_NO_SUCH_PACKAGE
1365 | The logon session is not in a state that is consistent with the requested operation. | ERROR_BAD_LOGON_SESSION_STATE
1366 | The logon session ID is already in use. | ERROR_LOGON_SESSION_COLLISION
1367 | A logon request contained an invalid logon type value. | ERROR_INVALID_LOGON_TYPE
1368 | Unable to impersonate using a named pipe until data has been read from that pipe. | ERROR_CANNOT_IMPERSONATE
1369 | The transaction state of a registry subtree is incompatible with the requested operation. | ERROR_RXACT_INVALID_STATE
1370 | An internal security database corruption has been encountered. | ERROR_RXACT_COMMIT_FAILURE
1371 | Cannot perform this operation on built-in accounts. | ERROR_SPECIAL_ACCOUNT
1372 | Cannot perform this operation on this built-in special group. | ERROR_SPECIAL_GROUP
1373 | Cannot perform this operation on this built-in special user. | ERROR_SPECIAL_USER
1374 | The user cannot be removed from a group because the group is currently the user's primary group. | ERROR_MEMBERS_PRIMARY_GROUP
1375 | The token is already in use as a primary token. | ERROR_TOKEN_ALREADY_IN_USE
1376 | The specified local group does not exist. | ERROR_NO_SUCH_ALIAS
1377 | The specified account name is not a member of the local group. | ERROR_MEMBER_NOT_IN_ALIAS
1378 | The specified account name is already a member of the local group. | ERROR_MEMBER_IN_ALIAS
1379 | The specified local group already exists. | ERROR_ALIAS_EXISTS
1380 | Logon failure: the user has not been granted the requested logon type at this computer. | ERROR_LOGON_NOT_GRANTED
1381 | The maximum number of secrets that may be stored in a single system has been exceeded. | ERROR_TOO_MANY_SECRETS
1382 | The length of a secret exceeds the maximum length allowed. | ERROR_SECRET_TOO_LONG
1383 | The local security authority database contains an internal inconsistency. | ERROR_INTERNAL_DB_ERROR
1384 | During a logon attempt, the user's security context accumulated too many security IDs. | ERROR_TOO_MANY_CONTEXT_IDS
1385 | Logon failure: the user has not been granted the requested logon type at this computer. | ERROR_LOGON_TYPE_NOT_GRANTED
1386 | A cross-encrypted password is necessary to change a user password. | ERROR_NT_CROSS_ENCRYPTION_REQUIRED
1387 | A new member could not be added to or removed from the local group because the member does not exist. | ERROR_NO_SUCH_MEMBER
1388 | A new member could not be added to a local group because the member has the wrong account type. | ERROR_INVALID_MEMBER
1389 | Too many security IDs have been specified. | ERROR_TOO_MANY_SIDS
1390 | A cross-encrypted password is necessary to change this user password. | ERROR_LM_CROSS_ENCRYPTION_REQUIRED
1391 | Indicates an ACL contains no inheritable components. | ERROR_NO_INHERITANCE
1392 | The file or directory is corrupted and unreadable. | ERROR_FILE_CORRUPT
1393 | The disk structure is corrupted and unreadable. | ERROR_DISK_CORRUPT
1394 | There is no user session key for the specified logon session. | ERROR_NO_USER_SESSION_KEY
1395 | The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept. | ERROR_LICENSE_QUOTA_EXCEEDED
1396 | Logon Failure: The target account name is incorrect. | ERROR_WRONG_TARGET_NAME
1397 | Mutual Authentication failed. The server's password is out of date at the domain controller. | ERROR_MUTUAL_AUTH_FAILED
1398 | There is a time difference between the client and server. | ERROR_TIME_SKEW
1399 | This operation can not be performed on the current domain. | ERROR_CURRENT_DOMAIN_NOT_ALLOWED
1400 | Invalid window handle. | ERROR_INVALID_WINDOW_HANDLE
1401 | Invalid menu handle. | ERROR_INVALID_MENU_HANDLE
1402 | Invalid cursor handle. | ERROR_INVALID_CURSOR_HANDLE
1403 | Invalid accelerator table handle. | ERROR_INVALID_ACCEL_HANDLE
1404 | Invalid hook handle. | ERROR_INVALID_HOOK_HANDLE
1405 | Invalid handle to a multiple-window position structure. | ERROR_INVALID_DWP_HANDLE
1406 | Cannot create a top-level child window. | ERROR_TLW_WITH_WSCHILD
1407 | Cannot find window class. | ERROR_CANNOT_FIND_WND_CLASS
1408 | Invalid window; it belongs to other thread. | ERROR_WINDOW_OF_OTHER_THREAD
1409 | Hot key is already registered. | ERROR_HOTKEY_ALREADY_REGISTERED
1410 | Class already exists. | ERROR_CLASS_ALREADY_EXISTS
1411 | Class does not exist. | ERROR_CLASS_DOES_NOT_EXIST
1412 | Class still has open windows. | ERROR_CLASS_HAS_WINDOWS
1413 | Invalid index. | ERROR_INVALID_INDEX
1414 | Invalid icon handle. | ERROR_INVALID_ICON_HANDLE
1415 | Using private DIALOG window words. | ERROR_PRIVATE_DIALOG_INDEX
1416 | The list box identifier was not found. | ERROR_LISTBOX_ID_NOT_FOUND
1417 | No wildcards were found. | ERROR_NO_WILDCARD_CHARACTERS
1418 | Thread does not have a clipboard open. | ERROR_CLIPBOARD_NOT_OPEN
1419 | Hot key is not registered. | ERROR_HOTKEY_NOT_REGISTERED
1420 | The window is not a valid dialog window. | ERROR_WINDOW_NOT_DIALOG
1421 | Control ID not found. | ERROR_CONTROL_ID_NOT_FOUND
1422 | Invalid message for a combo box because it does not have an edit control. | ERROR_INVALID_COMBOBOX_MESSAGE
1423 | The window is not a combo box. | ERROR_WINDOW_NOT_COMBOBOX
1424 | Height must be less than 256. | ERROR_INVALID_EDIT_HEIGHT
1425 | Invalid device context (DC) handle. | ERROR_DC_NOT_FOUND
1426 | Invalid hook procedure type. | ERROR_INVALID_HOOK_FILTER
1427 | Invalid hook procedure. | ERROR_INVALID_FILTER_PROC
1428 | Cannot set nonlocal hook without a module handle. | ERROR_HOOK_NEEDS_HMOD
1429 | This hook procedure can only be set globally. | ERROR_GLOBAL_ONLY_HOOK
1430 | The journal hook procedure is already installed. | ERROR_JOURNAL_HOOK_SET
1431 | The hook procedure is not installed. | ERROR_HOOK_NOT_INSTALLED
1432 | Invalid message for single-selection list box. | ERROR_INVALID_LB_MESSAGE
1433 | LB_SETCOUNT sent to non-lazy list box. | ERROR_SETCOUNT_ON_BAD_LB
1434 | This list box does not support tab stops. | ERROR_LB_WITHOUT_TABSTOPS
1435 | Cannot destroy object created by another thread. | ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
1436 | Child windows cannot have menus. | ERROR_CHILD_WINDOW_MENU
1437 | The window does not have a system menu. | ERROR_NO_SYSTEM_MENU
1438 | Invalid message box style. | ERROR_INVALID_MSGBOX_STYLE
1439 | Invalid system-wide (SPI_*) parameter. | ERROR_INVALID_SPI_VALUE
1440 | Screen already locked. | ERROR_SCREEN_ALREADY_LOCKED
1441 | All handles to windows in a multiple-window position structure must have the same parent. | ERROR_HWNDS_HAVE_DIFF_PARENT
1442 | The window is not a child window. | ERROR_NOT_CHILD_WINDOW
1443 | Invalid GW_* command. | ERROR_INVALID_GW_COMMAND
1444 | Invalid thread identifier. | ERROR_INVALID_THREAD_ID
1445 | Cannot process a message from a window that is not a multiple document interface (MDI) window. | ERROR_NON_MDICHILD_WINDOW
1446 | Popup menu already active. | ERROR_POPUP_ALREADY_ACTIVE
1447 | The window does not have scroll bars. | ERROR_NO_SCROLLBARS
1448 | Scroll bar range cannot be greater than MAXLONG. | ERROR_INVALID_SCROLLBAR_RANGE
1449 | Cannot show or remove the window in the way specified. | ERROR_INVALID_SHOWWIN_COMMAND
1450 | Insufficient system resources exist to complete the requested service. | ERROR_NO_SYSTEM_RESOURCES
1451 | Insufficient system resources exist to complete the requested service. | ERROR_NONPAGED_SYSTEM_RESOURCES
1452 | Insufficient system resources exist to complete the requested service. | ERROR_PAGED_SYSTEM_RESOURCES
1453 | Insufficient quota to complete the requested service. | ERROR_WORKING_SET_QUOTA
1454 | Insufficient quota to complete the requested service. | ERROR_PAGEFILE_QUOTA
1455 | The paging file is too small for this operation to complete. | ERROR_COMMITMENT_LIMIT
1456 | A menu item was not found. | ERROR_MENU_ITEM_NOT_FOUND
1457 | Invalid keyboard layout handle. | ERROR_INVALID_KEYBOARD_HANDLE
1458 | Hook type not allowed. | ERROR_HOOK_TYPE_NOT_ALLOWED
1459 | This operation requires an interactive window station. | ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION
1460 | This operation returned because the timeout period expired. | ERROR_TIMEOUT
1461 | Invalid monitor handle. | ERROR_INVALID_MONITOR_HANDLE
1500 | The event log file is corrupted. | ERROR_EVENTLOG_FILE_CORRUPT
1501 | No event log file could be opened, so the event logging service did not start. | ERROR_EVENTLOG_CANT_START
1502 | The event log file is full. | ERROR_LOG_FILE_FULL
1503 | The event log file has changed between read operations. | ERROR_EVENTLOG_FILE_CHANGED
1601 | The Windows Installer service could not be accessed. Contact your support personnel to verify that the Windows Installer service is properly registered. | ERROR_INSTALL_SERVICE_FAILURE
1602 | User cancelled installation. | ERROR_INSTALL_USEREXIT
1603 | Fatal error during installation. | ERROR_INSTALL_FAILURE
1604 | Installation suspended, incomplete. | ERROR_INSTALL_SUSPEND
1605 | This action is only valid for products that are currently installed. | ERROR_UNKNOWN_PRODUCT
1606 | Feature ID not registered. | ERROR_UNKNOWN_FEATURE
1607 | Component ID not registered. | ERROR_UNKNOWN_COMPONENT
1608 | Unknown property. | ERROR_UNKNOWN_PROPERTY
1609 | Handle is in an invalid state. | ERROR_INVALID_HANDLE_STATE
1610 | The configuration data for this product is corrupt. Contact your support personnel. | ERROR_BAD_CONFIGURATION
1611 | Component qualifier not present. | ERROR_INDEX_ABSENT
1612 | The installation source for this product is not available. Verify that the source exists and that you can access it. | ERROR_INSTALL_SOURCE_ABSENT
1613 | This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service. | ERROR_INSTALL_PACKAGE_VERSION
1614 | Product is uninstalled. | ERROR_PRODUCT_UNINSTALLED
1615 | SQL query syntax invalid or unsupported. | ERROR_BAD_QUERY_SYNTAX
1616 | Record field does not exist. | ERROR_INVALID_FIELD
1617 | The device has been removed. | ERROR_DEVICE_REMOVED
1618 | Another installation is already in progress. Complete that installation before proceeding with this install. | ERROR_INSTALL_ALREADY_RUNNING
1619 | This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package. | ERROR_INSTALL_PACKAGE_OPEN_FAILED
1620 | This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package. | ERROR_INSTALL_PACKAGE_INVALID
1621 | There was an error starting the Windows Installer service user interface. Contact your support personnel. | ERROR_INSTALL_UI_FAILURE
1622 | Error opening installation log file. Verify that the specified log file location exists and that you can write to it. | ERROR_INSTALL_LOG_FAILURE
1623 | The language of this installation package is not supported by your system. | ERROR_INSTALL_LANGUAGE_UNSUPPORTED
1624 | Error applying transforms. Verify that the specified transform paths are valid. | ERROR_INSTALL_TRANSFORM_FAILURE
1625 | This installation is forbidden by system policy. Contact your system administrator. | ERROR_INSTALL_PACKAGE_REJECTED
1626 | Function could not be executed. | ERROR_FUNCTION_NOT_CALLED
1627 | Function failed during execution. | ERROR_FUNCTION_FAILED
1628 | Invalid or unknown table specified. | ERROR_INVALID_TABLE
1629 | Data supplied is of wrong type. | ERROR_DATATYPE_MISMATCH
1630 | Data of this type is not supported. | ERROR_UNSUPPORTED_TYPE
1631 | The Windows Installer service failed to start. Contact your support personnel. | ERROR_CREATE_FAILED
1632 | The temp folder is either full or inaccessible. Verify that the temp folder exists and that you can write to it. | ERROR_INSTALL_TEMP_UNWRITABLE
1633 | This installation package is not supported by this processor type. Contact your product vendor. | ERROR_INSTALL_PLATFORM_UNSUPPORTED
1634 | Component not used on this computer. | ERROR_INSTALL_NOTUSED
1635 | This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package. | ERROR_PATCH_PACKAGE_OPEN_FAILED
1636 | This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package. | ERROR_PATCH_PACKAGE_INVALID
1637 | This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service. | ERROR_PATCH_PACKAGE_UNSUPPORTED.
1638 | Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel. | ERROR_PRODUCT_VERSION
1639 | Invalid command line argument. Consult the Windows Installer SDK for detailed command line help. | ERROR_INVALID_COMMAND_LINE
1640 | Only administrators have permission to add, remove, or configure server software during a Terminal Services remote session. If you want to install or configure software on the server, contact your network administrator. | ERROR_INSTALL_REMOTE_DISALLOWED
1641 | The requested operation completed successfully. The system will be restarted so the changes can take effect. | ERROR_SUCCESS_REBOOT_INITIATED
1642 | The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. | ERROR_PATCH_TARGET_NOT_FOUND
1643 | The patch package is not permitted by system policy. It is not signed with an appropriate certificate. | ERROR_PATCH_PACKAGE_REJECTED
1644 | One or more customizations are not permitted by system policy. They are not signed with an appropriate certificate. | ERROR_INSTALL_TRANSFORM_REJECTED
1700 | The string binding is invalid. | RPC_S_INVALID_STRING_BINDING
1701 | The binding handle is not the correct type. | RPC_S_WRONG_KIND_OF_BINDING
1702 | The binding handle is invalid. | RPC_S_INVALID_BINDING
1703 | The RPC protocol sequence is not supported. | RPC_S_PROTSEQ_NOT_SUPPORTED
1704 | The RPC protocol sequence is invalid. | RPC_S_INVALID_RPC_PROTSEQ
1705 | The string universal unique identifier (UUID) is invalid. | RPC_S_INVALID_STRING_UUID
1706 | The endpoint format is invalid. | RPC_S_INVALID_ENDPOINT_FORMAT
1707 | The network address is invalid. | RPC_S_INVALID_NET_ADDR
1708 | No endpoint was found. | RPC_S_NO_ENDPOINT_FOUND
1709 | The timeout value is invalid. | RPC_S_INVALID_TIMEOUT
1710 | The object universal unique identifier (UUID) was not found. | RPC_S_OBJECT_NOT_FOUND
1711 | The object universal unique identifier (UUID) has already been registered. | RPC_S_ALREADY_REGISTERED
1712 | The type universal unique identifier (UUID) has already been registered. | RPC_S_TYPE_ALREADY_REGISTERED
1713 | The RPC server is already listening. | RPC_S_ALREADY_LISTENING
1714 | No protocol sequences have been registered. | RPC_S_NO_PROTSEQS_REGISTERED
1715 | The RPC server is not listening. | RPC_S_NOT_LISTENING
1716 | The manager type is unknown. | RPC_S_UNKNOWN_MGR_TYPE
1717 | The interface is unknown. | RPC_S_UNKNOWN_IF
1718 | There are no bindings. | RPC_S_NO_BINDINGS
1719 | There are no protocol sequences. | RPC_S_NO_PROTSEQS
1720 | The endpoint cannot be created. | RPC_S_CANT_CREATE_ENDPOINT
1721 | Not enough resources are available to complete this operation. | RPC_S_OUT_OF_RESOURCES
1722 | The RPC server is unavailable. | RPC_S_SERVER_UNAVAILABLE
1723 | The RPC server is too busy to complete this operation. | RPC_S_SERVER_TOO_BUSY
1724 | The network options are invalid. | RPC_S_INVALID_NETWORK_OPTIONS
1725 | There are no remote procedure calls active on this thread. | RPC_S_NO_CALL_ACTIVE
1726 | The remote procedure call failed. | RPC_S_CALL_FAILED
1727 | The remote procedure call failed and did not execute. | RPC_S_CALL_FAILED_DNE
1728 | A remote procedure call (RPC) protocol error occurred. | RPC_S_PROTOCOL_ERROR
1730 | The transfer syntax is not supported by the RPC server. | RPC_S_UNSUPPORTED_TRANS_SYN
1732 | The universal unique identifier (UUID) type is not supported. | RPC_S_UNSUPPORTED_TYPE
1733 | The tag is invalid. | RPC_S_INVALID_TAG
1734 | The array bounds are invalid. | RPC_S_INVALID_BOUND
1735 | The binding does not contain an entry name. | RPC_S_NO_ENTRY_NAME
1736 | The name syntax is invalid. | RPC_S_INVALID_NAME_SYNTAX
1737 | The name syntax is not supported. | RPC_S_UNSUPPORTED_NAME_SYNTAX
1739 | No network address is available to use to construct a universal unique identifier (UUID). | RPC_S_UUID_NO_ADDRESS
1740 | The endpoint is a duplicate. | RPC_S_DUPLICATE_ENDPOINT
1741 | The authentication type is unknown. | RPC_S_UNKNOWN_AUTHN_TYPE
1742 | The maximum number of calls is too small. | RPC_S_MAX_CALLS_TOO_SMALL
1743 | The string is too long. | RPC_S_STRING_TOO_LONG
1744 | The RPC protocol sequence was not found. | RPC_S_PROTSEQ_NOT_FOUND
1745 | The procedure number is out of range. | RPC_S_PROCNUM_OUT_OF_RANGE
1746 | The binding does not contain any authentication information. | RPC_S_BINDING_HAS_NO_AUTH
1747 | The authentication service is unknown. | RPC_S_UNKNOWN_AUTHN_SERVICE
1748 | The authentication level is unknown. | RPC_S_UNKNOWN_AUTHN_LEVEL
1749 | The security context is invalid. | RPC_S_INVALID_AUTH_IDENTITY
1750 | The authorization service is unknown. | RPC_S_UNKNOWN_AUTHZ_SERVICE
1751 | The entry is invalid. | EPT_S_INVALID_ENTRY
1752 | The server endpoint cannot perform the operation. | EPT_S_CANT_PERFORM_OP
1753 | There are no more endpoints available from the endpoint mapper. | EPT_S_NOT_REGISTERED
1754 | No interfaces have been exported. | RPC_S_NOTHING_TO_EXPORT
1755 | The entry name is incomplete. | RPC_S_INCOMPLETE_NAME
1756 | The version option is invalid. | RPC_S_INVALID_VERS_OPTION
1757 | There are no more members. | RPC_S_NO_MORE_MEMBERS
1758 | There is nothing to unexport. | RPC_S_NOT_ALL_OBJS_UNEXPORTED
1759 | The interface was not found. | RPC_S_INTERFACE_NOT_FOUND
1760 | The entry already exists. | RPC_S_ENTRY_ALREADY_EXISTS
1761 | The entry is not found. | RPC_S_ENTRY_NOT_FOUND
1762 | The name service is unavailable. | RPC_S_NAME_SERVICE_UNAVAILABLE
1763 | The network address family is invalid. | RPC_S_INVALID_NAF_ID
1764 | The requested operation is not supported. | RPC_S_CANNOT_SUPPORT
1765 | No security context is available to allow impersonation. | RPC_S_NO_CONTEXT_AVAILABLE
1766 | An internal error occurred in a remote procedure call (RPC). | RPC_S_INTERNAL_ERROR
1767 | The RPC server attempted an integer division by zero. | RPC_S_ZERO_DIVIDE
1768 | An addressing error occurred in the RPC server. | RPC_S_ADDRESS_ERROR
1769 | A floating-point operation at the RPC server caused a division by zero. | RPC_S_FP_DIV_ZERO
1770 | A floating-point underflow occurred at the RPC server. | RPC_S_FP_UNDERFLOW
1771 | A floating-point overflow occurred at the RPC server. | RPC_S_FP_OVERFLOW
1772 | The list of RPC servers available for the binding of auto handles has been exhausted. | RPC_X_NO_MORE_ENTRIES
1773 | Unable to open the character translation table file. | RPC_X_SS_CHAR_TRANS_OPEN_FAIL
1774 | The file containing the character translation table has fewer than 512 bytes. | RPC_X_SS_CHAR_TRANS_SHORT_FILE
1775 | A null context handle was passed from the client to the host during a remote procedure call. | RPC_X_SS_IN_NULL_CONTEXT
1777 | The context handle changed during a remote procedure call. | RPC_X_SS_CONTEXT_DAMAGED
1778 | The binding handles passed to a remote procedure call do not match. | RPC_X_SS_HANDLES_MISMATCH
1779 | The stub is unable to get the remote procedure call handle. | RPC_X_SS_CANNOT_GET_CALL_HANDLE
1780 | A null reference pointer was passed to the stub. | RPC_X_NULL_REF_POINTER
1781 | The enumeration value is out of range. | RPC_X_ENUM_VALUE_OUT_OF_RANGE
1782 | The byte count is too small. | RPC_X_BYTE_COUNT_TOO_SMALL
1783 | The stub received bad data. | RPC_X_BAD_STUB_DATA
1784 | The supplied user buffer is not valid for the requested operation. | ERROR_INVALID_USER_BUFFER
1785 | The disk media is not recognized. It may not be formatted. | ERROR_UNRECOGNIZED_MEDIA
1786 | The workstation does not have a trust secret. | ERROR_NO_TRUST_LSA_SECRET
1787 | The security database on the server does not have a computer account for this workstation trust relationship. | ERROR_NO_TRUST_SAM_ACCOUNT
1788 | The trust relationship between the primary domain and the trusted domain failed. | ERROR_TRUSTED_DOMAIN_FAILURE
1789 | The trust relationship between this workstation and the primary domain failed. | ERROR_TRUSTED_RELATIONSHIP_FAILURE
1790 | The network logon failed. | ERROR_TRUST_FAILURE
1791 | A remote procedure call is already in progress for this thread. | RPC_S_CALL_IN_PROGRESS
1792 | An attempt was made to logon, but the network logon service was not started. | ERROR_NETLOGON_NOT_STARTED
1793 | The user's account has expired. | ERROR_ACCOUNT_EXPIRED
1794 | The redirector is in use and cannot be unloaded. | ERROR_REDIRECTOR_HAS_OPEN_HANDLES
1795 | The specified printer driver is already installed. | ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
1796 | The specified port is unknown. | ERROR_UNKNOWN_PORT
1797 | The printer driver is unknown. | ERROR_UNKNOWN_PRINTER_DRIVER
1798 | The print processor is unknown. | ERROR_UNKNOWN_PRINTPROCESSOR
1799 | The specified separator file is invalid. | ERROR_INVALID_SEPARATOR_FILE
1800 | The specified priority is invalid. | ERROR_INVALID_PRIORITY
1801 | The printer name is invalid. | ERROR_INVALID_PRINTER_NAME
1802 | The printer already exists. | ERROR_PRINTER_ALREADY_EXISTS
1803 | The printer command is invalid. | ERROR_INVALID_PRINTER_COMMAND
1804 | The specified datatype is invalid. | ERROR_INVALID_DATATYPE
1805 | The environment specified is invalid. | ERROR_INVALID_ENVIRONMENT
1806 | There are no more bindings. | RPC_S_NO_MORE_BINDINGS
1807 | The account used is an interdomain trust account. Use your global user account or local user account to access this server. | ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
1808 | The account used is a computer account. Use your global user account or local user account to access this server. | ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
1809 | The account used is a server trust account. Use your global user account or local user account to access this server. | ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
1810 | The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain. | ERROR_DOMAIN_TRUST_INCONSISTENT
1811 | The server is in use and cannot be unloaded. | ERROR_SERVER_HAS_OPEN_HANDLES
1812 | The specified image file did not contain a resource section. | ERROR_RESOURCE_DATA_NOT_FOUND
1813 | The specified resource type cannot be found in the image file. | ERROR_RESOURCE_TYPE_NOT_FOUND
1814 | The specified resource name cannot be found in the image file. | ERROR_RESOURCE_NAME_NOT_FOUND
1815 | The specified resource language ID cannot be found in the image file. | ERROR_RESOURCE_LANG_NOT_FOUND
1816 | Not enough quota is available to process this command. | ERROR_NOT_ENOUGH_QUOTA
1817 | No interfaces have been registered. | RPC_S_NO_INTERFACES
1818 | The remote procedure call was cancelled. | RPC_S_CALL_CANCELLED
1819 | The binding handle does not contain all required information. | RPC_S_BINDING_INCOMPLETE
1820 | A communications failure occurred during a remote procedure call. | RPC_S_COMM_FAILURE
1821 | The requested authentication level is not supported. | RPC_S_UNSUPPORTED_AUTHN_LEVEL
1822 | No principal name registered. | RPC_S_NO_PRINC_NAME
1823 | The error specified is not a valid Windows RPC error code. | RPC_S_NOT_RPC_ERROR
1824 | A UUID that is valid only on this computer has been allocated. | RPC_S_UUID_LOCAL_ONLY
1825 | A security package specific error occurred. | RPC_S_SEC_PKG_ERROR
1826 | Thread is not canceled. | RPC_S_NOT_CANCELLED
1827 | Invalid operation on the encoding/decoding handle. | RPC_X_INVALID_ES_ACTION
1828 | Incompatible version of the serializing package. | RPC_X_WRONG_ES_VERSION
1829 | Incompatible version of the RPC stub. | RPC_X_WRONG_STUB_VERSION
1830 | The RPC pipe object is invalid or corrupted. | RPC_X_INVALID_PIPE_OBJECT
1831 | An invalid operation was attempted on an RPC pipe object. | RPC_X_WRONG_PIPE_ORDER
1832 | Unsupported RPC pipe version. | RPC_X_WRONG_PIPE_VERSION
1898 | The group member was not found. | RPC_S_GROUP_MEMBER_NOT_FOUND
1899 | The endpoint mapper database entry could not be created. | EPT_S_CANT_CREATE
1900 | The object universal unique identifier (UUID) is the nil UUID. | RPC_S_INVALID_OBJECT
1901 | The specified time is invalid. | ERROR_INVALID_TIME
1902 | The specified form name is invalid. | ERROR_INVALID_FORM_NAME
1903 | The specified form size is invalid. | ERROR_INVALID_FORM_SIZE
1904 | The specified printer handle is already being waited on | ERROR_ALREADY_WAITING
1905 | The specified printer has been deleted. | ERROR_PRINTER_DELETED
1906 | The state of the printer is invalid. | ERROR_INVALID_PRINTER_STATE
1907 | The user's password must be changed before logging on the first time. | ERROR_PASSWORD_MUST_CHANGE
1908 | Could not find the domain controller for this domain. | ERROR_DOMAIN_CONTROLLER_NOT_FOUND
1909 | The referenced account is currently locked out and may not be logged on to. | ERROR_ACCOUNT_LOCKED_OUT
1910 | The object exporter specified was not found. | OR_INVALID_OXID
1911 | The object specified was not found. | OR_INVALID_OID
1912 | The object resolver set specified was not found. | OR_INVALID_SET
1913 | Some data remains to be sent in the request buffer. | RPC_S_SEND_INCOMPLETE
1914 | Invalid asynchronous remote procedure call handle. | RPC_S_INVALID_ASYNC_HANDLE
1915 | Invalid asynchronous RPC call handle for this operation. | RPC_S_INVALID_ASYNC_CALL
1916 | The RPC pipe object has already been closed. | RPC_X_PIPE_CLOSED
1917 | The RPC call completed before all pipes were processed. | RPC_X_PIPE_DISCIPLINE_ERROR
1918 | No more data is available from the RPC pipe. | RPC_X_PIPE_EMPTY
1919 | No site name is available for this machine. | ERROR_NO_SITENAME
1920 | The file can not be accessed by the system. | ERROR_CANT_ACCESS_FILE
1921 | The name of the file cannot be resolved by the system. | ERROR_CANT_RESOLVE_FILENAME
1922 | The entry is not of the expected type. | RPC_S_ENTRY_TYPE_MISMATCH
1923 | Not all object UUIDs could be exported to the specified entry. | RPC_S_NOT_ALL_OBJS_EXPORTED
1924 | Interface could not be exported to the specified entry. | RPC_S_INTERFACE_NOT_EXPORTED
1925 | The specified profile entry could not be added. | RPC_S_PROFILE_NOT_ADDED
1926 | The specified profile element could not be added. | RPC_S_PRF_ELT_NOT_ADDED
1927 | The specified profile element could not be removed. | RPC_S_PRF_ELT_NOT_REMOVED
1928 | The group element could not be added. | RPC_S_GRP_ELT_NOT_ADDED
1929 | The group element could not be removed. | RPC_S_GRP_ELT_NOT_REMOVED
1930 | The printer driver is not compatible with a policy enabled on your computer that blocks NT 4.0 drivers. | ERROR_KM_DRIVER_BLOCKED
2000 | The pixel format is invalid. | ERROR_INVALID_PIXEL_FORMAT
2001 | The specified driver is invalid. | ERROR_BAD_DRIVER
2002 | The window style or class attribute is invalid for this operation. | ERROR_INVALID_WINDOW_STYLE
2003 | The requested metafile operation is not supported. | ERROR_METAFILE_NOT_SUPPORTED
2004 | The requested transformation operation is not supported. | ERROR_TRANSFORM_NOT_SUPPORTED
2005 | The requested clipping operation is not supported. | ERROR_CLIPPING_NOT_SUPPORTED
2010 | The specified color management module is invalid. | ERROR_INVALID_CMM
2011 | The specified color profile is invalid. | ERROR_INVALID_PROFILE
2012 | The specified tag was not found. | ERROR_TAG_NOT_FOUND
2013 | A required tag is not present. | ERROR_TAG_NOT_PRESENT
2014 | The specified tag is already present. | ERROR_DUPLICATE_TAG
2015 | The specified color profile is not associated with any device. | ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE
2016 | The specified color profile was not found. | ERROR_PROFILE_NOT_FOUND
2017 | The specified color space is invalid. | ERROR_INVALID_COLORSPACE
2018 | Image Color Management is not enabled. | ERROR_ICM_NOT_ENABLED
2019 | There was an error while deleting the color transform. | ERROR_DELETING_ICM_XFORM
2020 | The specified color transform is invalid. | ERROR_INVALID_TRANSFORM
2021 | The specified transform does not match the bitmap's color space. | ERROR_COLORSPACE_MISMATCH
2022 | The specified named color index is not present in the profile. | ERROR_INVALID_COLORINDEX
2108 | The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified. | ERROR_CONNECTED_OTHER_PASSWORD
2202 | The specified username is invalid. | ERROR_BAD_USERNAME
2250 | This network connection does not exist. | ERROR_NOT_CONNECTED
2401 | This network connection has files open or requests pending. | ERROR_OPEN_FILES
2402 | Active connections still exist. | ERROR_ACTIVE_CONNECTIONS
2404 | The device is in use by an active process and cannot be disconnected. | ERROR_DEVICE_IN_USE
2500 | The kerberos protocol encountered an error while validating the KDC certificate during smartcard logon. | ERROR_PKINIT_FAILURE
2501 | The kerberos protocol encountered an error while attempting to utilize the smartcard subsystem. | ERROR_SMARTCARD_SUBSYSTEM_FAILURE
3000 | The specified print monitor is unknown. | ERROR_UNKNOWN_PRINT_MONITOR
3001 | The specified printer driver is currently in use. | ERROR_PRINTER_DRIVER_IN_USE
3002 | The spool file was not found. | ERROR_SPOOL_FILE_NOT_FOUND
3003 | A StartDocPrinter call was not issued. | ERROR_SPL_NO_STARTDOC
3004 | An AddJob call was not issued. | ERROR_SPL_NO_ADDJOB
3005 | The specified print processor has already been installed. | ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED
3006 | The specified print monitor has already been installed. | ERROR_PRINT_MONITOR_ALREADY_INSTALLED
3007 | The specified print monitor does not have the required functions. | ERROR_INVALID_PRINT_MONITOR
3008 | The specified print monitor is currently in use. | ERROR_PRINT_MONITOR_IN_USE
3009 | The requested operation is not allowed when there are jobs queued to the printer. | ERROR_PRINTER_HAS_JOBS_QUEUED
3010 | The requested operation is successful. Changes will not be effective until the system is rebooted. | ERROR_SUCCESS_REBOOT_REQUIRED
3011 | The requested operation is successful. Changes will not be effective until the service is restarted. | ERROR_SUCCESS_RESTART_REQUIRED
3012 | No printers were found. | ERROR_PRINTER_NOT_FOUND
4000 | WINS encountered an error while processing the command. | ERROR_WINS_INTERNAL
4001 | The local WINS can not be deleted. | ERROR_CAN_NOT_DEL_LOCAL_WINS
4002 | The importation from the file failed. | ERROR_STATIC_INIT
4003 | The backup failed. Was a full backup done before? | ERROR_INC_BACKUP
4004 | The backup failed. Check the directory to which you are backing the database. | ERROR_FULL_BACKUP
4005 | The name does not exist in the WINS database. | ERROR_REC_NON_EXISTENT
4006 | Replication with a nonconfigured partner is not allowed. | ERROR_RPL_NOT_ALLOWED
4100 | The DHCP client has obtained an IP address that is already in use on the network. The local interface will be disabled until the DHCP client can obtain a new address. | ERROR_DHCP_ADDRESS_CONFLICT
4200 | The GUID passed was not recognized as valid by a WMI data provider. | ERROR_WMI_GUID_NOT_FOUND
4201 | The instance name passed was not recognized as valid by a WMI data provider. | ERROR_WMI_INSTANCE_NOT_FOUND
4202 | The data item ID passed was not recognized as valid by a WMI data provider. | ERROR_WMI_ITEMID_NOT_FOUND
4203 | The WMI request could not be completed and should be retried. | ERROR_WMI_TRY_AGAIN
4204 | The WMI data provider could not be located. | ERROR_WMI_DP_NOT_FOUND
4205 | The WMI data provider references an instance set that has not been registered. | ERROR_WMI_UNRESOLVED_INSTANCE_REF
4206 | The WMI data block or event notification has already been enabled. | ERROR_WMI_ALREADY_ENABLED
4207 | The WMI data block is no longer available. | ERROR_WMI_GUID_DISCONNECTED
4208 | The WMI data service is not available. | ERROR_WMI_SERVER_UNAVAILABLE
4209 | The WMI data provider failed to carry out the request. | ERROR_WMI_DP_FAILED
4210 | The WMI MOF information is not valid. | ERROR_WMI_INVALID_MOF
4211 | The WMI registration information is not valid. | ERROR_WMI_INVALID_REGINFO
4212 | The WMI data block or event notification has already been disabled. | ERROR_WMI_ALREADY_DISABLED
4213 | The WMI data item or data block is read only. | ERROR_WMI_READ_ONLY
4214 | The WMI data item or data block could not be changed. | ERROR_WMI_SET_FAILURE
4300 | The media identifier does not represent a valid medium. | ERROR_INVALID_MEDIA
4301 | The library identifier does not represent a valid library. | ERROR_INVALID_LIBRARY
4302 | The media pool identifier does not represent a valid media pool. | ERROR_INVALID_MEDIA_POOL
4303 | The drive and medium are not compatible or exist in different libraries. | ERROR_DRIVE_MEDIA_MISMATCH
4304 | The medium currently exists in an offline library and must be online to perform this operation. | ERROR_MEDIA_OFFLINE
4305 | The operation cannot be performed on an offline library. | ERROR_LIBRARY_OFFLINE
4306 | The library, drive, or media pool is empty. | ERROR_EMPTY
4307 | The library, drive, or media pool must be empty to perform this operation. | ERROR_NOT_EMPTY
4308 | No media is currently available in this media pool or library. | ERROR_MEDIA_UNAVAILABLE
4309 | A resource required for this operation is disabled. | ERROR_RESOURCE_DISABLED
4310 | The media identifier does not represent a valid cleaner. | ERROR_INVALID_CLEANER
4311 | The drive cannot be cleaned or does not support cleaning. | ERROR_UNABLE_TO_CLEAN
4312 | The object identifier does not represent a valid object. | ERROR_OBJECT_NOT_FOUND
4313 | Unable to read from or write to the database. | ERROR_DATABASE_FAILURE
4314 | The database is full. | ERROR_DATABASE_FULL
4315 | The medium is not compatible with the device or media pool. | ERROR_MEDIA_INCOMPATIBLE
4316 | The resource required for this operation does not exist. | ERROR_RESOURCE_NOT_PRESENT
4317 | The operation identifier is not valid. | ERROR_INVALID_OPERATION
4318 | The media is not mounted or ready for use. | ERROR_MEDIA_NOT_AVAILABLE
4319 | The device is not ready for use. | ERROR_DEVICE_NOT_AVAILABLE
4320 | The operator or administrator has refused the request. | ERROR_REQUEST_REFUSED
4321 | The drive identifier does not represent a valid drive. | ERROR_INVALID_DRIVE_OBJECT
4322 | Library is full. No slot is available for use. | ERROR_LIBRARY_FULL
4323 | The transport cannot access the medium. | ERROR_MEDIUM_NOT_ACCESSIBLE
4324 | Unable to load the medium into the drive. | ERROR_UNABLE_TO_LOAD_MEDIUM
4325 | Unable to retrieve status about the drive. | ERROR_UNABLE_TO_INVENTORY_DRIVE
4326 | Unable to retrieve status about the slot. | ERROR_UNABLE_TO_INVENTORY_SLOT
4327 | Unable to retrieve status about the transport. | ERROR_UNABLE_TO_INVENTORY_TRANSPORT
4328 | Cannot use the transport because it is already in use. | ERROR_TRANSPORT_FULL
4329 | Unable to open or close the inject/eject port. | ERROR_CONTROLLING_IEPORT
4330 | Unable to eject the media because it is in a drive. | ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA
4331 | A cleaner slot is already reserved. | ERROR_CLEANER_SLOT_SET
4332 | A cleaner slot is not reserved. | ERROR_CLEANER_SLOT_NOT_SET
4333 | The cleaner cartridge has performed the maximum number of drive cleanings. | ERROR_CLEANER_CARTRIDGE_SPENT
4334 | Unexpected on-medium identifier. | ERROR_UNEXPECTED_OMID
4335 | The last remaining item in this group or resource cannot be deleted. | ERROR_CANT_DELETE_LAST_ITEM
4336 | The message provided exceeds the maximum size allowed for this parameter. | ERROR_MESSAGE_EXCEEDS_MAX_SIZE
4337 | The volume contains system or paging files. | ERROR_VOLUME_CONTAINS_SYS_FILES
4338 | The media type cannot be removed from this library since at least one drive in the library reports it can support this media type. | ERROR_INDIGENOUS_TYPE
4339 | This offline media cannot be mounted on this system since no enabled drives are present which can be used. | ERROR_NO_SUPPORTING_DRIVES
4340 | A cleaner cartridge is present in the tape library. | ERROR_CLEANER_CARTRIDGE_INSTALLED
4350 | The remote storage service was not able to recall the file. | ERROR_FILE_OFFLINE
4351 | The remote storage service is not operational at this time. | ERROR_REMOTE_STORAGE_NOT_ACTIVE
4352 | The remote storage service encountered a media error. | ERROR_REMOTE_STORAGE_MEDIA_ERROR
4390 | The file or directory is not a reparse point. | ERROR_NOT_A_REPARSE_POINT
4391 | The reparse point attribute cannot be set because it conflicts with an existing attribute. | ERROR_REPARSE_ATTRIBUTE_CONFLICT
4392 | The data present in the reparse point buffer is invalid. | ERROR_INVALID_REPARSE_DATA
4393 | The tag present in the reparse point buffer is invalid. | ERROR_REPARSE_TAG_INVALID
4394 | There is a mismatch between the tag specified in the request and the tag present in the reparse point. | ERROR_REPARSE_TAG_MISMATCH
4500 | Single Instance Storage is not available on this volume. | ERROR_VOLUME_NOT_SIS_ENABLED
5001 | The cluster resource cannot be moved to another group because other resources are dependent on it. | ERROR_DEPENDENT_RESOURCE_EXISTS
5002 | The cluster resource dependency cannot be found. | ERROR_DEPENDENCY_NOT_FOUND
5003 | The cluster resource cannot be made dependent on the specified resource because it is already dependent. | ERROR_DEPENDENCY_ALREADY_EXISTS
5004 | The cluster resource is not online. | ERROR_RESOURCE_NOT_ONLINE
5005 | A cluster node is not available for this operation. | ERROR_HOST_NODE_NOT_AVAILABLE
5006 | The cluster resource is not available. | ERROR_RESOURCE_NOT_AVAILABLE
5007 | The cluster resource could not be found. | ERROR_RESOURCE_NOT_FOUND
5008 | The cluster is being shut down. | ERROR_SHUTDOWN_CLUSTER
5009 | A cluster node cannot be evicted from the cluster unless the node is down. | ERROR_CANT_EVICT_ACTIVE_NODE
5010 | The object already exists. | ERROR_OBJECT_ALREADY_EXISTS
5011 | The object is already in the list. | ERROR_OBJECT_IN_LIST
5012 | The cluster group is not available for any new requests. | ERROR_GROUP_NOT_AVAILABLE
5013 | The cluster group could not be found. | ERROR_GROUP_NOT_FOUND
5014 | The operation could not be completed because the cluster group is not online. | ERROR_GROUP_NOT_ONLINE
5015 | The cluster node is not the owner of the resource. | ERROR_HOST_NODE_NOT_RESOURCE_OWNER
5016 | The cluster node is not the owner of the group. | ERROR_HOST_NODE_NOT_GROUP_OWNER
5017 | The cluster resource could not be created in the specified resource monitor. | ERROR_RESMON_CREATE_FAILED
5018 | The cluster resource could not be brought online by the resource monitor. | ERROR_RESMON_ONLINE_FAILED
5019 | The operation could not be completed because the cluster resource is online. | ERROR_RESOURCE_ONLINE
5020 | The cluster resource could not be deleted or brought offline because it is the quorum resource. | ERROR_QUORUM_RESOURCE
5021 | The cluster could not make the specified resource a quorum resource because it is not capable of being a quorum resource. | ERROR_NOT_QUORUM_CAPABLE
5022 | The cluster software is shutting down. | ERROR_CLUSTER_SHUTTING_DOWN
5023 | The group or resource is not in the correct state to perform the requested operation. | ERROR_INVALID_STATE
5024 | The properties were stored but not all changes will take effect until the next time the resource is brought online. | ERROR_RESOURCE_PROPERTIES_STORED
5025 | The cluster could not make the specified resource a quorum resource because it does not belong to a shared storage class. | ERROR_NOT_QUORUM_CLASS
5026 | The cluster resource could not be deleted since it is a core resource. | ERROR_CORE_RESOURCE
5027 | The quorum resource failed to come online. | ERROR_QUORUM_RESOURCE_ONLINE_FAILED
5028 | The quorum log could not be created or mounted successfully. | ERROR_QUORUMLOG_OPEN_FAILED
5029 | The cluster log is corrupt. | ERROR_CLUSTERLOG_CORRUPT
5030 | The record could not be written to the cluster log since it exceeds the maximum size. | ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE
5031 | The cluster log exceeds its maximum size. | ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE
5032 | No checkpoint record was found in the cluster log. | ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND
5033 | The minimum required disk space needed for logging is not available. | ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE
5034 | The cluster node failed to take control of the quorum resource because the resource is owned by another active node. | ERROR_QUORUM_OWNER_ALIVE
5035 | A cluster network is not available for this operation. | ERROR_NETWORK_NOT_AVAILABLE
5036 | A cluster node is not available for this operation. | ERROR_NODE_NOT_AVAILABLE
5037 | All cluster nodes must be running to perform this operation. | ERROR_ALL_NODES_NOT_AVAILABLE
5038 | A cluster resource failed. | ERROR_RESOURCE_FAILED
5039 | The cluster node is not valid. | ERROR_CLUSTER_INVALID_NODE
5040 | The cluster node already exists. | ERROR_CLUSTER_NODE_EXISTS
5041 | A node is in the process of joining the cluster. | ERROR_CLUSTER_JOIN_IN_PROGRESS
5042 | The cluster node was not found. | ERROR_CLUSTER_NODE_NOT_FOUND
5043 | The cluster local node information was not found. | ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND
5044 | The cluster network already exists. | ERROR_CLUSTER_NETWORK_EXISTS
5045 | The cluster network was not found. | ERROR_CLUSTER_NETWORK_NOT_FOUND
5046 | The cluster network interface already exists. | ERROR_CLUSTER_NETINTERFACE_EXISTS
5047 | The cluster network interface was not found. | ERROR_CLUSTER_NETINTERFACE_NOT_FOUND
5048 | The cluster request is not valid for this object. | ERROR_CLUSTER_INVALID_REQUEST
5049 | The cluster network provider is not valid. | ERROR_CLUSTER_INVALID_NETWORK_PROVIDER
5050 | The cluster node is down. | ERROR_CLUSTER_NODE_DOWN
5051 | The cluster node is not reachable. | ERROR_CLUSTER_NODE_UNREACHABLE
5052 | The cluster node is not a member of the cluster. | ERROR_CLUSTER_NODE_NOT_MEMBER
5053 | A cluster join operation is not in progress. | ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS
5054 | The cluster network is not valid. | ERROR_CLUSTER_INVALID_NETWORK
5056 | The cluster node is up. | ERROR_CLUSTER_NODE_UP
5057 | The cluster IP address is already in use. | ERROR_CLUSTER_IPADDR_IN_USE
5058 | The cluster node is not paused. | ERROR_CLUSTER_NODE_NOT_PAUSED
5059 | No cluster security context is available. | ERROR_CLUSTER_NO_SECURITY_CONTEXT
5060 | The cluster network is not configured for internal cluster communication. | ERROR_CLUSTER_NETWORK_NOT_INTERNAL
5061 | The cluster node is already up. | ERROR_CLUSTER_NODE_ALREADY_UP
5062 | The cluster node is already down. | ERROR_CLUSTER_NODE_ALREADY_DOWN
5063 | The cluster network is already online. | ERROR_CLUSTER_NETWORK_ALREADY_ONLINE
5064 | The cluster network is already offline. | ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE
5065 | The cluster node is already a member of the cluster. | ERROR_CLUSTER_NODE_ALREADY_MEMBER
5066 | The cluster network is the only one configured for internal cluster communication between two or more active cluster nodes. The internal communication capability cannot be removed from the network. | ERROR_CLUSTER_LAST_INTERNAL_NETWORK
5067 | One or more cluster resources depend on the network to provide service to clients. The client access capability cannot be removed from the network. | ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS
5068 | This operation cannot be performed on the cluster resource as it the quorum resource. You may not bring the quorum resource offline or modify its possible owners list. | ERROR_INVALID_OPERATION_ON_QUORUM
5069 | The cluster quorum resource is not allowed to have any dependencies. | ERROR_DEPENDENCY_NOT_ALLOWED
5070 | The cluster node is paused. | ERROR_CLUSTER_NODE_PAUSED
5071 | The cluster resource cannot be brought online. The owner node cannot run this resource. | ERROR_NODE_CANT_HOST_RESOURCE
5072 | The cluster node is not ready to perform the requested operation. | ERROR_CLUSTER_NODE_NOT_READY
5073 | The cluster node is shutting down. | ERROR_CLUSTER_NODE_SHUTTING_DOWN
5074 | The cluster join operation was aborted. | ERROR_CLUSTER_JOIN_ABORTED
5075 | The cluster join operation failed due to incompatible software versions between the joining node and its sponsor. | ERROR_CLUSTER_INCOMPATIBLE_VERSIONS
5076 | This resource cannot be created because the cluster has reached the limit on the number of resources it can monitor. | ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED
5077 | The system configuration changed during the cluster join or form operation. The join or form operation was aborted. | ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED
5078 | The specified resource type was not found. | ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND
5079 | The specified node does not support a resource of this type. This may be due to version inconsistencies or due to the absence of the resource DLL on this node. | ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED
5080 | The specified resource name is supported by this resource DLL. This may be due to a bad (or changed) name supplied to the resource DLL. | ERROR_CLUSTER_RESNAME_NOT_FOUND
5081 | No authentication package could be registered with the RPC server. | ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED
5082 | You cannot bring the group online because the owner of the group is not in the preferred list for the group. To change the owner node for the group, move the group. | ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST
5083 | The join operation failed because the cluster database sequence number has changed or is incompatible with the locker node. This may happen during a join operation if the cluster database was changing during the join. | ERROR_CLUSTER_DATABASE_SEQMISMATCH
5084 | The resource monitor will not allow the fail operation to be performed while the resource is in its current state. This may happen if the resource is in a pending state. | ERROR_RESMON_INVALID_STATE
5085 | A non locker code got a request to reserve the lock for making global updates. | ERROR_CLUSTER_GUM_NOT_LOCKER
5086 | The quorum disk could not be located by the cluster service. | ERROR_QUORUM_DISK_NOT_FOUND
5087 | The backup up cluster database is possibly corrupt. | ERROR_DATABASE_BACKUP_CORRUPT
5088 | A DFS root already exists in this cluster node. | ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT
5089 | An attempt to modify a resource property failed because it conflicts with another existing property. | ERROR_RESOURCE_PROPERTY_UNCHANGEABLE
5890 | An operation was attempted that is incompatible with the current membership state of the node. | ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE
5891 | The quorum resource does not contain the quorum log. | ERROR_CLUSTER_QUORUMLOG_NOT_FOUND
5892 | The membership engine requested shutdown of the cluster service on this node. | ERROR_CLUSTER_MEMBERSHIP_HALT
5893 | The join operation failed because the cluster instance ID of the joining node does not match the cluster instance ID of the sponsor node. | ERROR_CLUSTER_INSTANCE_ID_MISMATCH
5894 | A matching network for the specified IP address could not be found. Please also specify a subnet mask and a cluster network. | ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP
5895 | The actual data type of the property did not match the expected data type of the property. | ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH
5896 | The cluster node was evicted from the cluster successfully. The node was not cleaned up because it does not support the evict cleanup functionality. | ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP
6000 | The specified file could not be encrypted. | ERROR_ENCRYPTION_FAILED
6001 | The specified file could not be decrypted. | ERROR_DECRYPTION_FAILED
6002 | The specified file is encrypted and the user does not have the ability to decrypt it. | ERROR_FILE_ENCRYPTED
6003 | There is no valid encryption recovery policy configured for this system. | ERROR_NO_RECOVERY_POLICY
6004 | The required encryption driver is not loaded for this system. | ERROR_NO_EFS
6005 | The file was encrypted with a different encryption driver than is currently loaded. | ERROR_WRONG_EFS
6006 | There are no EFS keys defined for the user. | ERROR_NO_USER_KEYS
6007 | The specified file is not encrypted. | ERROR_FILE_NOT_ENCRYPTED
6008 | The specified file is not in the defined EFS export format. | ERROR_NOT_EXPORT_FORMAT
6009 | The specified file is read only. | ERROR_FILE_READ_ONLY
6010 | The directory has been disabled for encryption. | ERROR_DIR_EFS_DISALLOWED
6011 | The server is not trusted for remote encryption operation. | ERROR_EFS_SERVER_NOT_TRUSTED
6012 | Recovery policy configured for this system contains invalid recovery certificate. | ERROR_BAD_RECOVERY_POLICY
6013 | The encryption algorithm used on the source file needs a bigger key buffer than the one on the destination file. | ERROR_EFS_ALG_BLOB_TOO_BIG
6014 | The disk partition does not support file encryption. | ERROR_VOLUME_NOT_SUPPORT_EFS
6118 | The list of servers for this workgroup is not currently available. | ERROR_NO_BROWSER_SERVERS_FOUND
6200 | The Task Scheduler service must be configured to run in the System account to function properly. Individual tasks may be configured to run in other accounts. | SCHED_E_SERVICE_NOT_LOCALSYSTEM
7001 | The specified session name is invalid. | ERROR_CTX_WINSTATION_NAME_INVALID
7002 | The specified protocol driver is invalid. | ERROR_CTX_INVALID_PD
7003 | The specified protocol driver was not found in the system path. | ERROR_CTX_PD_NOT_FOUND
7004 | The specified terminal connection driver was not found in the system path. | ERROR_CTX_WD_NOT_FOUND
7005 | A registry key for event logging could not be created for this session. | ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY
7006 | A service with the same name already exists on the system. | ERROR_CTX_SERVICE_NAME_COLLISION
7007 | A close operation is pending on the session. | ERROR_CTX_CLOSE_PENDING
7008 | There are no free output buffers available. | ERROR_CTX_NO_OUTBUF
7009 | The MODEM.INF file was not found. | ERROR_CTX_MODEM_INF_NOT_FOUND
7010 | The modem name was not found in MODEM.INF. | ERROR_CTX_INVALID_MODEMNAME
7011 | The modem did not accept the command sent to it. Verify that the configured modem name matches the attached modem. | ERROR_CTX_MODEM_RESPONSE_ERROR
7012 | The modem did not respond to the command sent to it. Verify that the modem is properly cabled and powered on. | ERROR_CTX_MODEM_RESPONSE_TIMEOUT
7013 | Carrier detect has failed or carrier has been dropped due to disconnect. | ERROR_CTX_MODEM_RESPONSE_NO_CARRIER
7014 | Dial tone not detected within the required time. Verify that the phone cable is properly attached and functional. | ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE
7015 | Busy signal detected at remote site on callback. | ERROR_CTX_MODEM_RESPONSE_BUSY
7016 | Voice detected at remote site on callback. | ERROR_CTX_MODEM_RESPONSE_VOICE
7017 | Transport driver error | ERROR_CTX_TD_ERROR
7022 | The specified session cannot be found. | ERROR_CTX_WINSTATION_NOT_FOUND
7023 | The specified session name is already in use. | ERROR_CTX_WINSTATION_ALREADY_EXISTS
7024 | The requested operation cannot be completed because the terminal connection is currently busy processing a connect, disconnect, reset, or delete operation. | ERROR_CTX_WINSTATION_BUSY
7025 | An attempt has been made to connect to a session whose video mode is not supported by the current client. | ERROR_CTX_BAD_VIDEO_MODE
7035 | The application attempted to enable DOS graphics mode. DOS graphics mode is not supported. | ERROR_CTX_GRAPHICS_INVALID
7037 | Your interactive logon privilege has been disabled. Please contact your administrator. | ERROR_CTX_LOGON_DISABLED
7038 | The requested operation can be performed only on the system console. This is most often the result of a driver or system DLL requiring direct console access. | ERROR_CTX_NOT_CONSOLE
7040 | The client failed to respond to the server connect message. | ERROR_CTX_CLIENT_QUERY_TIMEOUT
7041 | Disconnecting the console session is not supported. | ERROR_CTX_CONSOLE_DISCONNECT
7042 | Reconnecting a disconnected session to the console is not supported. | ERROR_CTX_CONSOLE_CONNECT
7044 | The request to control another session remotely was denied. | ERROR_CTX_SHADOW_DENIED
7045 | The requested session access is denied. | ERROR_CTX_WINSTATION_ACCESS_DENIED
7049 | The specified terminal connection driver is invalid. | ERROR_CTX_INVALID_WD
7050 | The requested session cannot be controlled remotely. This may be because the session is disconnected or does not currently have a user logged on. | ERROR_CTX_SHADOW_INVALID
7051 | The requested session is not configured to allow remote control. | ERROR_CTX_SHADOW_DISABLED
7052 | Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number is currently being used by another user. Please call your system administrator to obtain a unique license number. | ERROR_CTX_CLIENT_LICENSE_IN_USE
7053 | Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number has not been entered for this copy of the Terminal Server client. Please contact your system administrator. | ERROR_CTX_CLIENT_LICENSE_NOT_SET
7054 | The system has reached its licensed logon limit. Please try again later. | ERROR_CTX_LICENSE_NOT_AVAILABLE
7055 | The client you are using is not licensed to use this system. Your logon request is denied. | ERROR_CTX_LICENSE_CLIENT_INVALID
7056 | The system license has expired. Your logon request is denied. | ERROR_CTX_LICENSE_EXPIRED
7057 | Remote control could not be terminated because the specified session is not currently being remotely controlled. | ERROR_CTX_SHADOW_NOT_RUNNING
8001 | The file replication service API was called incorrectly. | FRS_ERR_INVALID_API_SEQUENCE
8002 | The file replication service cannot be started. | FRS_ERR_STARTING_SERVICE
8003 | The file replication service cannot be stopped. | FRS_ERR_STOPPING_SERVICE
8004 | The file replication service API terminated the request. The event log may have more information. | FRS_ERR_INTERNAL_API
8005 | The file replication service terminated the request. The event log may have more information. | FRS_ERR_INTERNAL
8006 | The file replication service cannot be contacted. The event log may have more information. | FRS_ERR_SERVICE_COMM
8007 | The file replication service cannot satisfy the request because the user has insufficient privileges. The event log may have more information. | FRS_ERR_INSUFFICIENT_PRIV
8008 | The file replication service cannot satisfy the request because authenticated RPC is not available. The event log may have more information. | FRS_ERR_AUTHENTICATION
8009 | The file replication service cannot satisfy the request because the user has insufficient privileges on the domain controller. The event log may have more information. | FRS_ERR_PARENT_INSUFFICIENT_PRIV
8010 | The file replication service cannot satisfy the request because authenticated RPC is not available on the domain controller. The event log may have more information. | FRS_ERR_PARENT_AUTHENTICATION
8011 | The file replication service cannot communicate with the file replication service on the domain controller. The event log may have more information. | FRS_ERR_CHILD_TO_PARENT_COMM
8012 | The file replication service on the domain controller cannot communicate with the file replication service on this computer. The event log may have more information. | FRS_ERR_PARENT_TO_CHILD_COMM
8013 | The file replication service cannot populate the system volume because of an internal error. The event log may have more information. | FRS_ERR_SYSVOL_POPULATE
8014 | The file replication service cannot populate the system volume because of an internal timeout. The event log may have more information. | FRS_ERR_SYSVOL_POPULATE_TIMEOUT
8015 | The file replication service cannot process the request. The system volume is busy with a previous request. | FRS_ERR_SYSVOL_IS_BUSY
8016 | The file replication service cannot stop replicating the system volume because of an internal error. The event log may have more information. | FRS_ERR_SYSVOL_DEMOTE
8017 | The file replication service detected an invalid parameter. | FRS_ERR_INVALID_SERVICE_PARAMETER
8200 | An error occurred while installing the directory service. For more information, see the event log. | ERROR_DS_NOT_INSTALLED
8201 | The directory service evaluated group memberships locally. | ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY
8202 | The specified directory service attribute or value does not exist. | ERROR_DS_NO_ATTRIBUTE_OR_VALUE
8203 | The attribute syntax specified to the directory service is invalid. | ERROR_DS_INVALID_ATTRIBUTE_SYNTAX
8204 | The attribute type specified to the directory service is not defined. | ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED
8205 | The specified directory service attribute or value already exists. | ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS
8206 | The directory service is busy. | ERROR_DS_BUSY
8207 | The directory service is unavailable. | ERROR_DS_UNAVAILABLE
8208 | The directory service was unable to allocate a relative identifier. | ERROR_DS_NO_RIDS_ALLOCATED
8209 | The directory service has exhausted the pool of relative identifiers. | ERROR_DS_NO_MORE_RIDS
8210 | The requested operation could not be performed because the directory service is not the master for that type of operation. | ERROR_DS_INCORRECT_ROLE_OWNER
8211 | The directory service was unable to initialize the subsystem that allocates relative identifiers. | ERROR_DS_RIDMGR_INIT_ERROR
8212 | The requested operation did not satisfy one or more constraints associated with the class of the object. | ERROR_DS_OBJ_CLASS_VIOLATION
8213 | The directory service can perform the requested operation only on a leaf object. | ERROR_DS_CANT_ON_NON_LEAF
8214 | The directory service cannot perform the requested operation on the RDN attribute of an object. | ERROR_DS_CANT_ON_RDN
8215 | The directory service detected an attempt to modify the object class of an object. | ERROR_DS_CANT_MOD_OBJ_CLASS
8216 | The requested cross-domain move operation could not be performed. | ERROR_DS_CROSS_DOM_MOVE_ERROR
8217 | Unable to contact the global catalog server. | ERROR_DS_GC_NOT_AVAILABLE
8218 | The policy object is shared and can only be modified at the root. | ERROR_SHARED_POLICY
8219 | The policy object does not exist. | ERROR_POLICY_OBJECT_NOT_FOUND
8220 | The requested policy information is only in the directory service. | ERROR_POLICY_ONLY_IN_DS
8221 | A domain controller promotion is currently active. | ERROR_PROMOTION_ACTIVE
8222 | A domain controller promotion is not currently active | ERROR_NO_PROMOTION_ACTIVE
8224 | An operations error occurred. | ERROR_DS_OPERATIONS_ERROR
8225 | A protocol error occurred. | ERROR_DS_PROTOCOL_ERROR
8226 | The time limit for this request was exceeded. | ERROR_DS_TIMELIMIT_EXCEEDED
8227 | The size limit for this request was exceeded. | ERROR_DS_SIZELIMIT_EXCEEDED
8228 | The administrative limit for this request was exceeded. | ERROR_DS_ADMIN_LIMIT_EXCEEDED
8229 | The compare response was false. | ERROR_DS_COMPARE_FALSE
8230 | The compare response was true. | ERROR_DS_COMPARE_TRUE
8231 | The requested authentication method is not supported by the server. | ERROR_DS_AUTH_METHOD_NOT_SUPPORTED
8232 | A more secure authentication method is required for this server. | ERROR_DS_STRONG_AUTH_REQUIRED
8233 | Inappropriate authentication. | ERROR_DS_INAPPROPRIATE_AUTH
8234 | The authentication mechanism is unknown. | ERROR_DS_AUTH_UNKNOWN
8235 | A referral was returned from the server. | ERROR_DS_REFERRAL
8236 | The server does not support the requested critical extension. | ERROR_DS_UNAVAILABLE_CRIT_EXTENSION
8237 | This request requires a secure connection. | ERROR_DS_CONFIDENTIALITY_REQUIRED
8238 | Inappropriate matching. | ERROR_DS_INAPPROPRIATE_MATCHING
8239 | A constraint violation occurred. | ERROR_DS_CONSTRAINT_VIOLATION
8240 | There is no such object on the server. | ERROR_DS_NO_SUCH_OBJECT
8241 | There is an alias problem. | ERROR_DS_ALIAS_PROBLEM
8242 | An invalid dn syntax has been specified. | ERROR_DS_INVALID_DN_SYNTAX
8243 | The object is a leaf object. | ERROR_DS_IS_LEAF
8244 | There is an alias dereferencing problem. | ERROR_DS_ALIAS_DEREF_PROBLEM
8245 | The server is unwilling to process the request. | ERROR_DS_UNWILLING_TO_PERFORM
8246 | A loop has been detected. | ERROR_DS_LOOP_DETECT
8247 | There is a naming violation. | ERROR_DS_NAMING_VIOLATION
8248 | The result set is too large. | ERROR_DS_OBJECT_RESULTS_TOO_LARGE
8249 | The operation affects multiple DSAs | ERROR_DS_AFFECTS_MULTIPLE_DSAS
8250 | The server is not operational. | ERROR_DS_SERVER_DOWN
8251 | A local error has occurred. | ERROR_DS_LOCAL_ERROR
8252 | An encoding error has occurred. | ERROR_DS_ENCODING_ERROR
8253 | A decoding error has occurred. | ERROR_DS_DECODING_ERROR
8254 | The search filter cannot be recognized. | ERROR_DS_FILTER_UNKNOWN
8255 | One or more parameters are illegal. | ERROR_DS_PARAM_ERROR
8256 | The specified method is not supported. | ERROR_DS_NOT_SUPPORTED
8257 | No results were returned. | ERROR_DS_NO_RESULTS_RETURNED
8258 | The specified control is not supported by the server. | ERROR_DS_CONTROL_NOT_FOUND
8259 | A referral loop was detected by the client. | ERROR_DS_CLIENT_LOOP
8260 | The preset referral limit was exceeded. | ERROR_DS_REFERRAL_LIMIT_EXCEEDED
8261 | The search requires a SORT control. | ERROR_DS_SORT_CONTROL_MISSING
8262 | The search results exceed the offset range specified. | ERROR_DS_OFFSET_RANGE_ERROR
8301 | The root object must be the head of a naming context. The root object cannot have an instantiated parent. | ERROR_DS_ROOT_MUST_BE_NC
8302 | The add replica operation cannot be performed. The naming context must be writable in order to create the replica. | ERROR_DS_ADD_REPLICA_INHIBITED
8303 | A reference to an attribute that is not defined in the schema occurred. | ERROR_DS_ATT_NOT_DEF_IN_SCHEMA
8304 | The maximum size of an object has been exceeded. | ERROR_DS_MAX_OBJ_SIZE_EXCEEDED
8305 | An attempt was made to add an object to the directory with a name that is already in use. | ERROR_DS_OBJ_STRING_NAME_EXISTS
8306 | An attempt was made to add an object of a class that does not have an RDN defined in the schema. | ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA
8307 | An attempt was made to add an object using an RDN that is not the RDN defined in the schema. | ERROR_DS_RDN_DOESNT_MATCH_SCHEMA
8308 | None of the requested attributes were found on the objects. | ERROR_DS_NO_REQUESTED_ATTS_FOUND
8309 | The user buffer is too small. | ERROR_DS_USER_BUFFER_TO_SMALL
8310 | The attribute specified in the operation is not present on the object. | ERROR_DS_ATT_IS_NOT_ON_OBJ
8311 | Illegal modify operation. Some aspect of the modification is not permitted. | ERROR_DS_ILLEGAL_MOD_OPERATION
8312 | The specified object is too large. | ERROR_DS_OBJ_TOO_LARGE
8313 | The specified instance type is not valid. | ERROR_DS_BAD_INSTANCE_TYPE
8314 | The operation must be performed at a master DSA. | ERROR_DS_MASTERDSA_REQUIRED
8315 | The object class attribute must be specified. | ERROR_DS_OBJECT_CLASS_REQUIRED
8316 | A required attribute is missing. | ERROR_DS_MISSING_REQUIRED_ATT
8317 | An attempt was made to modify an object to include an attribute that is not legal for its class | ERROR_DS_ATT_NOT_DEF_FOR_CLASS
8318 | The specified attribute is already present on the object. | ERROR_DS_ATT_ALREADY_EXISTS
8320 | The specified attribute is not present, or has no values. | ERROR_DS_CANT_ADD_ATT_VALUES
8321 | Multiple values were specified for an attribute that can have only one value. | ERROR_DS_SINGLE_VALUE_CONSTRAINT
8322 | A value for the attribute was not in the acceptable range of values. | ERROR_DS_RANGE_CONSTRAINT
8323 | The specified value already exists. | ERROR_DS_ATT_VAL_ALREADY_EXISTS
8324 | The attribute cannot be removed because it is not present on the object. | ERROR_DS_CANT_REM_MISSING_ATT
8325 | The attribute value cannot be removed because it is not present on the object. | ERROR_DS_CANT_REM_MISSING_ATT_VAL
8326 | The specified root object cannot be a subref. | ERROR_DS_ROOT_CANT_BE_SUBREF
8327 | Chaining is not permitted. | ERROR_DS_NO_CHAINING
8328 | Chained evaluation is not permitted. | ERROR_DS_NO_CHAINED_EVAL
8329 | The operation could not be performed because the object's parent is either uninstantiated or deleted. | ERROR_DS_NO_PARENT_OBJECT
8330 | Having a parent that is an alias is not permitted. Aliases are leaf objects. | ERROR_DS_PARENT_IS_AN_ALIAS
8331 | The object and parent must be of the same type, either both masters or both replicas. | ERROR_DS_CANT_MIX_MASTER_AND_REPS
8332 | The operation cannot be performed because child objects exist. This operation can only be performed on a leaf object. | ERROR_DS_CHILDREN_EXIST
8333 | Directory object not found. | ERROR_DS_OBJ_NOT_FOUND
8334 | The aliased object is missing. | ERROR_DS_ALIASED_OBJ_MISSING
8335 | The object name has bad syntax. | ERROR_DS_BAD_NAME_SYNTAX
8336 | It is not permitted for an alias to refer to another alias. | ERROR_DS_ALIAS_POINTS_TO_ALIAS
8337 | The alias cannot be dereferenced. | ERROR_DS_CANT_DEREF_ALIAS
8338 | The operation is out of scope. | ERROR_DS_OUT_OF_SCOPE
8339 | The operation cannot continue because the object is in the process of being removed. | ERROR_DS_OBJECT_BEING_REMOVED
8340 | The DSA object cannot be deleted. | ERROR_DS_CANT_DELETE_DSA_OBJ
8341 | A directory service error has occurred. | ERROR_DS_GENERIC_ERROR
8342 | The operation can only be performed on an internal master DSA object. | ERROR_DS_DSA_MUST_BE_INT_MASTER
8343 | The object must be of class DSA. | ERROR_DS_CLASS_NOT_DSA
8344 | Insufficient access rights to perform the operation. | ERROR_DS_INSUFF_ACCESS_RIGHTS
8345 | The object cannot be added because the parent is not on the list of possible superiors. | ERROR_DS_ILLEGAL_SUPERIOR
8346 | Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM). | ERROR_DS_ATTRIBUTE_OWNED_BY_SAM
8347 | The name has too many parts. | ERROR_DS_NAME_TOO_MANY_PARTS
8348 | The name is too long. | ERROR_DS_NAME_TOO_LONG
8349 | The name value is too long. | ERROR_DS_NAME_VALUE_TOO_LONG
8350 | The directory service encountered an error parsing a name. | ERROR_DS_NAME_UNPARSEABLE
8351 | The directory service cannot get the attribute type for a name. | ERROR_DS_NAME_TYPE_UNKNOWN
8352 | The name does not identify an object; the name identifies a phantom. | ERROR_DS_NOT_AN_OBJECT
8353 | The security descriptor is too short. | ERROR_DS_SEC_DESC_TOO_SHORT
8354 | The security descriptor is invalid. | ERROR_DS_SEC_DESC_INVALID
8355 | Failed to create name for deleted object. | ERROR_DS_NO_DELETED_NAME
8356 | The parent of a new subref must exist. | ERROR_DS_SUBREF_MUST_HAVE_PARENT
8357 | The object must be a naming context. | ERROR_DS_NCNAME_MUST_BE_NC
8358 | It is not permitted to add an attribute which is owned by the system. | ERROR_DS_CANT_ADD_SYSTEM_ONLY
8359 | The class of the object must be structural; you cannot instantiate an abstract class. | ERROR_DS_CLASS_MUST_BE_CONCRETE
8360 | The schema object could not be found. | ERROR_DS_INVALID_DMD
8361 | A local object with this GUID (dead or alive) already exists. | ERROR_DS_OBJ_GUID_EXISTS
8362 | The operation cannot be performed on a back link. | ERROR_DS_NOT_ON_BACKLINK
8363 | The cross reference for the specified naming context could not be found. | ERROR_DS_NO_CROSSREF_FOR_NC
8364 | The operation could not be performed because the directory service is shutting down. | ERROR_DS_SHUTTING_DOWN
8365 | The directory service request is invalid. | ERROR_DS_UNKNOWN_OPERATION
8366 | The role owner attribute could not be read. | ERROR_DS_INVALID_ROLE_OWNER
8367 | The requested FSMO operation failed. The current FSMO holder could not be reached. | ERROR_DS_COULDNT_CONTACT_FSMO
8368 | Modification of a DN across a naming context is not permitted. | ERROR_DS_CROSS_NC_DN_RENAME
8369 | The attribute cannot be modified because it is owned by the system. | ERROR_DS_CANT_MOD_SYSTEM_ONLY
8370 | Only the replicator can perform this function. | ERROR_DS_REPLICATOR_ONLY
8371 | The specified class is not defined. | ERROR_DS_OBJ_CLASS_NOT_DEFINED
8372 | The specified class is not a subclass. | ERROR_DS_OBJ_CLASS_NOT_SUBCLASS
8373 | The name reference is invalid. | ERROR_DS_NAME_REFERENCE_INVALID
8374 | A cross reference already exists. | ERROR_DS_CROSS_REF_EXISTS
8375 | It is not permitted to delete a master cross reference. | ERROR_DS_CANT_DEL_MASTER_CROSSREF
8376 | Subtree notifications are only supported on NC heads. | ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD
8377 | Notification filter is too complex. | ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX
8378 | Schema update failed: duplicate RDN. | ERROR_DS_DUP_RDN
8379 | Schema update failed: duplicate OID | ERROR_DS_DUP_OID
8380 | Schema update failed: duplicate MAPI identifier. | ERROR_DS_DUP_MAPI_ID
8381 | Schema update failed: duplicate schema-id GUID. | ERROR_DS_DUP_SCHEMA_ID_GUID
8382 | Schema update failed: duplicate LDAP display name. | ERROR_DS_DUP_LDAP_DISPLAY_NAME
8383 | Schema update failed: range-lower less than range upper | ERROR_DS_SEMANTIC_ATT_TEST
8384 | Schema update failed: syntax mismatch | ERROR_DS_SYNTAX_MISMATCH
8385 | Schema deletion failed: attribute is used in must-contain | ERROR_DS_EXISTS_IN_MUST_HAVE
8386 | Schema deletion failed: attribute is used in may-contain | ERROR_DS_EXISTS_IN_MAY_HAVE
8387 | Schema update failed: attribute in may-contain does not exist | ERROR_DS_NONEXISTENT_MAY_HAVE
8388 | Schema update failed: attribute in must-contain does not exist | ERROR_DS_NONEXISTENT_MUST_HAVE
8389 | Schema update failed: class in aux-class list does not exist or is not an auxiliary class | ERROR_DS_AUX_CLS_TEST_FAIL
8390 | Schema update failed: class in poss-superiors does not exist | ERROR_DS_NONEXISTENT_POSS_SUP
8391 | Schema update failed: class in subclassof list does not exist or does not satisfy hierarchy rules | ERROR_DS_SUB_CLS_TEST_FAIL
8392 | Schema update failed: Rdn-Att-Id has wrong syntax | ERROR_DS_BAD_RDN_ATT_ID_SYNTAX
8393 | Schema deletion failed: class is used as auxiliary class | ERROR_DS_EXISTS_IN_AUX_CLS
8394 | Schema deletion failed: class is used as sub class | ERROR_DS_EXISTS_IN_SUB_CLS
8395 | Schema deletion failed: class is used as poss superior | ERROR_DS_EXISTS_IN_POSS_SUP
8396 | Schema update failed in recalculating validation cache. | ERROR_DS_RECALCSCHEMA_FAILED
8397 | The tree deletion is not finished. | ERROR_DS_TREE_DELETE_NOT_FINISHED
8398 | The requested delete operation could not be performed. | ERROR_DS_CANT_DELETE
8399 | Cannot read the governs class identifier for the schema record. | ERROR_DS_ATT_SCHEMA_REQ_ID
8400 | The attribute schema has bad syntax. | ERROR_DS_BAD_ATT_SCHEMA_SYNTAX
8401 | The attribute could not be cached. | ERROR_DS_CANT_CACHE_ATT
8402 | The class could not be cached. | ERROR_DS_CANT_CACHE_CLASS
8403 | The attribute could not be removed from the cache. | ERROR_DS_CANT_REMOVE_ATT_CACHE
8404 | The class could not be removed from the cache. | ERROR_DS_CANT_REMOVE_CLASS_CACHE
8405 | The distinguished name attribute could not be read. | ERROR_DS_CANT_RETRIEVE_DN
8406 | A required subref is missing. | ERROR_DS_MISSING_SUPREF
8407 | The instance type attribute could not be retrieved. | ERROR_DS_CANT_RETRIEVE_INSTANCE
8408 | An internal error has occurred. | ERROR_DS_CODE_INCONSISTENCY
8409 | A database error has occurred. | ERROR_DS_DATABASE_ERROR
8410 | The attribute GOVERNSID is missing. | ERROR_DS_GOVERNSID_MISSING
8411 | An expected attribute is missing. | ERROR_DS_MISSING_EXPECTED_ATT
8412 | The specified naming context is missing a cross reference. | ERROR_DS_NCNAME_MISSING_CR_REF
8413 | A security checking error has occurred. | ERROR_DS_SECURITY_CHECKING_ERROR
8414 | The schema is not loaded. | ERROR_DS_SCHEMA_NOT_LOADED
8415 | Schema allocation failed. Please check if the machine is running low on memory. | ERROR_DS_SCHEMA_ALLOC_FAILED
8416 | Failed to obtain the required syntax for the attribute schema. | ERROR_DS_ATT_SCHEMA_REQ_SYNTAX
8417 | The global catalog verification failed. The global catalog is not available or does not support the operation. Some part of the directory is currently not available. | ERROR_DS_GCVERIFY_ERROR
8418 | The replication operation failed because of a schema mismatch between the servers involved. | ERROR_DS_DRA_SCHEMA_MISMATCH
8419 | The DSA object could not be found. | ERROR_DS_CANT_FIND_DSA_OBJ
8420 | The naming context could not be found. | ERROR_DS_CANT_FIND_EXPECTED_NC
8421 | The naming context could not be found in the cache. | ERROR_DS_CANT_FIND_NC_IN_CACHE
8422 | The child object could not be retrieved. | ERROR_DS_CANT_RETRIEVE_CHILD
8423 | The modification was not permitted for security reasons. | ERROR_DS_SECURITY_ILLEGAL_MODIFY
8424 | The operation cannot replace the hidden record. | ERROR_DS_CANT_REPLACE_HIDDEN_REC
8425 | The hierarchy file is invalid. | ERROR_DS_BAD_HIERARCHY_FILE
8426 | The attempt to build the hierarchy table failed. | ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED
8427 | The directory configuration parameter is missing from the registry. | ERROR_DS_CONFIG_PARAM_MISSING
8428 | The attempt to count the address book indices failed. | ERROR_DS_COUNTING_AB_INDICES_FAILED
8429 | The allocation of the hierarchy table failed. | ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED
8430 | The directory service encountered an internal failure. | ERROR_DS_INTERNAL_FAILURE
8431 | The directory service encountered an unknown failure. | ERROR_DS_UNKNOWN_ERROR
8432 | A root object requires a class of 'top'. | ERROR_DS_ROOT_REQUIRES_CLASS_TOP
8433 | This directory server is shutting down, and cannot take ownership of new floating single-master operation roles. | ERROR_DS_REFUSING_FSMO_ROLES
8434 | The directory service is missing mandatory configuration information, and is unable to determine the ownership of floating single-master operation roles. | ERROR_DS_MISSING_FSMO_SETTINGS
8435 | The directory service was unable to transfer ownership of one or more floating single-master operation roles to other servers. | ERROR_DS_UNABLE_TO_SURRENDER_ROLES
8436 | The replication operation failed. | ERROR_DS_DRA_GENERIC
8437 | An invalid parameter was specified for this replication operation. | ERROR_DS_DRA_INVALID_PARAMETER
8438 | The directory service is too busy to complete the replication operation at this time. | ERROR_DS_DRA_BUSY
8439 | The distinguished name specified for this replication operation is invalid. | ERROR_DS_DRA_BAD_DN
8440 | The naming context specified for this replication operation is invalid. | ERROR_DS_DRA_BAD_NC
8441 | The distinguished name specified for this replication operation already exists. | ERROR_DS_DRA_DN_EXISTS
8442 | The replication system encountered an internal error. | ERROR_DS_DRA_INTERNAL_ERROR
8443 | The replication operation encountered a database inconsistency. | ERROR_DS_DRA_INCONSISTENT_DIT
8444 | The server specified for this replication operation could not be contacted. | ERROR_DS_DRA_CONNECTION_FAILED
8445 | The replication operation encountered an object with an invalid instance type. | ERROR_DS_DRA_BAD_INSTANCE_TYPE
8446 | The replication operation failed to allocate memory. | ERROR_DS_DRA_OUT_OF_MEM
8447 | The replication operation encountered an error with the mail system. | ERROR_DS_DRA_MAIL_PROBLEM
8448 | The replication reference information for the target server already exists. | ERROR_DS_DRA_REF_ALREADY_EXISTS
8449 | The replication reference information for the target server does not exist. | ERROR_DS_DRA_REF_NOT_FOUND
8450 | The naming context cannot be removed because it is replicated to another server. | ERROR_DS_DRA_OBJ_IS_REP_SOURCE
8451 | The replication operation encountered a database error. | ERROR_DS_DRA_DB_ERROR
8452 | The naming context is in the process of being removed or is not replicated from the specified server. | ERROR_DS_DRA_NO_REPLICA
8453 | Replication access was denied. | ERROR_DS_DRA_ACCESS_DENIED
8454 | The requested operation is not supported by this version of the directory service. | ERROR_DS_DRA_NOT_SUPPORTED
8455 | The replication remote procedure call was cancelled. | ERROR_DS_DRA_RPC_CANCELLED
8456 | The source server is currently rejecting replication requests. | ERROR_DS_DRA_SOURCE_DISABLED
8457 | The destination server is currently rejecting replication requests. | ERROR_DS_DRA_SINK_DISABLED
8458 | The replication operation failed due to a collision of object names. | ERROR_DS_DRA_NAME_COLLISION
8459 | The replication source has been reinstalled. | ERROR_DS_DRA_SOURCE_REINSTALLED
8460 | The replication operation failed because a required parent object is missing. | ERROR_DS_DRA_MISSING_PARENT
8461 | The replication operation was preempted. | ERROR_DS_DRA_PREEMPTED
8462 | The replication synchronization attempt was abandoned because of a lack of updates. | ERROR_DS_DRA_ABANDON_SYNC
8463 | The replication operation was terminated because the system is shutting down. | ERROR_DS_DRA_SHUTDOWN
8464 | The replication synchronization attempt failed as the destination partial attribute set is not a subset of source partial attribute set. | ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET
8465 | The replication synchronization attempt failed because a master replica attempted to sync from a partial replica. | ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA
8466 | The server specified for this replication operation was contacted, but that server was unable to contact an additional server needed to complete the operation. | ERROR_DS_DRA_EXTN_CONNECTION_FAILED
8467 | The version of the Active Directory schema of the source forest is not compatible with the version of Active Directory on this computer. You must upgrade the operating system on a domain controller in the source forest before this computer can be added as a domain controller to that forest. | ERROR_DS_INSTALL_SCHEMA_MISMATCH
8468 | Schema update failed: An attribute with the same link identifier already exists. | ERROR_DS_DUP_LINK_ID
8469 | Name translation: Generic processing error. | ERROR_DS_NAME_ERROR_RESOLVING
8470 | Name translation: Could not find the name or insufficient right to see name. | ERROR_DS_NAME_ERROR_NOT_FOUND
8471 | Name translation: Input name mapped to more than one output name. | ERROR_DS_NAME_ERROR_NOT_UNIQUE
8472 | Name translation: Input name found, but not the associated output format. | ERROR_DS_NAME_ERROR_NO_MAPPING
8473 | Name translation: Unable to resolve completely, only the domain was found. | ERROR_DS_NAME_ERROR_DOMAIN_ONLY
8474 | Name translation: Unable to perform purely syntactical mapping at the client without going out to the wire. | ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING
8475 | Modification of a constructed att is not allowed. | ERROR_DS_CONSTRUCTED_ATT_MOD
8476 | The OM-Object-Class specified is incorrect for an attribute with the specified syntax. | ERROR_DS_WRONG_OM_OBJ_CLASS
8477 | The replication request has been posted; waiting for reply. | ERROR_DS_DRA_REPL_PENDING
8478 | The requested operation requires a directory service, and none was available. | ERROR_DS_DS_REQUIRED
8479 | The LDAP display name of the class or attribute contains non-ASCII characters. | ERROR_DS_INVALID_LDAP_DISPLAY_NAME
8480 | The requested search operation is only supported for base searches. | ERROR_DS_NON_BASE_SEARCH
8481 | The search failed to retrieve attributes from the database. | ERROR_DS_CANT_RETRIEVE_ATTS
8482 | The schema update operation tried to add a backward link attribute that has no corresponding forward link. | ERROR_DS_BACKLINK_WITHOUT_LINK
8483 | Source and destination of a cross domain move do not agree on the object's epoch number. Either source or destination does not have the latest version of the object. | ERROR_DS_EPOCH_MISMATCH
8484 | Source and destination of a cross domain move do not agree on the object's current name. Either source or destination does not have the latest version of the object. | ERROR_DS_SRC_NAME_MISMATCH
8485 | Source and destination of a cross domain move operation are identical. Caller should use local move operation instead of cross domain move operation. | ERROR_DS_SRC_AND_DST_NC_IDENTICAL
8486 | Source and destination for a cross domain move are not in agreement on the naming contexts in the forest. Either source or destination does not have the latest version of the Partitions container. | ERROR_DS_DST_NC_MISMATCH
8487 | Destination of a cross domain move is not authoritative for the destination naming context. | ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC
8488 | Source and destination of a cross domain move do not agree on the identity of the source object. Either source or destination does not have the latest version of the source object. | ERROR_DS_SRC_GUID_MISMATCH
8489 | Object being moved across domains is already known to be deleted by the destination server. The source server does not have the latest version of the source object. | ERROR_DS_CANT_MOVE_DELETED_OBJECT
8490 | Another operation which requires exclusive access to the PDC PSMO is already in progress. | ERROR_DS_PDC_OPERATION_IN_PROGRESS
8491 | A cross domain move operation failed such that the two versions of the moved object exist - one each in the source and destination domains. The destination object needs to be removed to restore the system to a consistent state. | ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD
8492 | This object may not be moved across domain boundaries either because cross domain moves for this class are disallowed, or the object has some special characteristics, eg: trust account or restricted RID, which prevent its move. | ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION
8493 | Can't move objects with memberships across domain boundaries as once moved, this would violate the membership conditions of the account group. Remove the object from any account group memberships and retry. | ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS
8494 | A naming context head must be the immediate child of another naming context head, not of an interior node. | ERROR_DS_NC_MUST_HAVE_NC_PARENT
8495 | The directory cannot validate the proposed naming context name because it does not hold a replica of the naming context above the proposed naming context. Please ensure that the domain naming master role is held by a server that is configured as a global catalog server, and that the server is up to date with its replication partners. (Applies only to Windows 2000 Domain Naming masters) | ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE
8496 | Destination domain must be in native mode. | ERROR_DS_DST_DOMAIN_NOT_NATIVE
8497 | The operation can not be performed because the server does not have an infrastructure container in the domain of interest. | ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER
8498 | Cross-domain move of non-empty account groups is not allowed. | ERROR_DS_CANT_MOVE_ACCOUNT_GROUP
8499 | Cross-domain move of non-empty resource groups is not allowed. | ERROR_DS_CANT_MOVE_RESOURCE_GROUP
8500 | The search flags for the attribute are invalid. The ANR bit is valid only on attributes of Unicode or Teletex strings. | ERROR_DS_INVALID_SEARCH_FLAG
8501 | Tree deletions starting at an object which has an NC head as a descendant are not allowed. | ERROR_DS_NO_TREE_DELETE_ABOVE_NC
8502 | The directory service failed to lock a tree in preparation for a tree deletion because the tree was in use. | ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE
8503 | The directory service failed to identify the list of objects to delete while attempting a tree deletion. | ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE
8504 | Security Accounts Manager initialization failed because of the following error: %1. Error Status: 0x%2. Click OK to shut down the system and reboot into Directory Services Restore Mode. Check the event log for detailed information. | ERROR_DS_SAM_INIT_FAILURE
8505 | Only an administrator can modify the membership list of an administrative group. | ERROR_DS_SENSITIVE_GROUP_VIOLATION
8506 | Cannot change the primary group ID of a domain controller account. | ERROR_DS_CANT_MOD_PRIMARYGROUPID
8507 | An attempt is made to modify the base schema. | ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD
8508 | Adding a new mandatory attribute to an existing class, deleting a mandatory attribute from an existing class, or adding an optional attribute to the special class Top that is not a backlink attribute (directly or through inheritance, for example, by adding or deleting an auxiliary class) is not allowed. | ERROR_DS_NONSAFE_SCHEMA_CHANGE
8509 | Schema update is not allowed on this DC because the DC is not the schema FSMO Role Owner. | ERROR_DS_SCHEMA_UPDATE_DISALLOWED
8510 | An object of this class cannot be created under the schema container. You can only create attribute-schema and class-schema objects under the schema container. | ERROR_DS_CANT_CREATE_UNDER_SCHEMA
8511 | The replica/child install failed to get the objectVersion attribute on the schema container on the source DC. Either the attribute is missing on the schema container or the credentials supplied do not have permission to read it. | ERROR_DS_INSTALL_NO_SRC_SCH_VERSION
8512 | The replica/child install failed to read the objectVersion attribute in the SCHEMA section of the file schema.ini in the system32 directory. | ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE
8513 | The specified group type is invalid. | ERROR_DS_INVALID_GROUP_TYPE
8514 | Cannot nest global groups in a mixed domain if the group is security-enabled. | ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
8515 | Cannot nest local groups in a mixed domain if the group is security-enabled. | ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
8516 | A global group cannot have a local group as a member. | ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
8517 | A global group cannot have a universal group as a member. | ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
8518 | A universal group cannot have a local group as a member. | ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
8519 | A global group cannot have a cross-domain member. | ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
8520 | A local group cannot have another cross-domain local group as a member. | ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
8521 | A group with primary members cannot change to a security-disabled group. | ERROR_DS_HAVE_PRIMARY_MEMBERS
8522 | The schema cache load failed to convert the string default SD on a class-schema object. | ERROR_DS_STRING_SD_CONVERSION_FAILED
8523 | Only DSAs configured to be Global Catalog servers should be allowed to hold the Domain Naming Master FSMO role. (Applies only to Windows 2000 servers) | ERROR_DS_NAMING_MASTER_GC
8524 | The DSA operation is unable to proceed because of a DNS lookup failure. | ERROR_DS_LOOKUP_FAILURE
8525 | While processing a change to the DNS Host Name for an object, the Service Principal Name values could not be kept in sync. | ERROR_DS_COULDNT_UPDATE_SPNS
8526 | The Security Descriptor attribute could not be read. | ERROR_DS_CANT_RETRIEVE_SD
8527 | The object requested was not found, but an object with that key was found. | ERROR_DS_KEY_NOT_UNIQUE.
8528 | The syntax of the linked attributed being added is incorrect. Forward links can only have syntax 2.5.5.1, 2.5.5.7, and 2.5.5.14, and backlinks can only have syntax 2.5.5.1. | ERROR_DS_WRONG_LINKED_ATT_SYNTAX
8529 | Security Account Manager needs to get the boot password. | ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD
8530 | Security Account Manager needs to get the boot key from floppy disk. | ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY
8531 | Directory Service cannot start. | ERROR_DS_CANT_START
8532 | Directory Services could not start. | ERROR_DS_INIT_FAILURE
8533 | The connection between client and server requires packet privacy or better. | ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION
8534 | The source domain may not be in the same forest as destination. | ERROR_DS_SOURCE_DOMAIN_IN_FOREST
8535 | The destination domain must be in the forest. | ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST
8536 | The operation requires that destination domain auditing be enabled. | ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED
8537 | The operation couldn't locate a DC for the source domain. | ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN
8538 | The source object must be a group or user. | ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER
8539 | The source object's SID already exists in destination forest. | ERROR_DS_SRC_SID_EXISTS_IN_FOREST
8540 | The source and destination object must be of the same type. | ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH
8541 | Security Accounts Manager initialization failed because of the following error: %1. Error Status: 0x%2. Click OK to shut down the system and reboot into Safe Mode. Check the event log for detailed information. | ERROR_SAM_INIT_FAILURE
8542 | Schema information could not be included in the replication request. | ERROR_DS_DRA_SCHEMA_INFO_SHIP
8543 | The replication operation could not be completed due to a schema incompatibility. | ERROR_DS_DRA_SCHEMA_CONFLICT
8544 | The replication operation could not be completed due to a previous schema incompatibility. | ERROR_DS_DRA_EARLIER_SCHEMA_CONLICT
8545 | The replication update could not be applied because either the source or the destination has not yet received information regarding a recent cross-domain move operation. | ERROR_DS_DRA_OBJ_NC_MISMATCH
8546 | The requested domain could not be deleted because there exist domain controllers that still host this domain. | ERROR_DS_NC_STILL_HAS_DSAS
8547 | The requested operation can be performed only on a global catalog server. | ERROR_DS_GC_REQUIRED
8548 | A local group can only be a member of other local groups in the same domain. | ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
8549 | Foreign security principals cannot be members of universal groups. | ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS
8550 | The attribute is not allowed to be replicated to the GC because of security reasons. | ERROR_DS_CANT_ADD_TO_GC
8551 | The checkpoint with the PDC could not be taken because there are too many modifications being processed currently. | ERROR_DS_NO_CHECKPOINT_WITH_PDC
8552 | The operation requires that source domain auditing be enabled. | ERROR_DS_SOURCE_AUDITING_NOT_ENABLED
8553 | Security principal objects can only be created inside domain naming contexts. | ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC
8554 | A Service Principal Name (SPN) could not be constructed because the provided hostname is not in the necessary format. | ERROR_DS_INVALID_NAME_FOR_SPN
8555 | A Filter was passed that uses constructed attributes. | ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS
8556 | The unicodePwd attribute value must be enclosed in double quotes. | ERROR_DS_UNICODEPWD_NOT_IN_QUOTES
8557 | Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased. | ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
8558 | For security reasons, the operation must be run on the destination DC. | ERROR_DS_MUST_BE_RUN_ON_DST_DC
8559 | For security reasons, the source DC must be NT4SP4 or greater. | ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER
8560 | Critical Directory Service System objects cannot be deleted during tree delete operations. The tree delete may have been partially performed. | ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ
8561 | Directory Services could not start because of the following error: %1. Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. | ERROR_DS_INIT_FAILURE_CONSOLE
8562 | Security Accounts Manager initialization failed because of the following error: %1. Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further. | ERROR_DS_SAM_INIT_FAILURE_CONSOLE
8563 | This version of Windows is too old to support the current directory forest behavior. You must upgrade the operating system on this server before it can become a domain controller in this forest. | ERROR_DS_FOREST_VERSION_TOO_HIGH
8564 | This version of Windows is too old to support the current domain behavior. You must upgrade the operating system on this server before it can become a domain controller in this domain. | ERROR_DS_DOMAIN_VERSION_TOO_HIGH
8565 | This version of Windows no longer supports the behavior version in use in this directory forest. You must advance the forest behavior version before this server can become a domain controller in the forest. | ERROR_DS_FOREST_VERSION_TOO_LOW
8566 | This version of Windows no longer supports the behavior version in use in this domain. You must advance the domain behavior version before this server can become a domain controller in the domain. | ERROR_DS_DOMAIN_VERSION_TOO_LOW
8567 | The version of Windows is incompatible with the behavior version of the domain or forest. | ERROR_DS_INCOMPATIBLE_VERSION
8568 | The behavior version cannot be increased to the requested value because Domain Controllers still exist with versions lower than the requested value. | ERROR_DS_LOW_DSA_VERSION
8569 | The behavior version value cannot be increased while the domain is still in mixed domain mode. You must first change the domain to native mode before increasing the behavior version. | ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN
8570 | The sort order requested is not supported. | ERROR_DS_NOT_SUPPORTED_SORT_ORDER
8571 | Found an object with a non unique name. | ERROR_DS_NAME_NOT_UNIQUE
8572 | The machine account was created pre-NT4. The account needs to be recreated. | ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4
8573 | The database is out of version store. | ERROR_DS_OUT_OF_VERSION_STORE
8574 | Unable to continue operation because multiple conflicting controls were used. | ERROR_DS_INCOMPATIBLE_CONTROLS_USED
8575 | Unable to find a valid security descriptor reference domain for this partition. | ERROR_DS_NO_REF_DOMAIN
8576 | Schema update failed: The link identifier is reserved. | ERROR_DS_RESERVED_LINK_ID
8577 | Schema update failed: There are no link identifiers available. | ERROR_DS_LINK_ID_NOT_AVAILABLE
8578 | An account group can not have a universal group as a member. | ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER
8579 | Rename or move operations on naming context heads or read-only objects are not allowed. | ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE
8580 | Move operations on objects in the schema naming context are not allowed. | ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC
8581 | A system flag has been set on the object and does not allow the object to be moved or renamed. | ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG
8582 | This object is not allowed to change its grandparent container. Moves are not forbidden on this object, but are restricted to sibling containers. | ERROR_DS_MODIFYDN_WRONG_GRANDPARENT
8583 | Unable to resolve completely, a referral to another forest is generated. | ERROR_DS_NAME_ERROR_TRUST_REFERRAL
8584 | The requested action is not supported on standard server. | ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER
8585 | Could not access a partition of the Active Directory located on a remote server. Make sure at least one server is running for the partition in question. | ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD
8586 | The directory cannot validate the proposed naming context (or partition) name because it does not hold a replica nor can it contact a replica of the naming context above the proposed naming context. Please ensure that the parent naming context is properly registered in DNS, and at least one replica of this naming context is reachable by the Domain Naming master. | ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE
8587 | The thread limit for this request was exceeded. | ERROR_DS_THREAD_LIMIT_EXCEEDED
8588 | The Global catalog server is not in the closet site. | ERROR_DS_NOT_CLOSEST
9001 | DNS server unable to interpret format. | DNS_ERROR_RCODE_FORMAT_ERROR
9002 | DNS server failure. | DNS_ERROR_RCODE_SERVER_FAILURE
9003 | DNS name does not exist. | DNS_ERROR_RCODE_NAME_ERROR
9004 | DNS request not supported by name server. | DNS_ERROR_RCODE_NOT_IMPLEMENTED
9005 | DNS operation refused. | DNS_ERROR_RCODE_REFUSED
9006 | DNS name that ought not exist, does exist. | DNS_ERROR_RCODE_YXDOMAIN
9007 | DNS RR set that ought not exist, does exist. | DNS_ERROR_RCODE_YXRRSET
9008 | DNS RR set that ought to exist, does not exist. | DNS_ERROR_RCODE_NXRRSET
9009 | DNS server not authoritative for zone. | DNS_ERROR_RCODE_NOTAUTH
9010 | DNS name in update or prereq is not in zone. | DNS_ERROR_RCODE_NOTZONE
9016 | DNS signature failed to verify. | DNS_ERROR_RCODE_BADSIG
9017 | DNS bad key. | DNS_ERROR_RCODE_BADKEY
9018 | DNS signature validity expired. | DNS_ERROR_RCODE_BADTIME
9501 | No records found for given DNS query. | DNS_INFO_NO_RECORDS
9502 | Bad DNS packet. | DNS_ERROR_BAD_PACKET
9503 | No DNS packet. | DNS_ERROR_NO_PACKET
9504 | DNS error, check rcode. | DNS_ERROR_RCODE
9505 | Unsecured DNS packet. | DNS_ERROR_UNSECURE_PACKET
9551 | Invalid DNS type. | DNS_ERROR_INVALID_TYPE
9552 | Invalid IP address. | DNS_ERROR_INVALID_IP_ADDRESS
9553 | Invalid property. | DNS_ERROR_INVALID_PROPERTY
9554 | Try DNS operation again later. | DNS_ERROR_TRY_AGAIN_LATER
9555 | Record for given name and type is not unique. | DNS_ERROR_NOT_UNIQUE
9556 | DNS name does not comply with RFC specifications. | DNS_ERROR_NON_RFC_NAME
9557 | DNS name is a fully-qualified DNS name. | DNS_STATUS_FQDN
9558 | DNS name is dotted (multi-label). | DNS_STATUS_DOTTED_NAME
9559 | DNS name is a single-part name. | DNS_STATUS_SINGLE_PART_NAME
9560 | DSN name contains an invalid character. | DNS_ERROR_INVALID_NAME_CHAR
9561 | DNS name is entirely numeric. | DNS_ERROR_NUMERIC_NAME
9601 | DNS zone does not exist. | DNS_ERROR_ZONE_DOES_NOT_EXIST
9602 | DNS zone information not available. | DNS_ERROR_NO_ZONE_INFO
9603 | Invalid operation for DNS zone. | DNS_ERROR_INVALID_ZONE_OPERATION
9604 | Invalid DNS zone configuration. | DNS_ERROR_ZONE_CONFIGURATION_ERROR
9605 | DNS zone has no start of authority (SOA) record. | DNS_ERROR_ZONE_HAS_NO_SOA_RECORD
9606 | DNS zone has no name server (NS) record. | DNS_ERROR_ZONE_HAS_NO_NS_RECORDS
9607 | DNS zone is locked. | DNS_ERROR_ZONE_LOCKED
9608 | DNS zone creation failed. | DNS_ERROR_ZONE_CREATION_FAILED
9609 | DNS zone already exists. | DNS_ERROR_ZONE_ALREADY_EXISTS
9610 | DNS automatic zone already exists. | DNS_ERROR_AUTOZONE_ALREADY_EXISTS
9611 | Invalid DNS zone type. | DNS_ERROR_INVALID_ZONE_TYPE
9612 | Secondary DNS zone requires master IP address. | DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP
9613 | DNS zone not secondary. | DNS_ERROR_ZONE_NOT_SECONDARY
9614 | Need secondary IP address. | DNS_ERROR_NEED_SECONDARY_ADDRESSES
9615 | WINS initialization failed. | DNS_ERROR_WINS_INIT_FAILED
9616 | Need WINS servers. | DNS_ERROR_NEED_WINS_SERVERS
9617 | NBTSTAT initialization call failed. | DNS_ERROR_NBSTAT_INIT_FAILED
9618 | Invalid delete of start of authority (SOA) | DNS_ERROR_SOA_DELETE_INVALID
9619 | A conditional forwarding zone already exists for that name. | DNS_ERROR_FORWARDER_ALREADY_EXISTS
9651 | Primary DNS zone requires datafile. | DNS_ERROR_PRIMARY_REQUIRES_DATAFILE
9652 | Invalid datafile name for DNS zone. | DNS_ERROR_INVALID_DATAFILE_NAME
9653 | Failed to open datafile for DNS zone. | DNS_ERROR_DATAFILE_OPEN_FAILURE
9654 | Failed to write datafile for DNS zone. | DNS_ERROR_FILE_WRITEBACK_FAILED
9655 | Failure while reading datafile for DNS zone. | DNS_ERROR_DATAFILE_PARSING
9701 | DNS record does not exist. | DNS_ERROR_RECORD_DOES_NOT_EXIST
9702 | DNS record format error. | DNS_ERROR_RECORD_FORMAT
9703 | Node creation failure in DNS. | DNS_ERROR_NODE_CREATION_FAILED
9704 | Unknown DNS record type. | DNS_ERROR_UNKNOWN_RECORD_TYPE
9705 | DNS record timed out. | DNS_ERROR_RECORD_TIMED_OUT
9706 | Name not in DNS zone. | DNS_ERROR_NAME_NOT_IN_ZONE
9707 | CNAME loop detected. | DNS_ERROR_CNAME_LOOP
9708 | Node is a CNAME DNS record. | DNS_ERROR_NODE_IS_CNAME
9709 | A CNAME record already exists for given name. | DNS_ERROR_CNAME_COLLISION
9710 | Record only at DNS zone root. | DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT
9711 | DNS record already exists. | DNS_ERROR_RECORD_ALREADY_EXISTS
9712 | Secondary DNS zone data error. | DNS_ERROR_SECONDARY_DATA
9713 | Could not create DNS cache data. | DNS_ERROR_NO_CREATE_CACHE_DATA
9714 | DNS name does not exist. | DNS_ERROR_NAME_DOES_NOT_EXIST
9715 | Could not create pointer (PTR) record. | DNS_WARNING_PTR_CREATE_FAILED
9716 | DNS domain was undeleted. | DNS_WARNING_DOMAIN_UNDELETED
9717 | The directory service is unavailable. | DNS_ERROR_DS_UNAVAILABLE
9718 | DNS zone already exists in the directory service. | DNS_ERROR_DS_ZONE_ALREADY_EXISTS
9719 | DNS server not creating or reading the boot file for the directory service integrated DNS zone. | DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE
9751 | DNS AXFR (zone transfer) complete. | DNS_INFO_AXFR_COMPLETE
9752 | DNS zone transfer failed. | DNS_ERROR_AXFR
9753 | Added local WINS server. | DNS_INFO_ADDED_LOCAL_WINS
9801 | Secure update call needs to continue update request. | DNS_STATUS_CONTINUE_NEEDED
9851 | TCP/IP network protocol not installed. | DNS_ERROR_NO_TCPIP
9852 | No DNS servers configured for local system. | DNS_ERROR_NO_DNS_SERVERS
9901 | The specified directory partition does not exist. | DNS_ERROR_DP_DOES_NOT_EXIST
9902 | The specified directory partition already exists. | DNS_ERROR_DP_ALREADY_EXISTS
9903 | The DS is not enlisted in the specified directory partition. | DNS_ERROR_DP_NOT_ENLISTED
9904 | The DS is already enlisted in the specified directory partition. | DNS_ERROR_DP_ALREADY_ENLISTED
10004 | A blocking operation was interrupted by a call to WSACancelBlockingCall. | WSAEINTR
10009 | The file handle supplied is not valid. | WSAEBADF
10013 | An attempt was made to access a socket in a way forbidden by its access permissions. | WSAEACCES
10014 | The system detected an invalid pointer address in attempting to use a pointer argument in a call. | WSAEFAULT
10022 | An invalid argument was supplied. | WSAEINVAL
10024 | Too many open sockets. | WSAEMFILE
10035 | A non-blocking socket operation could not be completed immediately. | WSAEWOULDBLOCK
10036 | A blocking operation is currently executing. | WSAEINPROGRESS
10037 | An operation was attempted on a non-blocking socket that already had an operation in progress. | WSAEALREADY
10038 | An operation was attempted on something that is not a socket. | WSAENOTSOCK
10039 | A required address was omitted from an operation on a socket. | WSAEDESTADDRREQ
10040 | A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself. | WSAEMSGSIZE
10041 | A protocol was specified in the socket function call that does not support the semantics of the socket type requested. | WSAEPROTOTYPE
10042 | An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call. | WSAENOPROTOOPT
10043 | The requested protocol has not been configured into the system, or no implementation for it exists. | WSAEPROTONOSUPPORT
10044 | The support for the specified socket type does not exist in this address family. | WSAESOCKTNOSUPPORT
10045 | The attempted operation is not supported for the type of object referenced. | WSAEOPNOTSUPP
10046 | The protocol family has not been configured into the system or no implementation for it exists. | WSAEPFNOSUPPORT
10047 | An address incompatible with the requested protocol was used. | WSAEAFNOSUPPORT
10048 | Only one usage of each socket address (protocol/network address/port) is normally permitted. | WSAEADDRINUSE
10049 | The requested address is not valid in its context. | WSAEADDRNOTAVAIL
10050 | A socket operation encountered a dead network. | WSAENETDOWN
10051 | A socket operation was attempted to an unreachable network. | WSAENETUNREACH
10052 | The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress. | WSAENETRESET
10053 | An established connection was aborted by the software in your host machine. | WSAECONNABORTED
10054 | An existing connection was forcibly closed by the remote host. | WSAECONNRESET
10055 | An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. | WSAENOBUFS
10056 | A connect request was made on an already connected socket. | WSAEISCONN
10057 | A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. | WSAENOTCONN
10058 | A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call. | WSAESHUTDOWN
10059 | Too many references to some kernel object. | WSAETOOMANYREFS
10060 | A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. | WSAETIMEDOUT
10061 | No connection could be made because the target machine actively refused it. | WSAECONNREFUSED
10062 | Cannot translate name. | WSAELOOP
10063 | Name component or name was too long. | WSAENAMETOOLONG
10064 | A socket operation failed because the destination host was down. | WSAEHOSTDOWN
10065 | A socket operation was attempted to an unreachable host. | WSAEHOSTUNREACH
10066 | Cannot remove a directory that is not empty. | WSAENOTEMPTY
10067 | A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously. | WSAEPROCLIM
10068 | Ran out of quota. | WSAEUSERS
10069 | Ran out of disk quota. | WSAEDQUOT
10070 | File handle reference is no longer available. | WSAESTALE
10071 | Item is not available locally. | WSAEREMOTE
10091 | WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable. | WSASYSNOTREADY
10092 | The Windows Sockets version requested is not supported. | WSAVERNOTSUPPORTED
10093 | Either the application has not called WSAStartup, or WSAStartup failed. | WSANOTINITIALISED
10101 | Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence. | WSAEDISCON
10102 | No more results can be returned by WSALookupServiceNext. | WSAENOMORE
10103 | A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled. | WSAECANCELLED
10104 | The procedure call table is invalid. | WSAEINVALIDPROCTABLE
10105 | The requested service provider is invalid. | WSAEINVALIDPROVIDER
10106 | The requested service provider could not be loaded or initialized. | WSAEPROVIDERFAILEDINIT
10107 | A system call that should never fail has failed. | WSASYSCALLFAILURE
10108 | No such service is known. The service cannot be found in the specified name space. | WSASERVICE_NOT_FOUND
10109 | The specified class was not found. | WSATYPE_NOT_FOUND
10110 | No more results can be returned by WSALookupServiceNext. | WSA_E_NO_MORE
10111 | A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled. | WSA_E_CANCELLED
10112 | A database query failed because it was actively refused. | WSAEREFUSED
11001 | No such host is known. | WSAHOST_NOT_FOUND
11002 | This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. | WSATRY_AGAIN
11003 | A non-recoverable error occurred during a database lookup. | WSANO_RECOVERY
11004 | The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. | WSANO_DATA
11005 | At least one reserve has arrived. | WSA_QOS_RECEIVERS
11006 | At least one path has arrived. | WSA_QOS_SENDERS
11007 | There are no senders. | WSA_QOS_NO_SENDERS
11008 | There are no receivers. | WSA_QOS_NO_RECEIVERS
11009 | Reserve has been confirmed. | WSA_QOS_REQUEST_CONFIRMED
11010 | Error due to lack of resources. | WSA_QOS_ADMISSION_FAILURE
11011 | Rejected for administrative reasons - bad credentials. | WSA_QOS_POLICY_FAILURE
11012 | Unknown or conflicting style. | WSA_QOS_BAD_STYLE
11013 | Problem with some part of the filterspec or providerspecific buffer in general. | WSA_QOS_BAD_OBJECT
11014 | Problem with some part of the flowspec. | WSA_QOS_TRAFFIC_CTRL_ERROR
11015 | General QOS error. | WSA_QOS_GENERIC_ERROR
11016 | An invalid or unrecognized service type was found in the flowspec. | WSA_QOS_ESERVICETYPE
11017 | An invalid or inconsistent flowspec was found in the QOS structure. | WSA_QOS_EFLOWSPEC
11018 | Invalid QOS provider-specific buffer. | WSA_QOS_EPROVSPECBUF
11019 | An invalid QOS filter style was used. | WSA_QOS_EFILTERSTYLE
11020 | An invalid QOS filter type was used. | WSA_QOS_EFILTERTYPE
11021 | An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR. | WSA_QOS_EFILTERCOUNT
11022 | An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer. | WSA_QOS_EOBJLENGTH
11023 | An incorrect number of flow descriptors was specified in the QOS structure. | WSA_QOS_EFLOWCOUNT
11024 | An unrecognized object was found in the QOS provider-specific buffer. | WSA_QOS_EUNKNOWNPSOBJ
11025 | An invalid policy object was found in the QOS provider-specific buffer. | WSA_QOS_EPOLICYOBJ
11026 | An invalid QOS flow descriptor was found in the flow descriptor list. | WSA_QOS_EFLOWDESC
11027 | An invalid or inconsistent flowspec was found in the QOS provider-specific buffer. | WSA_QOS_EPSFLOWSPEC
11028 | An invalid FILTERSPEC was found in the QOS provider-specific buffer. | WSA_QOS_EPSFILTERSPEC
11029 | An invalid shape discard mode object was found in the QOS provider-specific buffer. | WSA_QOS_ESDMODEOBJ
11030 | An invalid shaping rate object was found in the QOS provider-specific buffer. | WSA_QOS_ESHAPERATEOBJ
11031 | A reserved policy element was found in the QOS provider-specific buffer. | WSA_QOS_RESERVED_PETYPE
12000 | The requested section was not present in the activation context. | ERROR_SXS_SECTION_NOT_FOUND
12001 | This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. | ERROR_SXS_CANT_GEN_ACTCTX
12002 | The application binding data format is invalid. | ERROR_SXS_INVALID_ACTCTXDATA_FORMAT
12003 | The referenced assembly is not installed on your system. | ERROR_SXS_ASSEMBLY_NOT_FOUND
12004 | The manifest file does not begin with the required tag and format information. | ERROR_SXS_MANIFEST_FORMAT_ERROR
12005 | The manifest file contains one or more syntax errors. | ERROR_SXS_MANIFEST_PARSE_ERROR
12006 | The application attempted to activate a disabled activation context. | ERROR_SXS_ACTIVATION_CONTEXT_DISABLED
12007 | The requested lookup key was not found in any active activation context. | ERROR_SXS_KEY_NOT_FOUND
12008 | A component version required by the application conflicts with another component version already active. | ERROR_SXS_VERSION_CONFLICT
12009 | The type requested activation context section does not match the query API used. | ERROR_SXS_WRONG_SECTION_TYPE
12010 | Lack of system resources has required isolated activation to be disabled for the current thread of execution. | ERROR_SXS_THREAD_QUERIES_DISABLED
12011 | An attempt to set the process default activation context failed because the process default activation context was already set. | ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET
12012 | The encoding group identifier specified is not recognized. | ERROR_SXS_UNKNOWN_ENCODING_GROUP
12013 | The encoding requested is not recognized. | ERROR_SXS_UNKNOWN_ENCODING
12014 | The manifest contains a reference to an invalid URI. | ERROR_SXS_INVALID_XML_NAMESPACE_URI
12015 | The application manifest contains a reference to a dependent assembly which is not installed. | ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED
12016 | The manifest for an assembly used by the application has a reference to a dependent assembly which is not installed. | ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED
12017 | The manifest contains an attribute for the assembly identity which is not valid. | ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE
12018 | The manifest is missing the required default namespace specification on the assembly element. | ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE
12019 | The manifest has a default namespace specified on the assembly element but its value is not "urn:schemas-microsoft-com:asm.v1". | ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE
12020 | The private manifest probe has crossed the reparse-point-associated path. | ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT
12021 | Two or more components referenced directly or indirectly by the application manifest have files by the same name. | ERROR_SXS_DUPLICATE_DLL_NAME
12022 | Two or more components referenced directly or indirectly by the application manifest have window classes with the same name. | ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME
12023 | Two or more components referenced directly or indirectly by the application manifest have the same COM server CLSIDs. | ERROR_SXS_DUPLICATE_CLSID
12024 | Two or more components referenced directly or indirectly by the application manifest have proxies for the same COM interface IIDs. | ERROR_SXS_DUPLICATE_IID
12025 | Two or more components referenced directly or indirectly by the application manifest have the same COM type library TLBIDs. | ERROR_SXS_DUPLICATE_TLBID
12026 | Two or more components referenced directly or indirectly by the application manifest have the same COM ProgIDs. | ERROR_SXS_DUPLICATE_PROGID
12027 | Two or more components referenced directly or indirectly by the application manifest are different versions of the same component which is not permitted. | ERROR_SXS_DUPLICATE_ASSEMBLY_NAME
12028 | A component's file does not match the verification information present in the component manifest. | ERROR_SXS_FILE_HASH_MISMATCH
12029 | The policy manifest contains one or more syntax errors. | ERROR_SXS_POLICY_PARSE_ERROR
12030 | Manifest Parse Error : A string literal was expected, but no opening quote character was found. | ERROR_SXS_XML_E_MISSINGQUOTE
12031 | Manifest Parse Error : Incorrect syntax was used in a comment. | ERROR_SXS_XML_E_COMMENTSYNTAX
12032 | Manifest Parse Error : A name was started with an invalid character. | ERROR_SXS_XML_E_BADSTARTNAMECHAR
12033 | Manifest Parse Error : A name contained an invalid character. | ERROR_SXS_XML_E_BADNAMECHAR
12034 | Manifest Parse Error : A string literal contained an invalid character. | ERROR_SXS_XML_E_BADCHARINSTRING
12035 | Manifest Parse Error : Invalid syntax for an XML declaration. | ERROR_SXS_XML_E_XMLDECLSYNTAX
12036 | Manifest Parse Error : An invalid character was found in text content. | ERROR_SXS_XML_E_BADCHARDATA
12037 | Manifest Parse Error : Required white space was missing. | ERROR_SXS_XML_E_MISSINGWHITESPACE
12038 | Manifest Parse Error : The character '>' was expected. | ERROR_SXS_XML_E_EXPECTINGTAGEND
12039 | Manifest Parse Error : A semi colon character was expected. | ERROR_SXS_XML_E_MISSINGSEMICOLON
12040 | Manifest Parse Error : Unbalanced parentheses. | ERROR_SXS_XML_E_UNBALANCEDPAREN
12041 | Manifest Parse Error : Internal error. | ERROR_SXS_XML_E_INTERNALERROR
12042 | Manifest Parse Error : White space is not allowed at this location. | ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE
12043 | Manifest Parse Error : End of file reached in invalid state for current encoding. | ERROR_SXS_XML_E_INCOMPLETE_ENCODING
12044 | Manifest Parse Error : Missing parenthesis. | ERROR_SXS_XML_E_MISSING_PAREN
12045 | Manifest Parse Error : A single or double closing quote character (\' or \") is missing. | ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE
12046 | Manifest Parse Error : Multiple colons are not allowed in a name. | ERROR_SXS_XML_E_MULTIPLE_COLONS
12047 | Manifest Parse Error : Invalid character for decimal digit. | ERROR_SXS_XML_E_INVALID_DECIMAL
12048 | Manifest Parse Error : Invalid character for hexadecimal digit. | ERROR_SXS_XML_E_INVALID_HEXIDECIMAL
12049 | Manifest Parse Error : Invalid Unicode character value for this platform. | ERROR_SXS_XML_E_INVALID_UNICODE
12050 | Manifest Parse Error : Expecting white space or '?'. | ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK
12051 | Manifest Parse Error : End tag was not expected at this location. | ERROR_SXS_XML_E_UNEXPECTEDENDTAG
12052 | Manifest Parse Error : The following tags were not closed: %1. | ERROR_SXS_XML_E_UNCLOSEDTAG
12053 | Manifest Parse Error : Duplicate attribute. | ERROR_SXS_XML_E_DUPLICATEATTRIBUTE
12054 | Manifest Parse Error : Only one top level element is allowed in an XML document. | ERROR_SXS_XML_E_MULTIPLEROOTS
12055 | Manifest Parse Error : Invalid at the top level of the document. | ERROR_SXS_XML_E_INVALIDATROOTLEVEL
12056 | Manifest Parse Error : Invalid XML declaration. | ERROR_SXS_XML_E_BADXMLDECL
12057 | Manifest Parse Error : XML document must have a top level element. | ERROR_SXS_XML_E_MISSINGROOT
12058 | Manifest Parse Error : Unexpected end of file. | ERROR_SXS_XML_E_UNEXPECTEDEOF
12059 | Manifest Parse Error : Parameter entities cannot be used inside markup declarations in an internal subset. | ERROR_SXS_XML_E_BADPEREFINSUBSET
12060 | Manifest Parse Error : Element was not closed. | ERROR_SXS_XML_E_UNCLOSEDSTARTTAG
12061 | Manifest Parse Error : End element was missing the character '>'. | ERROR_SXS_XML_E_UNCLOSEDENDTAG
12062 | Manifest Parse Error : A string literal was not closed. | ERROR_SXS_XML_E_UNCLOSEDSTRING
12063 | Manifest Parse Error : A comment was not closed. | ERROR_SXS_XML_E_UNCLOSEDCOMMENT
12064 | Manifest Parse Error : A declaration was not closed. | ERROR_SXS_XML_E_UNCLOSEDDECL
12065 | Manifest Parse Error : A CDATA section was not closed. | ERROR_SXS_XML_E_UNCLOSEDCDATA
12066 | Manifest Parse Error : The namespace prefix is not allowed to start with the reserved string "xml". | ERROR_SXS_XML_E_RESERVEDNAMESPACE
12067 | Manifest Parse Error : System does not support the specified encoding. | ERROR_SXS_XML_E_INVALIDENCODING
12068 | Manifest Parse Error : Switch from current encoding to specified encoding not supported. | ERROR_SXS_XML_E_INVALIDSWITCH
12069 | Manifest Parse Error : The name 'xml' is reserved and must be lower case. | ERROR_SXS_XML_E_BADXMLCASE
12070 | Manifest Parse Error : The standalone attribute must have the value 'yes' or 'no'. | ERROR_SXS_XML_E_INVALID_STANDALONE
12071 | Manifest Parse Error : The standalone attribute cannot be used in external entities. | ERROR_SXS_XML_E_UNEXPECTED_STANDALONE
12072 | Manifest Parse Error : Invalid version number. | ERROR_SXS_XML_E_INVALID_VERSION
12073 | Manifest Parse Error : Missing equals sign between attribute and attribute value. | ERROR_SXS_XML_E_MISSINGEQUALS
13000 | The specified quick mode policy already exists. | ERROR_IPSEC_QM_POLICY_EXISTS
13001 | The specified quick mode policy was not found. | ERROR_IPSEC_QM_POLICY_NOT_FOUND
13002 | The specified quick mode policy is being used. | ERROR_IPSEC_QM_POLICY_IN_USE
13003 | The specified main mode policy already exists. | ERROR_IPSEC_MM_POLICY_EXISTS
13004 | The specified main mode policy was not found. | ERROR_IPSEC_MM_POLICY_NOT_FOUND
13005 | The specified main mode policy is being used. | ERROR_IPSEC_MM_POLICY_IN_USE
13006 | The specified main mode filter already exists. | ERROR_IPSEC_MM_FILTER_EXISTS
13007 | The specified main mode filter was not found. | ERROR_IPSEC_MM_FILTER_NOT_FOUND
13008 | The specified transport mode filter already exists. | ERROR_IPSEC_TRANSPORT_FILTER_EXISTS
13009 | The specified transport mode filter does not exist. | ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND
13010 | The specified main mode authentication list exists. | ERROR_IPSEC_MM_AUTH_EXISTS
13011 | The specified main mode authentication list was not found. | ERROR_IPSEC_MM_AUTH_NOT_FOUND
13012 | The specified quick mode policy is being used. | ERROR_IPSEC_MM_AUTH_IN_USE
13013 | The specified main mode policy was not found. | ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND
13014 | The specified quick mode policy was not found. | ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND
13015 | The manifest file contains one or more syntax errors. | ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND
13016 | The application attempted to activate a disabled activation context. | ERROR_IPSEC_TUNNEL_FILTER_EXISTS
13017 | The requested lookup key was not found in any active activation context. | ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND
13018 | The Main Mode filter is pending deletion. | ERROR_IPSEC_MM_FILTER_PENDING_DELETION
13019 | The transport filter is pending deletion. | ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION
13020 | The tunnel filter is pending deletion. | ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION
13021 | The Main Mode policy is pending deletion. | ERROR_IPSEC_MM_POLICY_PENDING_DELETION
13022 | The Main Mode authentication bundle is pending deletion. | ERROR_IPSEC_MM_AUTH_PENDING_DELETION
13023 | The Quick Mode policy is pending deletion. | ERROR_IPSEC_QM_POLICY_PENDING_DELETION
13801 | IKE authentication credentials are unacceptable. | ERROR_IPSEC_IKE_AUTH_FAIL
13802 | IKE security attributes are unacceptable. | ERROR_IPSEC_IKE_ATTRIB_FAIL
13803 | IKE Negotiation in progress. | ERROR_IPSEC_IKE_NEGOTIATION_PENDING
13804 | General processing error. | ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR
13805 | Negotiation timed out. | ERROR_IPSEC_IKE_TIMED_OUT
13806 | IKE failed to find valid machine certificate. | ERROR_IPSEC_IKE_NO_CERT
13807 | IKE SA deleted by peer before establishment completed. | ERROR_IPSEC_IKE_SA_DELETED
13808 | IKE SA deleted before establishment completed. | ERROR_IPSEC_IKE_SA_REAPED
13809 | Negotiation request sat in Queue too long. | ERROR_IPSEC_IKE_MM_ACQUIRE_DROP
13810 | Negotiation request sat in Queue too long. | ERROR_IPSEC_IKE_QM_ACQUIRE_DROP
13811 | Negotiation request sat in Queue too long. | ERROR_IPSEC_IKE_QUEUE_DROP_MM
13812 | Negotiation request sat in Queue too long. | ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM
13813 | No response from peer. | ERROR_IPSEC_IKE_DROP_NO_RESPONSE
13814 | Negotiation took too long. | ERROR_IPSEC_IKE_MM_DELAY_DROP
13815 | Negotiation took too long. | ERROR_IPSEC_IKE_QM_DELAY_DROP
13816 | Unknown error occurred. | ERROR_IPSEC_IKE_ERROR
13817 | Certificate Revocation Check failed. | ERROR_IPSEC_IKE_CRL_FAILED
13818 | Invalid certificate key usage. | ERROR_IPSEC_IKE_INVALID_KEY_USAGE
13819 | Invalid certificate type. | ERROR_IPSEC_IKE_INVALID_CERT_TYPE
13820 | No private key associated with machine certificate. | ERROR_IPSEC_IKE_NO_PRIVATE_KEY
13822 | Failure in Diffie-Helman computation. | ERROR_IPSEC_IKE_DH_FAIL
13824 | Invalid header. | ERROR_IPSEC_IKE_INVALID_HEADER
13825 | No policy configured. | ERROR_IPSEC_IKE_NO_POLICY
13826 | Failed to verify signature. | ERROR_IPSEC_IKE_INVALID_SIGNATURE
13827 | Failed to authenticate using Kerberos. | ERROR_IPSEC_IKE_KERBEROS_ERROR
13828 | Peer's certificate did not have a public key. | ERROR_IPSEC_IKE_NO_PUBLIC_KEY
13829 | Error processing error payload. | ERROR_IPSEC_IKE_PROCESS_ERR
13830 | Error processing SA payload. | ERROR_IPSEC_IKE_PROCESS_ERR_SA
13831 | Error processing Proposal payload. | ERROR_IPSEC_IKE_PROCESS_ERR_PROP
13832 | Error processing Transform payload. | ERROR_IPSEC_IKE_PROCESS_ERR_TRANS
13833 | Error processing KE payload. | ERROR_IPSEC_IKE_PROCESS_ERR_KE
13834 | Error processing ID payload. | ERROR_IPSEC_IKE_PROCESS_ERR_ID
13835 | Error processing Cert payload. | ERROR_IPSEC_IKE_PROCESS_ERR_CERT
13836 | Error processing Certificate Request payload. | ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ
13837 | Error processing Hash payload. | ERROR_IPSEC_IKE_PROCESS_ERR_HASH
13838 | Error processing Signature payload. | ERROR_IPSEC_IKE_PROCESS_ERR_SIG
13839 | Error processing Nonce payload. | ERROR_IPSEC_IKE_PROCESS_ERR_NONCE
13840 | Error processing Notify payload. | ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY
13841 | Error processing Delete Payload. | ERROR_IPSEC_IKE_PROCESS_ERR_DELETE
13842 | Error processing VendorId payload. | ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR
13843 | Invalid payload received. | ERROR_IPSEC_IKE_INVALID_PAYLOAD
13844 | Soft SA loaded. | ERROR_IPSEC_IKE_LOAD_SOFT_SA
13845 | Soft SA torn down. | ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN
13846 | Invalid cookie received.. | ERROR_IPSEC_IKE_INVALID_COOKIE
13847 | Peer failed to send valid machine certificate. | ERROR_IPSEC_IKE_NO_PEER_CERT
13848 | Certification Revocation check of peer's certificate failed. | ERROR_IPSEC_IKE_PEER_CRL_FAILED
13849 | New policy invalidated SAs formed with old policy. | ERROR_IPSEC_IKE_POLICY_CHANGE
13850 | There is no available Main Mode IKE policy. | ERROR_IPSEC_IKE_NO_MM_POLICY
13851 | Failed to enabled TCB privilege. | ERROR_IPSEC_IKE_NOTCBPRIV
13852 | Failed to load SECURITY.DLL. | ERROR_IPSEC_IKE_SECLOADFAIL
13853 | Failed to obtain security function table dispatch address from SSPI. | ERROR_IPSEC_IKE_FAILSSPINIT
13854 | Failed to query Kerberos package to obtain max token size. | ERROR_IPSEC_IKE_FAILQUERYSSP
13855 | Failed to obtain Kerberos server credentials for ISAKMP/ERROR_IPSEC_IKE service. Kerberos authentication will not function. The most likely reason for this is lack of domain membership. This is normal if your computer is a member of a workgroup. | ERROR_IPSEC_IKE_SRVACQFAIL
13856 | Failed to determine SSPI principal name for ISAKMP/ERROR_IPSEC_IKE service (QueryCredentialsAttributes). | ERROR_IPSEC_IKE_SRVQUERYCRED
13857 | Failed to obtain new SPI for the inbound SA from Ipsec driver. The most common cause for this is that the driver does not have the correct filter. Check your policy to verify the filters. | ERROR_IPSEC_IKE_GETSPIFAIL
13858 | Given filter is invalid. | ERROR_IPSEC_IKE_INVALID_FILTER
13859 | Memory allocation failed. | ERROR_IPSEC_IKE_OUT_OF_MEMORY
13860 | Failed to add Security Association to IPSec Driver. The most common cause for this is if the IKE negotiation took too long to complete. If the problem persists, reduce the load on the faulting machine. | ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED
13861 | Invalid policy. | ERROR_IPSEC_IKE_INVALID_POLICY
13862 | Invalid DOI. | ERROR_IPSEC_IKE_UNKNOWN_DOI
13863 | Invalid situation. | ERROR_IPSEC_IKE_INVALID_SITUATION
13864 | Diffie-Hellman failure. | ERROR_IPSEC_IKE_DH_FAILURE
13865 | Invalid Diffie-Hellman group. | ERROR_IPSEC_IKE_INVALID_GROUP
13866 | Error encrypting payload. | ERROR_IPSEC_IKE_ENCRYPT
13867 | Error decrypting payload. | ERROR_IPSEC_IKE_DECRYPT
13868 | Policy match error. | ERROR_IPSEC_IKE_POLICY_MATCH
13869 | Unsupported ID. | ERROR_IPSEC_IKE_UNSUPPORTED_ID
13870 | Hash verification failed. | ERROR_IPSEC_IKE_INVALID_HASH
13871 | Invalid hash algorithm. | ERROR_IPSEC_IKE_INVALID_HASH_ALG
13872 | Invalid hash size. | ERROR_IPSEC_IKE_INVALID_HASH_SIZE
13873 | Invalid encryption algorithm. | ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG
13874 | Invalid authentication algorithm. | ERROR_IPSEC_IKE_INVALID_AUTH_ALG
13875 | Invalid certificate signature. | ERROR_IPSEC_IKE_INVALID_SIG
13876 | Load failed. | ERROR_IPSEC_IKE_LOAD_FAILED
13877 | Deleted via RPC call. | ERROR_IPSEC_IKE_RPC_DELETE
13878 | Temporary state created to perform reinit. This is not a real failure. | ERROR_IPSEC_IKE_BENIGN_REINIT
13879 | The lifetime value received in the Responder Lifetime Notify is below the Windows 2000 configured minimum value. Please fix the policy on the peer machine. | ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY
13880 | SA reaped because QM limit was reached. | ERROR_IPSEC_IKE_QM_LIMIT_REAP
13881 | Key length in certificate is too small for configured security requirements. | ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN
13882 | Max number of established MM SAs to peer exceeded. | ERROR_IPSEC_IKE_MM_LIMIT
13883 | IKE received a policy that disables negotiation. | ERROR_IPSEC_IKE_NEGOTIATION_DISABLED
13884 |  | ERROR_IPSEC_IKE_NEG_STATUS_END


Functions by Category

The following is a list of the categories of Win32 functions. For a list of functions in alphabetical order, see Functions in Alphabetical Order.

Atom

Bitmap

Brush

Button

Caret

Clipboard

Clipping

Color

Combo Box

Common Dialog Box

Communication

Console

Coordinate Space and Transformation

Cursor

Data Decompression Library

Debugging

Device Context

Device Input and Output

Device Management

Dialog Box

Dynamic Data Exchange

Dynamic Data Exchange Management

Dynamic-Link Library

Edit Control

Error Handling

Event Logging

File I/O

File Mapping

File System

Filled Shape

Font and Text

Handle and Object

Hook

Icon

Input Method Editor

Keyboard Accelerator

Keyboard Input

Line and Curve

List Box

Mailslot

Memory Management

Menu

Message and Message Queue

Metafile

Mouse Input

Multiple Display Monitors

Multiple Document Interface

National Language Support

Network Management

Network DDE

Painting and Drawing

Path

Pen

Performance Monitoring

Pipe

Power Management

Printing and Print Spooler

Process and Thread

PSAPI

Raw Input

Rectangle

Region

Registry

Resource

Rich Edit Control

Scroll Bar

Service

Static Control

String

Structured Exception Handling

Synchronization

System Information

System Shutdown

Tape Backup

Terminal Services

Text Object Model

Time

Time Provider

Timer

Tool Help

Unicode and Character Set

Uniscribe

User Profile

Version Information

Window

Window Class

Window Procedure

Window Property

Window Station and Desktop

Windowless Rich Edit Control

Windows Networking


Functions in Alphabetical Order

The following topics provide a list of the Win32® API functions in alphabetical order. For a list of functions by category, see Functions by Category.

  • _ Functions
  • A Functions
  • B Functions
  • C Functions
  • D Functions
  • E Functions
  • F Functions
  • G Functions
  • H Functions
  • I Functions
  • J Functions
  • K Functions
  • L Functions
  • M Functions
  • N Functions
  • O Functions
  • P Functions
  • Q Functions
  • R Functions
  • S Functions
  • T Functions
  • U Functions
  • V Functions
  • W Functions
  • Z Functions


_ Functions

_hread

_hwrite

_lclose

_lcreat

_llseek

_lopen

_lread

_lwrite

_TrackMouseEvent


A Functions

AbnormalTermination

AbortDoc

AbortPath

AbortPrinter

AbortProc

AbortSystemShutdown

ActivateKeyboardLayout

AddAtom

AddFontMemResourceEx

AddFontResource

AddFontResourceEx

AddForm

AddJob

AddMonitor

AddPort

AddPrinter

AddPrinterConnection

AddPrinterDriver

AddPrinterDriverEx

AddPrintProcessor

AddPrintProvidor

AddUsersToEncryptedFile

AddVectoredExceptionHandler

AdjustWindowRect

AdjustWindowRectEx

AdvancedDocumentProperties

AlertSamplesAvail

AllocateUserPhysicalPages

AllocConsole

AllowSetForegroundWindow

AlphaBlend

AngleArc

AnimatePalette

AnimateWindow

AnyPopup

APCProc

AppendMenu

Arc

ArcTo

AreFileApisANSI

ArrangeIconicWindows

AssignProcessToJobObject

AttachThreadInput


B Functions

BackupEventLog

BackupRead

BackupSeek

BackupWrite

Beep

BeginDeferWindowPos

BeginPaint

BeginPath

BeginUpdateResource

BindIoCompletionCallback

BitBlt

BlockInput

BringWindowToTop

BroadcastSystemMessage

BroadcastSystemMessageEx

BuildCommDCB

BuildCommDCBAndTimeouts


C Functions

CallMsgFilter

CallNamedPipe

CallNextHookEx

CallWindowProc

CallWndProc

CallWndRetProc

CancelDC

CancelIo

CancelWaitableTimer

CascadeWindows

CBTProc

CCHookProc

CFHookProc

ChangeClipboardChain

ChangeDisplaySettings

ChangeDisplaySettingsEx

ChangeServiceConfig

ChangeServiceConfig2

ChangeTimerQueueTimer

CharLower

CharLowerBuff

CharNext

CharNextExA

CharPrev

CharPrevExA

CharToOem

CharToOemBuff

CharUpper

CharUpperBuff

CheckDlgButton

CheckMenuItem

CheckMenuRadioItem

CheckRadioButton

ChildWindowFromPoint

ChildWindowFromPointEx

ChooseColor

ChooseFont

Chord

ClearCommBreak

ClearCommError

ClearEventLog

ClientToScreen

ClipCursor

CloseClipboard

CloseDesktop

CloseEnhMetaFile

CloseEventLog

CloseFigure

CloseHandle

CloseMetaFile

ClosePrinter

CloseServiceHandle

CloseWindow

CloseWindowStation

CombineRgn

CombineTransform

CommandLineToArgvW

CommConfigDialog

CommDlgExtendedError

CompareFileTime

CompareString

ConfigurePort

ConnectNamedPipe

ConnectToPrinterDlg

ContinueDebugEvent

ControlService

ConvertDefaultLocale

ConvertThreadToFiber

CopyAcceleratorTable

CopyCursor

CopyEnhMetaFile

CopyFile

CopyFileEx

CopyIcon

CopyImage

CopyMemory

CopyMetaFile

CopyProgressRoutine

CopyRect

CountClipboardFormats

CounterPathCallBack

CreateAcceleratorTable

CreateBitmap

CreateBitmapIndirect

CreateBrushIndirect

CreateCaret

CreateCompatibleBitmap

CreateCompatibleDC

CreateConsoleScreenBuffer

CreateCursor

CreateDC

CreateDesktop

CreateDialog

CreateDialogIndirect

CreateDialogIndirectParam

CreateDialogParam

CreateDIBitmap

CreateDIBPatternBrush

CreateDIBPatternBrushPt

CreateDIBSection

CreateDirectory

CreateDirectoryEx

CreateDiscardableBitmap

CreateEllipticRgn

CreateEllipticRgnIndirect

CreateEnhMetaFile

CreateEnvironmentBlock

CreateEvent

CreateFiber

CreateFile

CreateFileMapping

CreateFont

CreateFontIndirect

CreateFontIndirectEx

CreateHalftonePalette

CreateHardLink

CreateHatchBrush

CreateIC

CreateIcon

CreateIconFromResource

CreateIconFromResourceEx

CreateIconIndirect

CreateIoCompletionPort

CreateJobObject

CreateMailslot

CreateMDIWindow

CreateMenu

CreateMetaFile

CreateMutex

CreateNamedPipe

CreatePalette

CreatePatternBrush

CreatePen

CreatePenIndirect

CreatePipe

CreatePolygonRgn

CreatePolyPolygonRgn

CreatePopupMenu

CreateProcess

CreateProcessAsUser

CreateProcessWithLogonW

CreateRectRgn

CreateRectRgnIndirect

CreateRemoteThread

CreateRoundRectRgn

CreateScalableFontResource

CreateSemaphore

CreateService

CreateSolidBrush

CreateTapePartition

CreateThread

CreateTimerQueue

CreateTimerQueueTimer

CreateToolhelp32Snapshot

CreateWaitableTimer

CreateWindow

CreateWindowEx

CreateWindowStation


D Functions

DdeAbandonTransaction

DdeAccessData

DdeAddData

DdeCallback

DdeClientTransaction

DdeCmpStringHandles

DdeConnect

DdeConnectList

DdeCreateDataHandle

DdeCreateStringHandle

DdeDisconnect

DdeDisconnectList

DdeEnableCallback

DdeFreeDataHandle

DdeFreeStringHandle

DdeGetData

DdeGetLastError

DdeImpersonateClient

DdeInitialize

DdeKeepStringHandle

DdeNameService

DdePostAdvise

DdeQueryConvInfo

DdeQueryNextServer

DdeQueryString

DdeReconnect

DdeSetQualityOfService

DdeSetUserHandle

DdeUnaccessData

DdeUninitialize

DebugActiveProcess

DebugActiveProcessStop

DebugBreak

DebugProc

DebugSetProcessKillOnExit

DecryptFile

DefDlgProc

DeferWindowPos

DefFrameProc

DefineDosDevice

DefMDIChildProc

DefRawInputProc

DefWindowProc

DeleteAtom

DeleteCriticalSection

DeleteDC

DeleteEnhMetaFile

DeleteFiber

DeleteFile

DeleteForm

DeleteMenu

DeleteMetaFile

DeleteMonitor

DeleteObject

DeletePort

DeletePrinter

DeletePrinterConnection

DeletePrinterData

DeletePrinterDataEx

DeletePrinterDriver

DeletePrinterDriverEx

DeletePrinterKey

DeletePrintProcessor

DeletePrintProvidor

DeleteProfile

DeleteService

DeleteTimerQueue

DeleteTimerQueueEx

DeleteTimerQueueTimer

DeleteVolumeMountPoint

DeregisterEventSource

DestroyAcceleratorTable

DestroyCaret

DestroyCursor

DestroyEnvironmentBlock

DestroyIcon

DestroyMenu

DestroyWindow

DeviceCapabilities

DeviceIoControl

DialogBox

DialogBoxIndirect

DialogBoxIndirectParam

DialogBoxParam

DialogProc

DisableThreadLibraryCalls

DisconnectNamedPipe

DispatchMessage

DlgDirList

DlgDirListComboBox

DlgDirSelectComboBoxEx

DlgDirSelectEx

DllMain

DnsHostnameToComputerName

DocumentProperties

DosDateTimeToFileTime

DPtoLP

DragDetect

DrawAnimatedRects

DrawCaption

DrawEdge

DrawEscape

DrawFocusRect

DrawFrameControl

DrawIcon

DrawIconEx

DrawMenuBar

DrawState

DrawStateProc

DrawText

DrawTextEx

DuplicateHandle

DuplicateIcon


E Functions

EditWordBreakProc

Ellipse

EmptyClipboard

EmptyWorkingSet

EnableMenuItem

EnableScrollBar

EnableWindow

EncryptFile

EncryptionDisable

EndDeferWindowPos

EndDialog

EndDoc

EndDocPrinter

EndMenu

EndPage

EndPagePrinter

EndPaint

EndPath

EndUpdateResource

EnhMetaFileProc

EnterCriticalSection

EnumCalendarInfo

EnumCalendarInfoEx

EnumCalendarInfoProc

EnumCalendarInfoProcEx

EnumChildProc

EnumChildWindows

EnumClipboardFormats

EnumCodePagesProc

EnumDateFormats

EnumDateFormatsEx

EnumDateFormatsProc

EnumDateFormatsProcEx

EnumDependentServices

EnumDesktopProc

EnumDesktops

EnumDesktopWindows

EnumDeviceDrivers

EnumDisplayDevices

EnumDisplayMonitors

EnumDisplaySettings

EnumDisplaySettingsEx

EnumEnhMetaFile

EnumFontFamExProc

EnumFontFamilies

EnumFontFamiliesEx

EnumFontFamProc

EnumFonts

EnumFontsProc

EnumForms

EnumGeoInfoProc

EnumInputContext

EnumJobs

EnumLanguageGroupLocales

EnumLanguageGroupLocalesProc

EnumLanguageGroupsProc

EnumLocalesProc

EnumMetaFile

EnumMetaFileProc

EnumMonitors

EnumObjects

EnumObjectsProc

EnumPorts

EnumPrinterData

EnumPrinterDataEx

EnumPrinterDrivers

EnumPrinterKey

EnumPrinters

EnumPrintProcessorDatatypes

EnumPrintProcessors

EnumProcesses

EnumProcessModules

EnumProps

EnumPropsEx

EnumRegisterWordProc

EnumResLangProc

EnumResNameProc

EnumResourceLanguages

EnumResourceNames

EnumResourceTypes

EnumResTypeProc

EnumServicesStatus

EnumServicesStatusEx

EnumSystemCodePages

EnumSystemGeoID

EnumSystemLanguageGroups

EnumSystemLocales

EnumThreadWindows

EnumThreadWndProc

EnumTimeFormats

EnumTimeFormatsProc

EnumUILanguages

EnumUILanguagesProc

EnumWindows

EnumWindowsProc

EnumWindowStationProc

EnumWindowStations

EqualRect

EqualRgn

EraseTape

Escape

EscapeCommFunction

ExcludeClipRect

ExcludeUpdateRgn

ExitProcess

ExitThread

ExitWindows

ExitWindowsEx

ExpandEnvironmentStrings

ExpandEnvironmentStringsForUser

ExtCreatePen

ExtCreateRegion

ExtEscape

ExtFloodFill

ExtractAssociatedIcon

ExtractIcon

ExtractIconEx

ExtSelectClipRgn

ExtTextOut


F Functions

FatalAppExit

FatalExit

FiberProc

FileEncryptionStatus

FileIOCompletionRoutine

FileTimeToDosDateTime

FileTimeToLocalFileTime

FileTimeToSystemTime

FillConsoleOutputAttribute

FillConsoleOutputCharacter

FillMemory

FillPath

FillRect

FillRgn

FindAtom

FindClose

FindCloseChangeNotification

FindClosePrinterChangeNotification

FindFirstChangeNotification

FindFirstFile

FindFirstFileEx

FindFirstPrinterChangeNotification

FindFirstVolume

FindFirstVolumeMountPoint

FindNextChangeNotification

FindNextFile

FindNextPrinterChangeNotification

FindNextVolume

FindNextVolumeMountPoint

FindResource

FindResourceEx

FindText

FindVolumeClose

FindVolumeMountPointClose

FindWindow

FindWindowEx

FlashWindow

FlashWindowEx

FlattenPath

FloodFill

FlushConsoleInputBuffer

FlushFileBuffers

FlushInstructionCache

FlushPrinter

FlushViewOfFile

FoldString

ForegroundIdleProc

FormatMessage

FrameRect

FrameRgn

FreeConsole

FreeDDElParam

FreeEncryptionCertificateHashList

FreeEnvironmentStrings

FreeLibrary

FreeLibraryAndExitThread

FreePrinterNotifyInfo

FreeUserPhysicalPages

FRHookProc


G Functions

GdiComment

GdiFlush

GdiGetBatchLimit

GdiSetBatchLimit

GenerateConsoleCtrlEvent

GetACP

GetActiveWindow

GetAllUsersProfileDirectory

GetAltTabInfo

GetAncestor

GetArcDirection

GetAspectRatioFilterEx

GetAsyncKeyState

GetAtomName

GetBinaryType

GetBitmapBits

GetBitmapDimensionEx

GetBkColor

GetBkMode

GetBoundsRect

GetBrushOrgEx

GetCalendarInfo

GetCapture

GetCaretBlinkTime

GetCaretPos

GetCharABCWidths

GetCharABCWidthsFloat

GetCharABCWidthsI

GetCharacterPlacement

GetCharWidth

GetCharWidth32

GetCharWidthFloat

GetCharWidthI

GetClassInfo

GetClassInfoEx

GetClassLong

GetClassLongPtr

GetClassName

GetClassWord

GetClientRect

GetClipboardData

GetClipboardFormatName

GetClipboardOwner

GetClipboardSequenceNumber

GetClipboardViewer

GetClipBox

GetClipCursor

GetClipRgn

GetColorAdjustment

GetComboBoxInfo

GetCommandLine

GetCommConfig

GetCommMask

GetCommModemStatus

GetCommProperties

GetCommState

GetCommTimeouts

GetCompressedFileSize

GetComputerName

GetComputerNameEx

GetComputerObjectName

GetConsoleCP

GetConsoleCursorInfo

GetConsoleMode

GetConsoleOutputCP

GetConsoleScreenBufferInfo

GetConsoleTitle

GetConsoleWindow

GetCPInfo

GetCPInfoEx

GetCurrencyFormat

GetCurrentDirectory

GetCurrentHwProfile

GetCurrentObject

GetCurrentPositionEx

GetCurrentProcess

GetCurrentProcessId

GetCurrentThread

GetCurrentThreadId

GetCursor

GetCursorInfo

GetCursorPos

GetDateFormat

GetDC

GetDCBrushColor

GetDCEx

GetDCOrgEx

GetDCPenColor

GetDefaultCommConfig

GetDefaultPrinter

GetDefaultUserProfileDirectory

GetDesktopWindow

GetDeviceCaps

GetDeviceDriverBaseName

GetDeviceDriverFileName

GetDevicePowerState

GetDialogBaseUnits

GetDIBColorTable

GetDIBits

GetDiskFreeSpace

GetDiskFreeSpaceEx

GetDlgCtrlID

GetDlgItem

GetDlgItemInt

GetDlgItemText

GetDoubleClickTime

GetDriveType

GetEnhMetaFile

GetEnhMetaFileBits

GetEnhMetaFileDescription

GetEnhMetaFileHeader

GetEnhMetaFilePaletteEntries

GetEnvironmentStrings

GetEnvironmentVariable

GetEventLogInformation

GetExceptionCode

GetExceptionInformation

GetExitCodeProcess

GetExitCodeThread

GetExpandedName

GetFileAttributes

GetFileAttributesEx

GetFileInformationByHandle

GetFileSize

GetFileSizeEx

GetFileTime

GetFileTitle

GetFileType

GetFileVersionInfo

GetFileVersionInfoSize

GetFocus

GetFontData

GetFontLanguageInfo

GetFontUnicodeRanges

GetForegroundWindow

GetForm

GetFullPathName

GetGeoInfo

GetGlyphIndices

GetGlyphOutline

GetGraphicsMode

GetGuiResources

GetGUIThreadInfo

GetHandleInformation

GetIconInfo

GetInputState

GetJob

GetKBCodePage

GetKerningPairs

GetKeyboardLayout

GetKeyboardLayoutList

GetKeyboardLayoutName

GetKeyboardState

GetKeyboardType

GetKeyNameText

GetKeyState

GetLargestConsoleWindowSize

GetLastActivePopup

GetLastError

GetLastInputInfo

GetLayeredWindowAttributes

GetLayout

GetListBoxInfo

GetLocaleInfo

GetLocalTime

GetLogicalDrives

GetLogicalDriveStrings

GetLongPathName

GetMailslotInfo

GetMapMode

GetMappedFileName

GetMenu

GetMenuBarInfo

GetMenuCheckMarkDimensions

GetMenuDefaultItem

GetMenuInfo

GetMenuItemCount

GetMenuItemID

GetMenuItemInfo

GetMenuItemRect

GetMenuState

GetMenuString

GetMessage

GetMessageExtraInfo

GetMessagePos

GetMessageTime

GetMetaFileBitsEx

GetMetaRgn

GetMiterLimit

GetModuleBaseName

GetModuleFileName

GetModuleFileNameEx

GetModuleHandle

GetModuleInformation

GetMonitorInfo

GetMouseMovePointsEx

GetMsgProc

GetNamedPipeHandleState

GetNamedPipeInfo

GetNearestColor

GetNearestPaletteIndex

GetNextDlgGroupItem

GetNextDlgTabItem

GetNextWindow

GetNumberFormat

GetNumberOfConsoleInputEvents

GetNumberOfConsoleMouseButtons

GetNumberOfEventLogRecords

GetObject

GetObjectType

GetOEMCP

GetOldestEventLogRecord

GetOpenClipboardWindow

GetOpenFileName

GetOutlineTextMetrics

GetOverlappedResult

GetPaletteEntries

GetParent

GetPath

GetPixel

GetPolyFillMode

GetPrinter

GetPrinterData

GetPrinterDataEx

GetPrinterDriver

GetPrinterDriverDirectory

GetPrintProcessorDirectory

GetPriorityClass

GetPriorityClipboardFormat

GetPrivateProfileInt

GetPrivateProfileSection

GetPrivateProfileSectionNames

GetPrivateProfileString

GetPrivateProfileStruct

GetProcAddress

GetProcessAffinityMask

GetProcessDefaultLayout

GetProcessHeap

GetProcessHeaps

GetProcessIoCounters

GetProcessMemoryInfo

GetProcessPriorityBoost

GetProcessShutdownParameters

GetProcessTimes

GetProcessVersion

GetProcessWindowStation

GetProcessWorkingSetSize

GetProfileInt

GetProfilesDirectory

GetProfileSection

GetProfileString

GetProfileType

GetProp

GetQueuedCompletionStatus

GetQueueStatus

GetRandomRgn

GetRasterizerCaps

GetRawInputBuffer

GetRawInputData

GetRawInputDeviceInfo

GetRawInputDeviceList

GetRegionData

GetRegisteredRawInputDevices

GetRgnBox

GetROP2

GetSaveFileName

GetScrollBarInfo

GetScrollInfo

GetScrollPos

GetScrollRange

GetServiceDisplayName

GetServiceKeyName

GetShortPathName

GetStartupInfo

GetStdHandle

GetStockObject

GetStretchBltMode

GetStringTypeA

GetStringTypeEx

GetStringTypeW

GetSubMenu

GetSysColor

GetSysColorBrush

GetSystemDefaultLangID

GetSystemDefaultLCID

GetSystemDefaultUILanguage

GetSystemDirectory

GetSystemInfo

GetSystemMenu

GetSystemMetrics

GetSystemPaletteEntries

GetSystemPaletteUse

GetSystemPowerStatus

GetSystemTime

GetSystemTimeAdjustment

GetSystemTimeAsFileTime

GetSystemWindowsDirectory

GetSystemWow64Directory

GetTabbedTextExtent

GetTapeParameters

GetTapePosition

GetTapeStatus

GetTempFileName

GetTempPath

GetTextAlign

GetTextCharacterExtra

GetTextCharset

GetTextCharsetInfo

GetTextColor

GetTextExtentExPoint

GetTextExtentExPointI

GetTextExtentPoint

GetTextExtentPoint32

GetTextExtentPointI

GetTextFace

GetTextMetrics

GetThreadContext

GetThreadDesktop

GetThreadLocale

GetThreadPriority

GetThreadPriorityBoost

GetThreadSelectorEntry

GetThreadTimes

GetTickCount

GetTimeFormat

GetTimeSysInfo

GetTimeZoneInformation

GetTitleBarInfo

GetTopWindow

GetUpdateRect

GetUpdateRgn

GetUserDefaultLangID

GetUserDefaultLCID

GetUserDefaultUILanguage

GetUserGeoID

GetUserName

GetUserNameEx

GetUserObjectInformation

GetUserProfileDirectory

GetVersion

GetVersionEx

GetViewportExtEx

GetViewportOrgEx

GetVolumeInformation

GetVolumeNameForVolumeMountPoint

GetVolumePathName

GetVolumePathNamesForVolumeName

GetWindow

GetWindowDC

GetWindowExtEx

GetWindowInfo

GetWindowLong

GetWindowLongPtr

GetWindowModuleFileName

GetWindowOrgEx

GetWindowPlacement

GetWindowRect

GetWindowRgn

GetWindowRgnBox

GetWindowsDirectory

GetWindowText

GetWindowTextLength

GetWindowThreadProcessId

GetWinMetaFileBits

GetWorldTransform

GetWriteWatch

GetWsChanges

GlobalAddAtom

GlobalAlloc

GlobalDeleteAtom

GlobalDiscard

GlobalFindAtom

GlobalFlags

GlobalFree

GlobalGetAtomName

GlobalHandle

GlobalLock

GlobalMemoryStatus

GlobalMemoryStatusEx

GlobalReAlloc

GlobalSize

GlobalUnlock

GradientFill

GrayString


H Functions

Handler

HandlerEx

HandlerRoutine

Heap32First

Heap32ListFirst

Heap32ListNext

Heap32Next

HeapAlloc

HeapCompact

HeapCreate

HeapDestroy

HeapFree

HeapLock

HeapReAlloc

HeapSize

HeapUnlock

HeapValidate

HeapWalk

HideCaret

HiliteMenuItem


I Functions

ImmAssociateContext

ImmAssociateContextEx

ImmConfigureIME

ImmCreateContext

ImmDestroyContext

ImmDisableIME

ImmEnumInputContext

ImmEnumRegisterWord

ImmEscape

ImmGetCandidateList

ImmGetCandidateListCount

ImmGetCandidateWindow

ImmGetCompositionFont

ImmGetCompositionString

ImmGetCompositionWindow

ImmGetContext

ImmGetConversionList

ImmGetConversionStatus

ImmGetDefaultIMEWnd

ImmGetDescription

ImmGetGuideLine

ImmGetIMEFileName

ImmGetImeMenuItems

ImmGetOpenStatus

ImmGetProperty

ImmGetRegisterWordStyle

ImmGetStatusWindowPos

ImmGetVirtualKey

ImmInstallIME

ImmIsIME

ImmIsUIMessage

ImmNotifyIME

ImmRegisterWord

ImmReleaseContext

ImmSetCandidateWindow

ImmSetCompositionFont

ImmSetCompositionString

ImmSetCompositionWindow

ImmSetConversionStatus

ImmSetOpenStatus

ImmSetStatusWindowPos

ImmSimulateHotKey

ImmUnregisterWord

ImpersonateDdeClientWindow

InflateRect

InitAtomTable

InitializeCriticalSection

InitializeCriticalSectionAndSpinCount

InitializeProcessForWsWatch

InitializeSListHead

InitiateSystemShutdown

InitiateSystemShutdownEx

InSendMessage

InSendMessageEx

InsertMenu

InsertMenuItem

Int32x32To64

Int64ShllMod32

Int64ShraMod32

Int64ShrlMod32

InterlockedCompareExchange

InterlockedCompareExchangePointer

InterlockedDecrement

InterlockedExchange

InterlockedExchangeAdd

InterlockedExchangePointer

InterlockedFlushSList

InterlockedIncrement

InterlockedPopEntrySList

InterlockedPushEntrySList

IntersectClipRect

IntersectRect

InvalidateRect

InvalidateRgn

InvertRect

InvertRgn

IsBadCodePtr

IsBadReadPtr

IsBadStringPtr

IsBadWritePtr

IsCharAlpha

IsCharAlphaNumeric

IsCharLower

IsCharUpper

IsChild

IsClipboardFormatAvailable

IsDBCSLeadByte

IsDBCSLeadByteEx

IsDebuggerPresent

IsDialogMessage

IsDlgButtonChecked

IsGUIThread

IsIconic

IsMenu

IsProcessInJob

IsProcessorFeaturePresent

IsRectEmpty

IsSystemResumeAutomatic

IsTextUnicode

IsValidCodePage

IsValidLanguageGroup

IsValidLocale

IsWindow

IsWindowEnabled

IsWindowUnicode

IsWindowVisible

IsZoomed


J Functions

JournalPlaybackProc

JournalRecordProc


K Functions

keybd_event

KeyboardProc

KillTimer


L Functions

LCMapString

LeaveCriticalSection

LineDDA

LineDDAProc

LineTo

LoadAccelerators

LoadBitmap

LoadCursor

LoadCursorFromFile

LoadIcon

LoadImage

LoadKeyboardLayout

LoadLibrary

LoadLibraryEx

LoadMenu

LoadMenuIndirect

LoadModule

LoadResource

LoadString

LoadUserProfile

LocalAlloc

LocalDiscard

LocalFileTimeToFileTime

LocalFlags

LocalFree

LocalHandle

LocalLock

LocalReAlloc

LocalSize

LocalUnlock

LockFile

LockFileEx

LockResource

LockServiceDatabase

LockSetForegroundWindow

LockWindowUpdate

LockWorkStation

LogTimeProvEvent

LookupIconIdFromDirectory

LookupIconIdFromDirectoryEx

LowLevelKeyboardProc

LowLevelMouseProc

LPtoDP

lstrcat

lstrcmp

lstrcmpi

lstrcpy

lstrcpyn

lstrlen

LZClose

LZCopy

LZInit

LZOpenFile

LZRead

LZSeek


M Functions

MapDialogRect

MapUserPhysicalPages

MapUserPhysicalPagesScatter

MapViewOfFile

MapViewOfFileEx

MapVirtualKey

MapVirtualKeyEx

MapWindowPoints

MaskBlt

MenuItemFromPoint

MessageBeep

MessageBox

MessageBoxEx

MessageBoxIndirect

MessageProc

ModifyMenu

ModifyWorldTransform

Module32First

Module32Next

MonitorEnumProc

MonitorFromPoint

MonitorFromRect

MonitorFromWindow

mouse_event

MouseProc

MoveFile

MoveFileEx

MoveFileWithProgress

MoveMemory

MoveToEx

MoveWindow

MsgWaitForMultipleObjects

MsgWaitForMultipleObjectsEx

MulDiv

MultiByteToWideChar


N Functions

NetAccessAdd

NetAccessCheck

NetAccessDel

NetAccessEnum

NetAccessGetInfo

NetAccessGetUserPerms

NetAccessSetInfo

NetAlertRaise

NetAlertRaiseEx

NetApiBufferAllocate

NetApiBufferFree

NetApiBufferReallocate

NetApiBufferSize

NetAuditClear

NetAuditRead

NetAuditWrite

NetConfigGet

NetConfigGetAll

NetConfigSet

NetConnectionEnum

NetDfsAdd

NetDfsAddFtRoot

NetDfsAddStdRoot

NetDfsAddStdRootForced

NetDfsEnum

NetDfsGetClientInfo

NetDfsGetInfo

NetDfsManagerInitialize

NetDfsRemove

NetDfsRemoveFtRoot

NetDfsRemoveFtRootForced

NetDfsRemoveStdRoot

NetDfsSetClientInfo

NetDfsSetInfo

NetErrorLogClear

NetErrorLogRead

NetErrorLogWrite

NetFileClose

NetFileClose2

NetFileEnum

NetFileGetInfo

NetGetAnyDCName

NetGetDCName

NetGetDisplayInformationIndex

NetGetJoinableOUs

NetGetJoinInformation

NetGroupAdd

NetGroupAddUser

NetGroupDel

NetGroupDelUser

NetGroupEnum

NetGroupGetInfo

NetGroupGetUsers

NetGroupSetInfo

NetGroupSetUsers

NetJoinDomain

NetLocalGroupAdd

NetLocalGroupAddMember

NetLocalGroupAddMembers

NetLocalGroupDel

NetLocalGroupDelMember

NetLocalGroupDelMembers

NetLocalGroupEnum

NetLocalGroupGetInfo

NetLocalGroupGetMembers

NetLocalGroupSetInfo

NetLocalGroupSetMembers

NetMessageBufferSend

NetMessageNameAdd

NetMessageNameDel

NetMessageNameEnum

NetMessageNameGetInfo

NetQueryDisplayInformation

NetRemoteComputerSupports

NetRemoteTOD

NetRenameMachineInDomain

NetReplExportDirAdd

NetReplExportDirDel

NetReplExportDirEnum

NetReplExportDirGetInfo

NetReplExportDirLock

NetReplExportDirSetInfo

NetReplExportDirUnlock

NetReplGetInfo

NetReplImportDirAdd

NetReplImportDirDel

NetReplImportDirEnum

NetReplImportDirGetInfo

NetReplImportDirLock

NetReplImportDirUnlock

NetReplSetInfo

NetScheduleJobAdd

NetScheduleJobDel

NetScheduleJobEnum

NetScheduleJobGetInfo

NetSecurityGetInfo

NetServerComputerNameAdd

NetServerComputerNameDel

NetServerDiskEnum

NetServerEnum

NetServerGetInfo

NetServerSetInfo

NetServerTransportAdd

NetServerTransportAddEx

NetServerTransportDel

NetServerTransportEnum

NetServiceControl

NetServiceEnum

NetServiceGetInfo

NetServiceInstall

NetSessionDel

NetSessionEnum

NetSessionGetInfo

NetShareAdd

NetShareCheck

NetShareDel

NetShareEnum

NetShareGetInfo

NetShareSetInfo

NetStatisticsGet

NetUnjoinDomain

NetUseAdd

NetUseDel

NetUseEnum

NetUseGetInfo

NetUserAdd

NetUserChangePassword

NetUserDel

NetUserEnum

NetUserGetGroups

NetUserGetInfo

NetUserGetLocalGroups

NetUserModalsGet

NetUserModalsSet

NetUserSetGroups

NetUserSetInfo

NetValidateName

NetWkstaGetInfo

NetWkstaSetInfo

NetWkstaTransportAdd

NetWkstaTransportDel

NetWkstaTransportEnum

NetWkstaUserEnum

NetWkstaUserGetInfo

NetWkstaUserSetInfo

NotifyBootConfigStatus

NotifyChangeEventLog


O Functions

OemKeyScan

OemToChar

OemToCharBuff

OffsetClipRgn

OffsetRect

OffsetRgn

OffsetViewportOrgEx

OffsetWindowOrgEx

OFNHookProc

OFNHookProcOldStyle

OpenBackupEventLog

OpenClipboard

OpenDesktop

OpenEvent

OpenEventLog

OpenFile

OpenFileMapping

OpenIcon

OpenInputDesktop

OpenJobObject

OpenMutex

OpenPrinter

OpenProcess

OpenSCManager

OpenSemaphore

OpenService

OpenThread

OpenWaitableTimer

OpenWindowStation

OutputDebugString

OutputProc


P Functions

PackDDElParam

PagePaintHook

PageSetupDlg

PageSetupHook

PaintDesktop

PaintRgn

PatBlt

PathToRegion

PdhAddCounter

PdhBrowseCounters

PdhCalculateCounterFromRawValue

PdhCloseLog

PdhCloseQuery

PdhCollectQueryData

PdhCollectQueryDataEx

PdhComputeCounterStatistics

PdhConnectMachine

PdhEnumMachines

PdhEnumObjectItems

PdhEnumObjects

PdhExpandCounterPath

PdhExpandWildCardPath

PdhFormatFromRawValue

PdhGetCounterInfo

PdhGetCounterTimeBase

PdhGetDataSourceTimeRange

PdhGetDefaultPerfCounter

PdhGetDefaultPerfObject

PdhGetDllVersion

PdhGetFormattedCounterArray

PdhGetFormattedCounterValue

PdhGetLogFileSize

PdhGetRawCounterArray

PdhGetRawCounterValue

PdhIsRealTimeQuery

PdhLookupPerfIndexByName

PdhLookupPerfNameByIndex

PdhMakeCounterPath

PdhObjectHasInstances

PdhOpenLog

PdhOpenQuery

PdhParseCounterPath

PdhParseInstanceName

PdhReadRawLogRecord

PdhRemoveCounter

PdhSelectDataSource

PdhSetCounterScaleFactor

PdhSetDefaultRealTimeDataSource

PdhSetQueryTimeRange

PdhUpdateLog

PdhUpdateLogFileCatalog

PdhValidatePath

PeekConsoleInput

PeekMessage

PeekNamedPipe

Pie

PlayEnhMetaFile

PlayEnhMetaFileRecord

PlayMetaFile

PlayMetaFileRecord

PlgBlt

PolyBezier

PolyBezierTo

PolyDraw

Polygon

Polyline

PolylineTo

PolyPolygon

PolyPolyline

PolyTextOut

PostMessage

PostQueuedCompletionStatus

PostQuitMessage

PostThreadMessage

PrepareTape

PrintDlg

PrintDlgEx

PrinterProperties

PrintHookProc

PrintWindow

Process32First

Process32Next

PropEnumProc

PropEnumProcEx

PtInRect

PtInRegion

PtVisible

PulseEvent

PurgeComm


Q Functions

QueryDosDevice

QueryInformationJobObject

QueryPerformanceCounter

QueryPerformanceFrequency

QueryRecoveryAgentsOnEncryptedFile

QueryServiceConfig

QueryServiceConfig2

QueryServiceLockStatus

QueryServiceStatus

QueryServiceStatusEx

QueryUsersOnEncryptedFile

QueryWorkingSet

QueueUserAPC

QueueUserWorkItem


R Functions

RaiseException

ReadConsole

ReadConsoleInput

ReadConsoleOutput

ReadConsoleOutputAttribute

ReadConsoleOutputCharacter

ReadDirectoryChangesW

ReadEventLog

ReadFile

ReadFileEx

ReadFileScatter

ReadPrinter

ReadProcessMemory

RealChildWindowFromPoint

RealGetWindowClass

RealizePalette

Rectangle

RectInRegion

RectVisible

RedrawWindow

RegCloseKey

RegConnectRegistry

RegCreateKey

RegCreateKeyEx

RegDeleteKey

RegDeleteValue

RegDisablePredefinedCache

RegEnumKey

RegEnumKeyEx

RegEnumValue

RegFlushKey

RegisterClass

RegisterClassEx

RegisterClipboardFormat

RegisterDeviceNotification

RegisterEventSource

RegisterHotKey

RegisterRawInputDevices

RegisterServiceCtrlHandler

RegisterServiceCtrlHandlerEx

RegisterWaitForSingleObject

RegisterWindowMessage

RegLoadKey

RegNotifyChangeKeyValue

RegOpenCurrentUser

RegOpenKey

RegOpenKeyEx

RegOpenUserClassesRoot

RegOverridePredefKey

RegQueryInfoKey

RegQueryMultipleValues

RegQueryValue

RegQueryValueEx

RegReplaceKey

RegRestoreKey

RegSaveKey

RegSetValue

RegSetValueEx

RegUnLoadKey

ReleaseCapture

ReleaseDC

ReleaseMutex

ReleaseSemaphore

RemoveDirectory

RemoveFontMemResourceEx

RemoveFontResource

RemoveFontResourceEx

RemoveMenu

RemoveProp

RemoveUsersFromEncryptedFile

RemoveVectoredExceptionHandler

ReplaceFile

ReplaceText

ReplyMessage

ReportEvent

ReportFault

RequestWakeupLatency

ResetDC

ResetEvent

ResetPrinter

ResetWriteWatch

ResizePalette

RestoreDC

ResumeThread

ReuseDDElParam

RoundRect


S Functions

SaveDC

ScaleViewportExtEx

ScaleWindowExtEx

ScheduleJob

ScreenToClient

ScriptApplyDigitSubstitution

ScriptApplyLogicalWidth

ScriptBreak

ScriptCacheGetHeight

ScriptCPtoX

ScriptFreeCache

ScriptGetCMap

ScriptGetFontProperties

ScriptGetGlyphABCWidth

ScriptGetLogicalWidths

ScriptGetProperties

ScriptIsComplex

ScriptItemize

ScriptJustify

ScriptLayout

ScriptPlace

ScriptRecordDigitSubstitution

ScriptShape

ScriptString_pcOutChars

ScriptString_pLogAttr

ScriptString_pSize

ScriptStringAnalyse

ScriptStringCPtoX

ScriptStringFree

ScriptStringGetLogicalWidths

ScriptStringGetOrder

ScriptStringOut

ScriptStringValidate

ScriptStringXtoCP

ScriptTextOut

ScriptXtoCP

ScrollConsoleScreenBuffer

ScrollDC

ScrollWindow

ScrollWindowEx

SearchPath

SelectClipPath

SelectClipRgn

SelectObject

SelectPalette

SendAsyncProc

SendDlgItemMessage

SendInput

SendMessage

SendMessageCallback

SendMessageTimeout

SendNotifyMessage

ServiceMain

SetAbortProc

SetActiveWindow

SetArcDirection

SetBitmapBits

SetBitmapDimensionEx

SetBkColor

SetBkMode

SetBoundsRect

SetBrushOrgEx

SetCalendarInfo

SetCapture

SetCaretBlinkTime

SetCaretPos

SetClassLong

SetClassLongPtr

SetClassWord

SetClipboardData

SetClipboardViewer

SetColorAdjustment

SetCommBreak

SetCommConfig

SetCommMask

SetCommState

SetCommTimeouts

SetComputerName

SetComputerNameEx

SetConsoleActiveScreenBuffer

SetConsoleCP

SetConsoleCtrlHandler

SetConsoleCursorInfo

SetConsoleCursorPosition

SetConsoleMode

SetConsoleOutputCP

SetConsoleScreenBufferSize

SetConsoleTextAttribute

SetConsoleTitle

SetConsoleWindowInfo

SetCriticalSectionSpinCount

SetCurrentDirectory

SetCursor

SetCursorPos

SetDCBrushColor

SetDCPenColor

SetDefaultCommConfig

SetDefaultPrinter

SetDIBColorTable

SetDIBits

SetDIBitsToDevice

SetDlgItemInt

SetDlgItemText

SetDoubleClickTime

SetEndOfFile

SetEnhMetaFileBits

SetEnvironmentVariable

SetErrorMode

SetEvent

SetFileApisToANSI

SetFileApisToOEM

SetFileAttributes

SetFilePointer

SetFilePointerEx

SetFileShortName

SetFileTime

SetFileValidData

SetFocus

SetForegroundWindow

SetForm

SetGraphicsMode

SetHandleInformation

SetInformationJobObject

SetJob

SetKeyboardState

SetLastError

SetLastErrorEx

SetLayeredWindowAttributes

SetLayout

SetLocaleInfo

SetLocalTime

SetMailslotInfo

SetMapMode

SetMapperFlags

SetMenu

SetMenuDefaultItem

SetMenuInfo

SetMenuItemBitmaps

SetMenuItemInfo

SetMessageExtraInfo

SetMetaFileBitsEx

SetMetaRgn

SetMiterLimit

SetNamedPipeHandleState

SetPaletteEntries

SetParent

SetPixel

SetPixelV

SetPolyFillMode

SetPort

SetPrinter

SetPrinterData

SetPrinterDataEx

SetPriorityClass

SetProcessAffinityMask

SetProcessDefaultLayout

SetProcessPriorityBoost

SetProcessShutdownParameters

SetProcessWindowStation

SetProcessWorkingSetSize

SetProp

SetRect

SetRectEmpty

SetRectRgn

SetROP2

SetScrollInfo

SetScrollPos

SetScrollRange

SetServiceBits

SetServiceStatus

SetStdHandle

SetStretchBltMode

SetSysColors

SetSystemCursor

SetSystemPaletteUse

SetSystemPowerState

SetSystemTime

SetSystemTimeAdjustment

SetTapeParameters

SetTapePosition

SetTextAlign

SetTextCharacterExtra

SetTextColor

SetTextJustification

SetThreadAffinityMask

SetThreadContext

SetThreadDesktop

SetThreadExecutionState

SetThreadIdealProcessor

SetThreadLocale

SetThreadPriority

SetThreadPriorityBoost

SetTimer

SetTimeZoneInformation

SetUnhandledExceptionFilter

SetupComm

SetupDiCreateDeviceInfoList

SetupDiCreateDeviceInfoListEx

SetupDiCreateDeviceInterfaceRegKey

SetupDiDeleteDeviceInterfaceData

SetupDiDeleteDeviceInterfaceRegKey

SetupDiDestroyDeviceInfoList

SetupDiEnumDeviceInterfaces

SetupDiGetClassDevs

SetupDiGetClassDevsEx

SetupDiGetDeviceInterfaceAlias

SetupDiGetDeviceInterfaceDetail

SetupDiOpenClassRegKeyEx

SetupDiOpenDeviceInterface

SetupDiOpenDeviceInterfaceRegKey

SetupHookProc

SetUserFileEncryptionKey

SetUserGeoID

SetUserObjectInformation

SetViewportExtEx

SetViewportOrgEx

SetVolumeLabel

SetVolumeMountPoint

SetWaitableTimer

SetWindowExtEx

SetWindowLong

SetWindowLongPtr

SetWindowOrgEx

SetWindowPlacement

SetWindowPos

SetWindowRgn

SetWindowsHookEx

SetWindowText

SetWinMetaFileBits

SetWorldTransform

ShellProc

ShowCaret

ShowCursor

ShowOwnedPopups

ShowScrollBar

ShowWindow

ShowWindowAsync

SignalObjectAndWait

SizeofResource

Sleep

SleepEx

StartDoc

StartDocPrinter

StartPage

StartPagePrinter

StartService

StartServiceCtrlDispatcher

STM_GETICON

STM_GETIMAGE

STM_SETICON

STM_SETIMAGE

STN_CLICKED

STN_DBLCLK

STN_DISABLE

STN_ENABLE

StretchBlt

StretchDIBits

StrokeAndFillPath

StrokePath

SubtractRect

SuspendThread

SwapMouseButton

SwitchDesktop

SwitchToFiber

SwitchToThread

SysMsgProc

SystemParametersInfo

SystemTimeToFileTime

SystemTimeToTzSpecificLocalTime


T Functions

TabbedTextOut

TerminateJobObject

TerminateProcess

TerminateThread

TextOut

Thread32First

Thread32Next

ThreadProc

TileWindows

TimeProvClose

TimeProvCommand

TimeProvOpen

TimerAPCProc

TimerProc

TlsAlloc

TlsFree

TlsGetValue

TlsSetValue

ToAscii

ToAsciiEx

Toolhelp32ReadProcessMemory

ToUnicode

ToUnicodeEx

TrackMouseEvent

TrackPopupMenu

TrackPopupMenuEx

TransactNamedPipe

TranslateAccelerator

TranslateCharsetInfo

TranslateMDISysAccel

TranslateMessage

TranslateName

TransmitCommChar

TransparentBlt

TryEnterCriticalSection

TzSpecificLocalTimeToSystemTime


U Functions

UInt32x32To64

UnhandledExceptionFilter

UnhookWindowsHookEx

UnionRect

UnloadKeyboardLayout

UnloadUserProfile

UnlockFile

UnlockFileEx

UnlockServiceDatabase

UnmapViewOfFile

UnpackDDElParam

UnrealizeObject

UnregisterClass

UnregisterDeviceNotification

UnregisterHotKey

UnregisterWait

UnregisterWaitEx

UpdateColors

UpdateLayeredWindow

UpdateResource

UpdateWindow

UserHandleGrantAccess


V Functions

ValidateRect

ValidateRgn

VectoredHandler

VerFindFile

VerifyVersionInfo

VerInstallFile

VerLanguageName

VerQueryValue

VerSetConditionMask

VirtualAlloc

VirtualAllocEx

VirtualFree

VirtualFreeEx

VirtualLock

VirtualProtect

VirtualProtectEx

VirtualQuery

VirtualQueryEx

VirtualUnlock

VkKeyScan

VkKeyScanEx


W Functions

WaitCommEvent

WaitForDebugEvent

WaitForInputIdle

WaitForMultipleObjects

WaitForMultipleObjectsEx

WaitForSingleObject

WaitForSingleObjectEx

WaitMessage

WaitNamedPipe

WaitOrTimerCallback

WideCharToMultiByte

WidenPath

WindowFromDC

WindowFromPoint

WindowProc

WinExec

WinMain

WM_CTLCOLORSTATIC

WriteConsole

WriteConsoleInput

WriteConsoleOutput

WriteConsoleOutputAttribute

WriteConsoleOutputCharacter

WriteFile

WriteFileEx

WriteFileGather

WritePrinter

WritePrivateProfileSection

WritePrivateProfileString

WritePrivateProfileStruct

WriteProcessMemory

WriteProfileSection

WriteProfileString

WriteTapemark

wsprintf

wvsprintf


Z Functions

ZeroMemory


Functions by Release

The following topics provide a list of the Win32® API functions in the order in which they were released. For a list of functions in alphabetical order, see Functions in Alphabetical Order. For a list of functions by category, see Functions By Category.

  • Whistler
  • 64-bit Windows
  • Windows 2000
  • Windows NT 4.0 SP6
  • Windows NT 4.0 SP4
  • Windows NT 4.0 SP3
  • Windows NT 4.0 SP2
  • Windows NT 4.0
  • Windows NT 3.51 SP3
  • Windows NT 3.51
  • Windows NT 3.5
  • Windows NT 3.1


Whistler

The following Win32® API functions were introduced in this release.

AddVectoredExceptionhandler
AlertSamplesAvail
BroadcastSystemMessageEx
DebugActiveProcessStop
DebugSetProcessKillOnExit
EnumSystemGeoID
GetGeoInfo
GetLayeredWindowAttributes
GetRawInputBuffer
GetRawInputData
GetRawInputDeviceInfo
GetRawInputDeviceList
GetRegisteredRawInputDevices
GetSystemWow64Directory
GetTimeSysInfo
GetUserGeoID
GetVolumePathNamesForVolumeName
GetWindowRgnBox
InitializeSListHead
InterlockedFlushSList
InterlockedPopEntrySList
InterlockedPushEntrySList
IsGUIThread
IsProcessInJob
LogTimeProvEvent
MiniDumpReadDumpStream
MiniDumpWriteDump
PrintWindow
RegisterRawInputDevices
RemoveVectoredExceptionHandler
ReportFault
SetFileShortName
SetFileValidData
SetUserGeoID
TzSpecificLocalTimeToSystemTime

The following interfaces were introduced in this release.

IBidiRequest
IBidiRequestContainer
IBidiSpl

The following IOCTLs were introduced in this release.

FSCTL_READ_FROM_PLEX
IOCTL_CHANGER_EXCHANGE_MEDIUM
IOCTL_CHANGER_GET_ELEMENT_STATUS
IOCTL_CHANGER_GET_PARAMETERS
IOCTL_CHANGER_GET_PRODUCT_DATA
IOCTL_CHANGER_GET_STATUS
IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS
IOCTL_CHANGER_MOVE_MEDIUM
IOCTL_CHANGER_QUERY_VOLUME_TAGS
IOCTL_CHANGER_REINITIALIZE_TRANSPORT
IOCTL_CHANGER_SET_ACCESS
IOCTL_CHANGER_SET_POSITION
IOCTL_DISK_CREATE_DISK
IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
IOCTL_DISK_GET_DRIVE_LAYOUT_EX
IOCTL_DISK_GET_LENGTH_INFO
IOCTL_DISK_GET_PARTITION_INFO_EX
IOCTL_DISK_SET_DRIVE_LAYOUT_EX
IOCTL_DISK_SET_PARTITION_INFO_EX
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
IOCTL_VOLUME_IS_CLUSTERED


64-bit Windows

The following functions, structures, and callback functions were modified to use new data types in support of 64-bit Windows. Therefore, you can develop applications for both 32- and 64-bit Windows using the information in the documentation. For more information, see The New Data Types.

AllocateUserPhysicalPages
APCProc
AppendMenu
CCHookProc
CFHookProc
COMPAREITEMSTRUCT
CONVINFO
COPYDATASTRUCT
CopyMemory
CounterPathCallBack
CreateIoCompletionPort
DdeCallback
DDEML_MSG_HOOK_DATA
DdeSetUserHandle
DELETEITEMSTRUCT
DialogBox
DialogBoxIndirect
DialogBoxIndirectParam
DialogProc
DRAWITEMSTRUCT
EDITSTREAM
EditStreamCallback
EndDialog
EnumLanguageGroupLocales
EnumLanguageGroupLocalesProc
EnumLanguageGroupsProc
EnumResLangProc
EnumResNameProc
EnumResourceLanguages
EnumResourceNames
EnumResourceTypes
EnumResTypeProc
EnumSystemLanguageGroups
EnumUILanguages
EnumUILanguagesProc
EXCEPTION_RECORD
EXTLOGPEN
FillMemory
FlushViewOfFile
FRHookProc
GetWriteWatch
GlobalAlloc
GlobalReAlloc
Heap32First
HeapAlloc
HeapCreate
HEAPENTRY32
HEAPLIST32
HeapReAlloc
InsertMenu
IsBadReadPtr
IsBadStringPtr
IsBadWritePtr
JOBOBJECT_BASIC_LIMIT_INFORMATION
JOBOBJECT_BASIC_PROCESS_ID_LIST
JOBOBJECT_EXTENDED_LIMIT_INFORMATION
KBDLLHOOKSTRUCT
keybd_event
KEYBDINPUT
KillTimer
LocalAlloc
LocalReAlloc
MapUserPhysicalPages
MapUserPhysicalPagesScatter
MapViewOfFile
MapViewOfFileEx
MEASUREITEMSTRUCT
MEMORY_BASIC_INFORMATION
MEMORYSTATUS
MENUINFO
MENUITEMINFO
ModifyMenu
MONCBSTRUCT
mouse_event
MOUSEHOOKSTRUCT
MOUSEINPUT
MOUSEMOVEPOINT
MoveMemory
MSGBOXPARAMS
MSLLHOOKSTRUCT
OFNHookProc
OFNHookProcOldStyle
OVERLAPPED
PackDDElParam
PagePaintHook
PageSetupHook
PDH_BROWSE_DLG_CONFIG
PDH_COUNTER_INFO
PdhAddCounter
PdhOpenQuery
PostQueuedCompletionStatus
PrintHookProc
PROCESS_MEMORY_COUNTERS
PROCESSENTRY32
PropEnumProcEx
QueryWorkingSet
QueueUserAPC
RaiseException
REPASTESPECIAL
ResetWriteWatch
ReuseWriteWatch
ReuseDDElParam
SendAsyncProc
SendMessageCallback
SetProcessAffinityMask
SetProcessWorkingSetSize
SetThreadAffinityMask
SetTimer
SetupHookProc
SP_DEVICE_INTERFACE_DATA
SP_DEVINFO_DATA
StatusRoutine
SYSTEM_INFO
TimerProc
VALENT
VirtualAlloc
VirtualAllocEx
VirtualFree
VirtualFreeEx
VirtualLock
VirtualProtect
VirtualProtectEx
VirtualQuery
VirtualQueryEx
VirtualUnlock
ZeroMemory

The following sections list the constants and functions that have been added or made obsolete.

Obsolete Constants

GWL_WNDPROC
GWL_HINSTANCE
GWL_HWNDPARENT
GWL_USERDATA

GCL_MENUNAME
GCL_HBRBACKGROUND
GCL_HCURSOR
GCL_HICON
GCL_HMODULE
GCL_WNDPROC
GCL_HICONSM

DWL_MSGRESULT
DWL_DLGPROC
DWL_USER

New Constants

GWLP_WNDPROC
GWLP_HINSTANCE
GWLP_HWNDPARENT
GWLP_USERDATA
GWLP_ID

GCLP_MENUNAME
GCLP_HBRBACKGROUND
GCLP_HCURSOR
GCLP_HICON
GCLP_HMODULE
GCLP_WNDPROC
GCLP_HICONSM

DWLP_MSGRESULT
DWLP_DLGPROC
DWLP_USER

New Functions

GetClassLongPtr
GetWindowLongPtr
SetClassLongPtr
SetWindowLongPtr


Windows 2000

The following Win32® API functions were introduced in this release.

AddFontMemResourceEx
AddFontResourceEx
AddPrinterDriverEx
AddUsersToEncryptedFile
AllocateUserPhysicalPages
AllowSetForegroundWindow
AlphaBlend
AnimateWindow
AssignProcessToJobObject
BindIoCompletionCallback
BlockInput
ChangeDisplaySettingsEx
ChangeServiceConfig2
ChangeTimerQueueTimer
CreateFontIndirectEx
CreateHardLink
CreateJobObject
CreateProcessWithLogonW
CreateTimerQueue
CreateTimerQueueTimer
DecryptFile
DeletePrinterDataEx
DeletePrinterDriverEx
DeletePrinterKey
DeleteProfile
DeleteTimerQueue
DeleteTimerQueueEx
DeleteTimerQueueTimer
DeleteVolumeMountPoint
DnsHostnameToComputerName
EncryptFile
EncryptionDisable
EndMenu
EnumCalendarInfoEx
EnumDateFormatsEx
EnumDisplayDevices
EnumDisplayMonitors
EnumDisplaySettingsEx
EnumInputContext
EnumLanguageGroupLocales
EnumPrinterDataEx
EnumPrinterKey
EnumServicesStatusEx
EnumSystemLanguageGroups
EnumUILanguages
ExpandEnvironmentStringsForUser
FileEncryptionStatus
FindFirstVolume
FindFirstVolumeMountPoint
FindNextVolume
FindNextVolumeMountPoint
FindVolumeClose
FindVolumeMountPointClose
FlashWindowEx
FlushPrinter
FreeEncryptionCertificateHashList
FreeUserPhysicalPages
GetAllUsersProfileDirectory
GetCalendarInfo
GetCharABCWidthsI
GetCharWidthI
GetClipboardSequenceNumber
GetComputerNameEx
GetComputerObjectName
GetCPInfoEx
GetCursorInfo
GetDCBrushColor
GetDCPenColor
GetDefaultPrinter
GetDefaultUserProfileDirectory
GetDevicePowerState
GetEventLogInformation
GetFileSizeEx
GetFontUnicodeRanges
GetGlyphIndices
GetGuiResources
GetLastInputInfo
GetLayout
GetLongPathName
GetMenuInfo
GetMonitorInfo
GetMouseMovePointsEx
GetPrinterDataEx
GetProcessDefaultLayout
GetProcessIoCounters
GetProfileType
GetSystemDefaultUILanguage
GetSystemPowerStatus
GetTextExtentExPointI
GetTextExtentPointI
GetUserDefaultUILanguage
GetUserNameEx
GetVolumeNameForVolumeMountPoint
GetVolumePathName
GlobalMemoryStatusEx
GradientFill
ImmAssociateContextEx
ImmDisableIME
ImmEnumInputContext
ImmGetImeMenuItems
InitiateSystemShutdownEx
InSendMessageEx
IsSystemResumeAutomatic
IsValidLanguageGroup
LockSetForegroundWindow
LockWorkStation
MapUserPhysicalPages
MapUserPhysicalPagesScatter
MonitorFromPoint
MonitorFromRect
MonitorFromWindow
MoveFileWithProgress
OpenJobObject
OpenThread
PdhCloseLog
PdhCollectQueryDataEx
PdhExpandWildCardPath
PdhFormatFromRawValue
PdhGetCounterTimeBase
PdhGetDataSourceTimeRange
PdhGetFormattedCounterArray
PdhGetLogFileSize
PdhGetRawCounterArray
PdhIsRealTimeQuery
PdhLookupPerfIndexByName
PdhLookupPerfNameByIndex
PdhObjectHasInstances
PdhOpenLog
PdhReadRawLogRecord
PdhSelectDataSource
PdhSetDefaultRealTimeDataSource
PdhSetQueryTimeRange
PdhUpdateLog
PdhUpdateLogFileCatalog
PrintDlgEx
QueryInformationJobObject
QueryRecoveryAgentsOnEncryptedFile
QueryServiceConfig2
QueryServiceStatusEx
QueryUsersOnEncryptedFile
QueueUserWorkItem
RegDisablePredefinedCache
RegisterDeviceNotification
RegisterServiceCtrlHandlerEx
RegisterWaitForSingleObject
RegOpenCurrentUser
RegOpenUserClassesRoot
RegOverridePredefKey
RemoveFontMemResourceEx
RemoveFontResourceEx
RemoveUsersFromEncryptedFile
ReplaceFile
RequestWakeupLatency
ScriptApplyDigitSubstitution
ScriptApplyLogicalWidth
ScriptBreak
ScriptCacheGetHeight
ScriptCPtoX
ScriptFreeCache
ScriptGetCMap
ScriptGetFontProperties
ScriptGetGlyphABCWidth
ScriptGetLogicalWidths
ScriptGetProperties
ScriptIsComplex
ScriptItemize
ScriptJustify
ScriptLayout
ScriptPlace
ScriptRecordDigitSubstitution
ScriptShape
ScriptString_pcOutChars
ScriptString_pLogAttr
ScriptString_pSize
ScriptStringAnalyse
ScriptStringCPtoX
ScriptStringFree
ScriptStringGetLogicalWidths
ScriptStringGetOrder
ScriptStringOut
ScriptStringValidate
ScriptStringXtoCP
ScriptTextOut
ScriptXtoCP
SetCalendarInfo
SetComputerNameEx
SetDCBrushColor
SetDCPenColor
SetDefaultPrinter
SetFilePointerEx
SetInformationJobObject
SetLayeredWindowAttributes
SetLayout
SetMenuInfo
SetPrinterDataEx
SetProcessDefaultLayout
SetSystemPowerState
SetThreadExecutionState
SetupDiCreateDeviceInfoList
SetupDiCreateDeviceInfoListEx
SetupDiCreateDeviceInterfaceRegKey
SetupDiDeleteDeviceInterfaceData
SetupDiDeleteDeviceInterfaceRegKey
SetupDiDestroyDeviceInfoList
SetupDiEnumDeviceInterfaces
SetupDiGetClassDevs
SetupDiGetClassDevsEx
SetupDiGetDeviceInterfaceAlias
SetupDiGetDeviceInterfaceDetail
SetupDiOpenClassRegKeyEx
SetupDiOpenDeviceInterface
SetupDiOpenDeviceInterfaceRegKey
SetUserFileEncryptionKey
SetVolumeMountPoint
SfcGetNextProtectedFile
SfcIsFileProtected
TerminateJobObject
TouchFileTimes
TranslateName
TransparentBlt
UnregisterDeviceNotification
UnregisterWait
UnregisterWaitEx
UpdateLayeredWindow
UserHandleGrantAccess
VerifyVersionInfo
VerSetConditionMask

The following IOCTLs were introduced in this release.

FSCTL_ALLOW_EXTENDED_DASD_IO
FSCTL_CREATE_OR_GET_OBJECT_ID
FSCTL_CREATE_USN_JOURNAL
FSCTL_DELETE_OBJECT_ID
FSCTL_DELETE_REPARSE_POINT
FSCTL_DELETE_USN_JOURNAL
FSCTL_ENUM_USN_DATA
FSCTL_GET_HFS_INFORMATION
FSCTL_GET_OBJECT_ID
FSCTL_GET_REPARSE_POINT
FSCTL_GET_RETRIEVAL_POINTERS
FSCTL_GET_VOLUME_BITMAP
FSCTL_MARK_HANDLE
FSCTL_MOVE_FILE
FSCTL_OPBATCH_ACK_CLOSE_PENDING
FSCTL_OPLOCK_BREAK_ACK_NO_2
FSCTL_OPLOCK_BREAK_ACKNOWLEDGE
FSCTL_OPLOCK_BREAK_NOTIFY
FSCTL_QUERY_ALLOCATED_RANGES
FSCTL_QUERY_USN_JOURNAL
FSCTL_READ_USN_JOURNAL
FSCTL_RECALL_FILE
FSCTL_REQUEST_BATCH_OPLOCK
FSCTL_REQUEST_FILTER_OPLOCK
FSCTL_REQUEST_OPLOCK_LEVEL_1
FSCTL_REQUEST_OPLOCK_LEVEL_2
FSCTL_SET_OBJECT_ID
FSCTL_SET_OBJECT_ID_EXTENDED
FSCTL_SET_REPARSE_POINT
FSCTL_SET_SPARSE
FSCTL_SET_ZERO_DATA
FSCTL_WRITE_USN_CLOSE_RECORD
IOCTL_BATTERY_QUERY_INFORMATION
IOCTL_BATTERY_QUERY_STATUS
IOCTL_BATTERY_QUERY_TAG
IOCTL_BATTERY_SET_INFORMATION


Windows NT 4.0 SP6

The following Win32® API functions were introduced in this release.

GetAltTabInfo
GetComboBoxInfo
GetCursorInfo
GetListBoxInfo
GetMenuBarInfo
GetScrollBarInfo
GetTitleBarInfo


Windows NT 4.0 SP4

The following Win32® API functions were introduced in this release.

GetAncestor
RealChildWindowFromPoint
RealGetWindowClass


Windows NT 4.0 SP3

The following Win32® API functions were introduced in this release.

GetGUIThreadInfo
GetWindowInfo
GetWindowModuleFileName
InitializeCriticalSectionAndSpinCount
SendInput
SetCriticalSectionSpinCount


Windows NT 4.0 SP2

The following Win32® API functions were introduced in this release.

ReadFileScatter
WriteFileGather


Windows NT 4.0

The following Win32® API functions were introduced in this release.

BroadcastSystemMessage
CancelIo
CancelWaitableTimer
CascadeWindows
CharNextExA
CharPrevExA
CheckMenuRadioItem
ChildWindowFromPointEx
CopyFileEx
CreateEnvironmentBlock
CreateIconFromResourceEx
CreateWaitableTimer
DeletePrinterData
DestroyEnvironmentBlock
DragDetect
DrawAnimatedRects
DrawCaption
DrawState
DrawTextEx
EmptyWorkingSet
EnumDeviceDrivers
EnumFontFamiliesEx
EnumPrinterData
EnumProcesses
EnumProcessModules
ExtractIconEx
FindFirstFileEx
FindWindowEx
GetCharacterPlacement
GetCommConfig
GetCurrentHwProfile
GetDefaultCommConfig
GetDeviceDriverBaseName
GetDeviceDriverFileName
GetDiskFreeSpaceEx
GetFileAttributesEx
GetFontLanguageInfo
GetKeyboardLayout
GetKeyboardLayoutList
GetMappedFileName
GetMenuDefaultItem
GetMenuItemInfo
GetMenuItemRect
GetModuleBaseName
GetModuleFileNameEx
GetModuleInformation
GetProcessMemoryInfo
GetProcessPriorityBoost
GetProfilesDirectory
GetThreadPriorityBoost
GetUserProfileDirectory
GetWsChanges
ImmAssociateContext
ImmConfigureIME
ImmCreateContext
ImmDestroyContext
ImmEnumRegisterWord
ImmEscape
ImmGetCandidateList
ImmGetCandidateListCount
ImmGetCandidateWindow
ImmGetCompositionFont
ImmGetCompositionString
ImmGetCompositionWindow
ImmGetContext
ImmGetConversionList
ImmGetConversionStatus
ImmGetDefaultIMEWnd
ImmGetDescription
ImmGetGuideLine
ImmGetIMEFileName
ImmGetOpenStatus
ImmGetProperty
ImmGetRegisterWordStyle
ImmGetStatusWindowPos
ImmGetVirtualKey
ImmInstallIME
ImmIsIME
ImmIsUIMessage
ImmNotifyIME
ImmRegisterWord
ImmReleaseContext
ImmSetCandidateWindow
ImmSetCompositionFont
ImmSetCompositionString
ImmSetCompositionWindow
ImmSetConversionStatus
ImmSetOpenStatus
ImmSetStatusWindowPos
ImmSimulateHotKey
ImmUnregisterWord
InitializeProcessForWsWatch
InsertMenuItem
InterlockedCompareExchange
InterlockedCompareExchangePointer
InterlockedExchangeAdd
IsDebuggerPresent
IsProcessorFeaturePresent
LoadImage
LoadUserProfile
LookupIconIdFromDirectoryEx
MapVirtualKeyEx
MenuItemFromPoint
MessageBoxIndirect
MsgWaitForMultipleObjectsEx
OpenWaitableTimer
PaintDesktop
PdhAddCounter
PdhBrowseCounters
PdhCalculateCounterFromRawValue
PdhCloseQuery
PdhCollectQueryData
PdhComputeCounterStatistics
PdhConnectMachine
PdhEnumMachines
PdhEnumObjectItems
PdhEnumObjects
PdhExpandCounterPath
PdhGetCounterInfo
PdhGetDefaultPerfCounter
PdhGetDefaultPerfObject
PdhGetDllVersion
PdhGetFormattedCounterValue
PdhGetRawCounterValue
PdhMakeCounterPath
PdhOpenQuery
PdhParseCounterPath
PdhParseInstanceName
PdhRemoveCounter
PdhSetCounterScaleFactor
PdhValidatePath
PdhVbAddCounter
PdhVbCreateCounterPathList
PdhVbGetCounterPathElements
PdhVbGetCounterPathFromList
PdhVbGetDoubleCounterValue
PdhVbGetOneCounterPath
PdhVbIsGoodStatus
PdhVbOpenQuery
QueryWorkingSet
QueueUserAPC
RegisterClassEx
SetCommConfig
SetDefaultCommConfig
SetMenuDefaultItem
SetMenuItemInfo
SetPort
SetProcessAffinityMask
SetProcessPriorityBoost
SetThreadIdealProcessor
SetThreadPriorityBoost
SetWaitableTimer
ShowWindowAsync
SignalObjectAndWait
SwitchToThread
TileWindows
ToAsciiEx
ToUnicodeEx
TrackMouseEvent
TrackPopupMenuEx
TranslateCharsetInfo
TryEnterCriticalSection
UnloadUserProfile
VirtualAllocEx
VirtualFreeEx
VkKeyScanEx

The following IOCTLs were introduced in this release.

IOCTL_STORAGE_CHECK_VERIFY
IOCTL_STORAGE_EJECT_MEDIA
IOCTL_STORAGE_GET_MEDIA_TYPES
IOCTL_STORAGE_LOAD_MEDIA
IOCTL_STORAGE_MEDIA_REMOVAL


Windows NT 3.51 SP3

The following Win32® API functions were introduced in this release.

ConvertThreadToFiber
CreateFiber
DeleteFiber
ReadDirectoryChangesW
SwitchToFiber


Windows NT 3.51

The following Win32® API functions were introduced in this release.

AddForm
AddPrinterConnection
CloseDesktop
CloseWindowStation
CommConfigDialog
CreateDesktop
CreateProcessAsUser
CreateWindowStation
DrawEdge
DrawFrameControl
EnumDesktops
EnumDesktopWindows
EnumDisplaySettings
EnumWindowStations
GetHandleInformation
GetProcessVersion
GetScrollInfo
GetSysColorBrush
GetTextCharsetInfo
GetUserObjectInformation
GetWindowRgn
IsDBCSLeadByteEx
OpenDesktop
OpenInputDesktop
OpenWindowStation
PageSetupDlg
PostQueuedCompletionStatus
SetHandleInformation
SetMessageExtraInfo
SetProcessWindowStation
SetScrollInfo
SetThreadDesktop
SetUserObjectInformation
SetWindowRgn
SwitchDesktop

The following IOCTLs were introduced in this release.

FSCTL_GET_COMPRESSION
FSCTL_SET_COMPRESSION


Windows NT 3.5

The following Win32® API functions were introduced in this release.

ChangeDisplaySettings
CommandLineToArgvW
ConnectToPrinterDlg
ConvertDefaultLocale
CopyImage
CreateDirectoryEx
CreateIoCompletionPort
DisableThreadLibraryCalls
DrawIconEx
DuplicateIcon
EnumCalendarInfo
EnumDateFormats
EnumPrintProcessorDatatypes
EnumSystemCodePages
EnumSystemLocales
EnumTimeFormats
ExtractAssociatedIcon
FindClosePrinterChangeNotification
FindFirstPrinterChangeNotification
FindNextPrinterChangeNotification
FreeEnvironmentStrings
FreeLibraryAndExitThread
GetBinaryType
GetCharWidth32
GetClassInfoEx
GetCurrencyFormat
GetDateFormat
GetDCOrgEx
GetDIBColorTable
GetNumberFormat
GetProcessAffinityMask
GetProcessHeaps
GetProcessTimes
GetProcessWorkingSetSize
GetQueuedCompletionStatus
GetServiceDisplayName
GetServiceKeyName
GetShortPathName
GetStringTypeA
GetStringTypeEx
GetSystemTimeAdjustment
GetSystemTimeAsFileTime
GetTextCharset
GetTextExtentPoint32
GetThreadTimes
GetTimeFormat
GetVersionEx
HeapCompact
HeapLock
HeapUnlock
HeapValidate
HeapWalk
InterlockedExchange
InterlockedExchangePointer
IsTextUnicode
IsValidLocale
LoadCursorFromFile
lstrcpyn
NotifyBootConfigStatus
NotifyChangeEventLog
RegQueryMultipleValues
ResetPrinter
SetDIBColorTable
SetFileApisToANSI
SetLocaleInfo
SetProcessWorkingSetSize
SetServiceBits
SetSystemCursor
SetSystemTimeAdjustment
SetThreadAffinityMask
SetUnhandledExceptionFilter
SubtractRect
SystemTimeToTzSpecificLocalTime

The following IOCTLs were introduced in this release.

FSCTL_DISMOUNT_VOLUME
FSCTL_LOCK_VOLUME
FSCTL_QUERY_FAT_BPB
FSCTL_QUERY_FAT_BPB_BUFFER
FSCTL_UNLOCK_VOLUME


Windows NT 3.1

The following Win32® API functions were introduced in this release.

_hread
_hwrite
_lclose
_lcreat
_llseek
_lopen
_lread
_lwrite
AbortDoc
AbortPath
AbortPrinter
AbortSystemShutdown
ActivateKeyboardLayout
AddAtom
AddFontResource
AddJob
AddMonitor
AddPort
AddPrinter
AddPrinterDriver
AddPrintProcessor
AddPrintProvidor
AdjustWindowRect
AdjustWindowRectEx
AdvancedDocumentProperties
AllocConsole
AngleArc
AnimatePalette
AnyPopup
AppendMenu
Arc
ArcTo
AreFileApisANSI
ArrangeIconicWindows
AttachThreadInput
BackupEventLog
BackupRead
BackupSeek
BackupWrite
Beep
BeginDeferWindowPos
BeginPaint
BeginPath
BeginUpdateResource
BitBlt
BringWindowToTop
BuildCommDCB
BuildCommDCBAndTimeouts
CallMsgFilter
CallNamedPipe
CallNextHookEx
CallWindowProc
CancelDC
ChangeClipboardChain
ChangeServiceConfig
CharLower
CharLowerBuff
CharNext
CharPrev
CharToOem
CharToOemBuff
CharUpper
CharUpperBuff
CheckDlgButton
CheckMenuItem
CheckRadioButton
ChildWindowFromPoint
ChooseColor
ChooseFont
Chord
ClearCommBreak
ClearCommError
ClearEventLog
ClientToScreen
ClipCursor
CloseClipboard
CloseEnhMetaFile
CloseEventLog
CloseFigure
CloseHandle
CloseMetaFile
ClosePrinter
CloseServiceHandle
CloseWindow
CombineRgn
CombineTransform
CommDlgExtendedError
CompareFileTime
CompareString
ConfigurePort
ConnectNamedPipe
ContinueDebugEvent
ControlService
CopyAcceleratorTable
CopyCursor
CopyEnhMetaFile
CopyFile
CopyIcon
CopyMetaFile
CopyRect
CountClipboardFormats
CreateAcceleratorTable
CreateBitmap
CreateBitmapIndirect
CreateBrushIndirect
CreateCaret
CreateCompatibleBitmap
CreateCompatibleDC
CreateConsoleScreenBuffer
CreateCursor
CreateDC
CreateDialog
CreateDialogIndirect
CreateDialogIndirectParam
CreateDialogParam
CreateDIBitmap
CreateDIBPatternBrush
CreateDIBPatternBrushPt
CreateDIBSection
CreateDirectory
CreateDiscardableBitmap
CreateEllipticRgn
CreateEllipticRgnIndirect
CreateEnhMetaFile
CreateEvent
CreateFile
CreateFileMapping
CreateFont
CreateFontIndirect
CreateHalftonePalette
CreateHatchBrush
CreateIC
CreateIcon
CreateIconFromResource
CreateIconIndirect
CreateMailslot
CreateMDIWindow
CreateMenu
CreateMetaFile
CreateMutex
CreateNamedPipe
CreatePalette
CreatePatternBrush
CreatePen
CreatePenIndirect
CreatePipe
CreatePolygonRgn
CreatePolyPolygonRgn
CreatePopupMenu
CreateProcess
CreateRectRgn
CreateRectRgnIndirect
CreateRemoteThread
CreateRoundRectRgn
CreateScalableFontResource
CreateSemaphore
CreateService
CreateSolidBrush
CreateTapePartition
CreateThread
CreateWindow
CreateWindowEx
DdeAbandonTransaction
DdeAccessData
DdeAddData
DdeClientTransaction
DdeCmpStringHandles
DdeConnect
DdeConnectList
DdeCreateDataHandle
DdeCreateStringHandle
DdeDisconnect
DdeDisconnectList
DdeEnableCallback
DdeFreeDataHandle
DdeFreeStringHandle
DdeGetData
DdeGetLastError
DdeImpersonateClient
DdeInitialize
DdeKeepStringHandle
DdeNameService
DdePostAdvise
DdeQueryConvInfo
DdeQueryNextServer
DdeQueryString
DdeReconnect
DdeSetQualityOfService
DdeSetUserHandle
DdeUnaccessData
DdeUninitialize
DebugActiveProcess
DebugBreak
DefDlgProc
DeferWindowPos
DefFrameProc
DefineDosDevice
DefMDIChildProc
DefWindowProc
DeleteAtom
DeleteCriticalSection
DeleteDC
DeleteEnhMetaFile
DeleteFile
DeleteForm
DeleteMenu
DeleteMetaFile
DeleteMonitor
DeleteObject
DeletePort
DeletePrinter
DeletePrinterConnection
DeletePrinterDriver
DeletePrintProcessor
DeletePrintProvidor
DeleteService
DeregisterEventSource
DestroyAcceleratorTable
DestroyCaret
DestroyCursor
DestroyIcon
DestroyMenu
DestroyWindow
DeviceCapabilities
DeviceIoControl
DialogBox
DialogBoxIndirect
DialogBoxIndirectParam
DialogBoxParam
DisconnectNamedPipe
DispatchMessage
DlgDirList
DlgDirListComboBox
DlgDirSelectComboBoxEx
DlgDirSelectEx
DocumentProperties
DosDateTimeToFileTime
DPtoLP
DrawEscape
DrawFocusRect
DrawIcon
DrawMenuBar
DrawText
DuplicateHandle
Ellipse
EmptyClipboard
EnableMenuItem
EnableScrollBar
EnableWindow
EndDeferWindowPos
EndDialog
EndDoc
EndDocPrinter
EndPage
EndPagePrinter
EndPaint
EndPath
EndUpdateResource
EnterCriticalSection
EnumChildWindows
EnumClipboardFormats
EnumDependentServices
EnumEnhMetaFile
EnumFontFamilies
EnumFonts
EnumForms
EnumJobs
EnumMetaFile
EnumMonitors
EnumObjects
EnumPorts
EnumPrinterDrivers
EnumPrinters
EnumPrintProcessors
EnumProps
EnumPropsEx
EnumResourceLanguages
EnumResourceNames
EnumResourceTypes
EnumServicesStatus
EnumThreadWindows
EnumWindows
EqualRect
EqualRgn
EraseTape
Escape
EscapeCommFunction
ExcludeClipRect
ExcludeUpdateRgn
ExitProcess
ExitThread
ExitWindows
ExitWindowsEx
ExpandEnvironmentStrings
ExtCreatePen
ExtCreateRegion
ExtEscape
ExtFloodFill
ExtractIcon
ExtSelectClipRgn
ExtTextOut
FatalAppExit
FatalExit
FileTimeToDosDateTime
FileTimeToLocalFileTime
FileTimeToSystemTime
FillConsoleOutputAttribute
FillConsoleOutputCharacter
FillPath
FillRect
FillRgn
FindAtom
FindClose
FindCloseChangeNotification
FindFirstChangeNotification
FindFirstFile
FindNextChangeNotification
FindNextFile
FindResource
FindResourceEx
FindText
FindWindow
FlashWindow
FlattenPath
FloodFill
FlushConsoleInputBuffer
FlushFileBuffers
FlushInstructionCache
FlushViewOfFile
FoldString
FormatMessage
FrameRect
FrameRgn
FreeConsole
FreeDDElParam
FreeLibrary
FreePrinterNotifyInfo
GdiComment
GdiFlush
GdiGetBatchLimit
GdiSetBatchLimit
GenerateConsoleCtrlEvent
GetACP
GetActiveWindow
GetArcDirection
GetAspectRatioFilterEx
GetAsyncKeyState
GetAtomName
GetBitmapBits
GetBitmapDimensionEx
GetBkColor
GetBkMode
GetBoundsRect
GetBrushOrgEx
GetCapture
GetCaretBlinkTime
GetCaretPos
GetCharABCWidths
GetCharABCWidthsFloat
GetCharWidth
GetCharWidthFloat
GetClassInfo
GetClassLong
GetClassName
GetClassWord
GetClientRect
GetClipboardData
GetClipboardFormatName
GetClipboardOwner
GetClipboardViewer
GetClipBox
GetClipCursor
GetClipRgn
GetColorAdjustment
GetCommandLine
GetCommMask
GetCommModemStatus
GetCommProperties
GetCommState
GetCommTimeouts
GetCompressedFileSize
GetComputerName
GetConsoleCP
GetConsoleCursorInfo
GetConsoleMode
GetConsoleOutputCP
GetConsoleScreenBufferInfo
GetConsoleTitle
GetCPInfo
GetCurrentDirectory
GetCurrentObject
GetCurrentPositionEx
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetCursor
GetCursorPos
GetDC
GetDCEx
GetDesktopWindow
GetDeviceCaps
GetDialogBaseUnits
GetDIBits
GetDiskFreeSpace
GetDlgCtrlID
GetDlgItem
GetDlgItemInt
GetDlgItemText
GetDoubleClickTime
GetDriveType
GetEnhMetaFile
GetEnhMetaFileBits
GetEnhMetaFileDescription
GetEnhMetaFileHeader
GetEnhMetaFilePaletteEntries
GetEnvironmentStrings
GetEnvironmentVariable
GetExitCodeProcess
GetExitCodeThread
GetExpandedName
GetFileAttributes
GetFileInformationByHandle
GetFileSize
GetFileTime
GetFileTitle
GetFileType
GetFileVersionInfo
GetFileVersionInfoSize
GetFocus
GetFontData
GetForegroundWindow
GetForm
GetFullPathName
GetGlyphOutline
GetGraphicsMode
GetIconInfo
GetInputState
GetJob
GetKBCodePage
GetKerningPairs
GetKeyboardLayoutName
GetKeyboardState
GetKeyboardType
GetKeyNameText
GetKeyState
GetLargestConsoleWindowSize
GetLastActivePopup
GetLastError
GetLocaleInfo
GetLocalTime
GetLogicalDrives
GetLogicalDriveStrings
GetMailslotInfo
GetMapMode
GetMenu
GetMenuCheckMarkDimensions
GetMenuItemCount
GetMenuItemID
GetMenuState
GetMenuString
GetMessage
GetMessageExtraInfo
GetMessagePos
GetMessageTime
GetMetaFileBitsEx
GetMetaRgn
GetMiterLimit
GetModuleFileName
GetModuleHandle
GetNamedPipeHandleState
GetNamedPipeInfo
GetNearestColor
GetNearestPaletteIndex
GetNextDlgGroupItem
GetNextDlgTabItem
GetNextWindow
GetNumberOfConsoleInputEvents
GetNumberOfConsoleMouseButtons
GetNumberOfEventLogRecords
GetObject
GetObjectType
GetOEMCP
GetOldestEventLogRecord
GetOpenClipboardWindow
GetOpenFileName
GetOutlineTextMetrics
GetOverlappedResult
GetPaletteEntries
GetParent
GetPath
GetPixel
GetPolyFillMode
GetPrinter
GetPrinterData
GetPrinterDriver
GetPrinterDriverDirectory
GetPrintProcessorDirectory
GetPriorityClass
GetPriorityClipboardFormat
GetPrivateProfileInt
GetPrivateProfileSection
GetPrivateProfileSectionNames
GetPrivateProfileString
GetPrivateProfileStruct
GetProcAddress
GetProcessHeap
GetProcessShutdownParameters
GetProcessWindowStation
GetProfileInt
GetProfileSection
GetProfileString
GetProp
GetQueueStatus
GetRandomRgn
GetRasterizerCaps
GetRegionData
GetRgnBox
GetROP2
GetSaveFileName
GetScrollPos
GetScrollRange
GetStartupInfo
GetStdHandle
GetStockObject
GetStretchBltMode
GetStringTypeW
GetSubMenu
GetSysColor
GetSystemDefaultLangID
GetSystemDefaultLCID
GetSystemDirectory
GetSystemInfo
GetSystemMenu
GetSystemMetrics
GetSystemPaletteEntries
GetSystemPaletteUse
GetSystemTime
GetTabbedTextExtent
GetTapeParameters
GetTapePosition
GetTapeStatus
GetTempFileName
GetTempPath
GetTextAlign
GetTextCharacterExtra
GetTextColor
GetTextExtentExPoint
GetTextExtentPoint
GetTextFace
GetTextMetrics
GetThreadContext
GetThreadDesktop
GetThreadLocale
GetThreadPriority
GetThreadSelectorEntry
GetTickCount
GetTimeZoneInformation
GetTopWindow
GetUpdateRect
GetUpdateRgn
GetUserDefaultLangID
GetUserDefaultLCID
GetUserName
GetVersion
GetViewportExtEx
GetViewportOrgEx
GetVolumeInformation
GetWindow
GetWindowDC
GetWindowExtEx
GetWindowLong
GetWindowOrgEx
GetWindowPlacement
GetWindowRect
GetWindowsDirectory
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
GetWinMetaFileBits
GetWorldTransform
GlobalAddAtom
GlobalAlloc
GlobalDeleteAtom
GlobalFindAtom
GlobalFlags
GlobalFree
GlobalGetAtomName
GlobalHandle
GlobalLock
GlobalMemoryStatus
GlobalReAlloc
GlobalSize
GlobalUnlock
GrayString
HeapAlloc
HeapCreate
HeapDestroy
HeapFree
HeapReAlloc
HeapSize
HideCaret
HiliteMenuItem
ImpersonateDdeClientWindow
InflateRect
InitAtomTable
InitializeCriticalSection
InitiateSystemShutdown
InSendMessage
InsertMenu
InterlockedDecrement
InterlockedIncrement
IntersectClipRect
IntersectRect
InvalidateRect
InvalidateRgn
InvertRect
InvertRgn
IsBadCodePtr
IsBadReadPtr
IsBadStringPtr
IsBadWritePtr
IsCharAlpha
IsCharAlphaNumeric
IsCharLower
IsCharUpper
IsChild
IsClipboardFormatAvailable
IsDBCSLeadByte
IsDialogMessage
IsDlgButtonChecked
IsIconic
IsMenu
IsRectEmpty
IsValidCodePage
IsWindow
IsWindowEnabled
IsWindowUnicode
IsWindowVisible
IsZoomed
keybd_event
KillTimer
LCMapString
LeaveCriticalSection
LineDDA
LineTo
LoadAccelerators
LoadBitmap
LoadCursor
LoadIcon
LoadKeyboardLayout
LoadLibrary
LoadLibraryEx
LoadMenu
LoadMenuIndirect
LoadModule
LoadResource
LoadString
LocalAlloc
LocalFileTimeToFileTime
LocalFlags
LocalFree
LocalHandle
LocalLock
LocalReAlloc
LocalSize
LocalUnlock
LockFile
LockFileEx
LockResource
LockServiceDatabase
LockWindowUpdate
LookupIconIdFromDirectory
LPtoDP
lstrcat
lstrcmp
lstrcmpi
lstrcpy
lstrlen
LZClose
LZCopy
LZInit
LZOpenFile
LZRead
LZSeek
MakeSureDirectoryPathExists
MapAndLoad
MapDebugInformation
MapDialogRect
MapFileAndCheckSum
MapViewOfFile
MapViewOfFileEx
MapVirtualKey
MapWindowPoints
MaskBlt
MessageBeep
MessageBox
MessageBoxEx
ModifyMenu
ModifyWorldTransform
mouse_event
MoveFile
MoveFileEx
MoveToEx
MoveWindow
MsgWaitForMultipleObjects
MulDiv
MultiByteToWideChar
OemKeyScan
OemToChar
OemToCharBuff
OffsetClipRgn
OffsetRect
OffsetRgn
OffsetViewportOrgEx
OffsetWindowOrgEx
OpenBackupEventLog
OpenClipboard
OpenEvent
OpenEventLog
OpenFile
OpenFileMapping
OpenIcon
OpenMutex
OpenPrinter
OpenProcess
OpenSCManager
OpenSemaphore
OpenService
OutputDebugString
PackDDElParam
PaintRgn
PatBlt
PathToRegion
PeekConsoleInput
PeekMessage
PeekNamedPipe
Pie
PlayEnhMetaFile
PlayEnhMetaFileRecord
PlayMetaFile
PlayMetaFileRecord
PlgBlt
PolyBezier
PolyBezierTo
PolyDraw
Polygon
Polyline
PolylineTo
PolyPolygon
PolyPolyline
PolyTextOut
PostMessage
PostQuitMessage
PostThreadMessage
PrepareTape
PrintDlg
PrinterProperties
PtInRect
PtInRegion
PtVisible
PulseEvent
PurgeComm
QueryDosDevice
QueryPerformanceCounter
QueryPerformanceFrequency
QueryServiceConfig
QueryServiceLockStatus
QueryServiceStatus
RaiseException
ReadConsole
ReadConsoleInput
ReadConsoleOutput
ReadConsoleOutputAttribute
ReadConsoleOutputCharacter
ReadEventLog
ReadFile
ReadFileEx
ReadPrinter
ReadProcessMemory
RealizePalette
Rectangle
RectInRegion
RectVisible
RedrawWindow
RegCloseKey
RegConnectRegistry
RegCreateKey
RegCreateKeyEx
RegDeleteKey
RegDeleteValue
RegEnumKey
RegEnumKeyEx
RegEnumValue
RegFlushKey
RegisterClass
RegisterClipboardFormat
RegisterEventSource
RegisterHotKey
RegisterServiceCtrlHandler
RegisterWindowMessage
RegLoadKey
RegNotifyChangeKeyValue
RegOpenKey
RegOpenKeyEx
RegQueryInfoKey
RegQueryValue
RegQueryValueEx
RegReplaceKey
RegRestoreKey
RegSaveKey
RegSetValue
RegSetValueEx
RegUnLoadKey
ReleaseCapture
ReleaseDC
ReleaseMutex
ReleaseSemaphore
RemoveDirectory
RemoveFontResource
RemoveMenu
RemoveProp
ReplaceText
ReplyMessage
ReportEvent
ResetDC
ResetEvent
ResizePalette
RestoreDC
ResumeThread
ReuseDDElParam
RoundRect
SaveDC
ScaleViewportExtEx
ScaleWindowExtEx
ScheduleJob
ScreenToClient
ScrollConsoleScreenBuffer
ScrollDC
ScrollWindow
ScrollWindowEx
SearchPath
SelectClipPath
SelectClipRgn
SelectObject
SelectPalette
SendDlgItemMessage
SendMessage
SendMessageCallback
SendMessageTimeout
SendNotifyMessage
SetAbortProc
SetActiveWindow
SetArcDirection
SetBitmapBits
SetBitmapDimensionEx
SetBkColor
SetBkMode
SetBoundsRect
SetBrushOrgEx
SetCapture
SetCaretBlinkTime
SetCaretPos
SetClassLong
SetClassWord
SetClipboardData
SetClipboardViewer
SetColorAdjustment
SetCommBreak
SetCommMask
SetCommState
SetCommTimeouts
SetComputerName
SetConsoleActiveScreenBuffer
SetConsoleCP
SetConsoleCtrlHandler
SetConsoleCursorInfo
SetConsoleCursorPosition
SetConsoleMode
SetConsoleOutputCP
SetConsoleScreenBufferSize
SetConsoleTextAttribute
SetConsoleTitle
SetConsoleWindowInfo
SetCurrentDirectory
SetCursor
SetCursorPos
SetDIBits
SetDIBitsToDevice
SetDlgItemInt
SetDlgItemText
SetDoubleClickTime
SetEndOfFile
SetEnhMetaFileBits
SetEnvironmentVariable
SetErrorMode
SetEvent
SetFileApisToOEM
SetFileAttributes
SetFilePointer
SetFileTime
SetFocus
SetForegroundWindow
SetForm
SetGraphicsMode
SetHandleCount
SetJob
SetKeyboardState
SetLastError
SetLastErrorEx
SetLocalTime
SetMailslotInfo
SetMapMode
SetMapperFlags
SetMenu
SetMenuItemBitmaps
SetMetaFileBitsEx
SetMetaRgn
SetMiterLimit
SetNamedPipeHandleState
SetPaletteEntries
SetParent
SetPixel
SetPixelV
SetPolyFillMode
SetPrinter
SetPrinterData
SetPriorityClass
SetProcessShutdownParameters
SetProp
SetRect
SetRectEmpty
SetRectRgn
SetROP2
SetScrollPos
SetScrollRange
SetServiceStatus
SetStdHandle
SetStretchBltMode
SetSysColors
SetSystemPaletteUse
SetSystemTime
SetTapeParameters
SetTapePosition
SetTextAlign
SetTextCharacterExtra
SetTextColor
SetTextJustification
SetThreadContext
SetThreadLocale
SetThreadPriority
SetTimer
SetTimeZoneInformation
SetupComm
SetViewportExtEx
SetViewportOrgEx
SetVolumeLabel
SetWindowExtEx
SetWindowLong
SetWindowOrgEx
SetWindowPlacement
SetWindowPos
SetWindowsHookEx
SetWindowText
SetWinMetaFileBits
SetWorldTransform
ShowCaret
ShowCursor
ShowOwnedPopups
ShowScrollBar
ShowWindow
SizeofResource
Sleep
SleepEx
StartDoc
StartDocPrinter
StartPage
StartPagePrinter
StartService
StartServiceCtrlDispatcher
StretchBlt
StretchDIBits
StrokeAndFillPath
StrokePath
SuspendThread
SwapMouseButton
SystemParametersInfo
SystemTimeToFileTime
TabbedTextOut
TerminateProcess
TerminateThread
TextOut
TlsAlloc
TlsFree
TlsGetValue
TlsSetValue
ToAscii
ToUnicode
TrackPopupMenu
TransactNamedPipe
TranslateAccelerator
TranslateMDISysAccel
TranslateMessage
TransmitCommChar
UnhandledExceptionFilter
UnhookWindowsHookEx
UnionRect
UnloadKeyboardLayout
UnlockFile
UnlockFileEx
UnlockServiceDatabase
UnmapViewOfFile
UnpackDDElParam
UnrealizeObject
UnregisterClass
UnregisterHotKey
UpdateColors
UpdateResource
UpdateWindow
ValidateRect
ValidateRgn
VerFindFile
VerInstallFile
VerLanguageName
VerQueryValue
VirtualAlloc
VirtualFree
VirtualLock
VirtualProtect
VirtualProtectEx
VirtualQuery
VirtualQueryEx
VirtualUnlock
VkKeyScan
WaitCommEvent
WaitForDebugEvent
WaitForInputIdle
WaitForMultipleObjects
WaitForMultipleObjectsEx
WaitForSingleObject
WaitForSingleObjectEx
WaitMessage
WaitNamedPipe
WideCharToMultiByte
WidenPath
WindowFromDC
WindowFromPoint
WinExec
WriteConsole
WriteConsoleInput
WriteConsoleOutput
WriteConsoleOutputAttribute
WriteConsoleOutputCharacter
WriteFile
WriteFileEx
WritePrinter
WritePrivateProfileSection
WritePrivateProfileString
WritePrivateProfileStruct
WriteProcessMemory
WriteProfileSection
WriteProfileString
WriteTapemark
wsprintf
wvsprintf

The following IOCTLs were introduced in this release.

IOCTL_DISK_FORMAT_TRACKS
IOCTL_DISK_GET_DRIVE_GEOMETRY
IOCTL_DISK_GET_DRIVE_LAYOUT
IOCTL_DISK_GET_PARTITION_INFO
IOCTL_DISK_PERFORMANCE
IOCTL_DISK_REASSIGN_BLOCKS
IOCTL_DISK_SET_DRIVE_LAYOUT
IOCTL_DISK_SET_PARTITION_INFO
IOCTL_DISK_VERIFY
IOCTL_SERIAL_LSRMST_INSERT


Glossary

This glossary contains definitions for terms used in the documentation of the Win32® Application Programming Interface (API).

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


A

ABC width
The amount of spacing required for a single glyph in a font. "A" spacing is added to the current position before drawing the glyph. "B" spacing is the width of the black part of the glyph. "C" spacing is added to the current position to account for the white space to the right of the glyph. The total advanced width is given by A+B+C. See also glyph.
accelerator table
An array of ACCEL data structures, each of which defines a keyboard accelerator. See also keyboard accelerator.
access time
The last time a file was written to, read from, or run, if the file is executable.
active screen buffer
The screen buffer that is currently displayed in a console's window.
active window
A top-level window of the application with which the user is working. The system identifies the active window by positioning it at the top of the Z order and highlighting its title bar and border. See also window.
additive color mixing
A method of color mixing that uses black as the base color to which other colors may be added. The image is black if no other colors are present. If you add red, the image will appear red. If you then add blue, the image will appear magenta. The mixing methods most commonly used are based on the additive primary colors and the subtractive primary colors. All colors can be reproduced using either method.
additive color technology
The color technology, used by video displays, that is based on the three primary colors red, green, and blue (RGB). Other colors (except black) are a combination of two or more of the primaries in varying amounts. Black is defined as the absence of the primaries.
alertable wait
(1) A wait operation initiated when a thread calls either the WaitForSingleObjectEx, WaitForMultipleObjectsEx, or SleepEx function with the function's fAlertable flag set to TRUE. In an alertable wait, the wait function returns when a ReadFileEx or WriteFileEx function completion routine is queued for execution.

(2) A wait function operation in which the function can return when the specified conditions are satisfied, or when the system queues a completion routine for execution by the waiting thread. See also completion routine, wait function.

animation
The display of a series of graphic images that simulates motion. Animation can be frame based or cast based.
anonymous pipe
An unnamed, one-way pipe that transfers data between a parent and child process, or between two child processes of the same parent process. An anonymous pipe is created by the CreatePipe function that returns two handles (one to the read end and one to the write end of the pipe). The creating parent process controls whether these handles are inherited by its child processes. See also child process, handle, parent process, pipe.
application-defined control
A control belonging to a window class supplied by an application.
application-defined resource
A resource whose format is defined and recognized by a specific application. See also custom resource.
association
The process of matching a filename extension with a specific application. When an extension and an application have been associated, applications can use the association to find and start other applications or to open and print files.
asynchronous input and output (I/O)
A type of I/O in which some file I/O functions return immediately, even though an I/O request is still pending. This enables an application to continue with other processing and wait for the I/O to finish at a later time. See also overlapped input and output (I/O).
asynchronous procedure call (APC)
A function that executes asynchronously in the context of a particular thread. When an APC is queued to a thread, the system issues a software interrupt. The next time the thread is scheduled, it will run the APC. APCs made by the system are called "kernel-mode APCs." APCs made by an application are called "user-mode APCs." A thread must be in an alertable state to run a user-mode APC.
atom
An integer that identifies a character string in an atom table.
atom name
The character string identified by an atom.
atom table
A table, defined by the operating system, that stores character strings and their associated atoms. A global atom table is available to all applications. A local atom table can be used only by the application that created it.
attribute
A characteristic of a file. The file attributes indicate whether a file is read only, hidden, system, archived, a directory, or normal. See also directory.
auto-reset event object
See event object.
auxiliary audio device
Audio devices whose output is mixed with the Musical Instrument Digital Interface (MIDI) and waveform output devices in a multimedia computer. An example of an auxiliary audio device is the compact disc audio output from a CD-drive.


B

background window
Any window created by a thread other than the foreground thread.
base character
A character followed by a nonspacing character; typically, this is a letter that receives an accent mark. For example, in the character è, an accented e, the e is the base character. See also nonspacing character.
base class
The window class an application uses as the starting point when creating a superclass. See also superclass.
base line
An imaginary line where the capital letters for a given font rest. See also font.
base priority
A thread priority value that provides the basis for calculating the thread's dynamic priority. This value is set to one of the five levels within the priority class of the thread's process. The scheduler can temporarily boost the priority of a thread, but it cannot reduce it below this base. See also dynamic priority, priority class, process, thread.
beginning-of-medium marker
The position on a tape where you can begin recording data.
beginning-of-partition marker
The position in a partition where you can begin recording data. If there is only one partition, this position is usually equivalent to the beginning-of-medium marker.
Bezier spline
An irregular curve defined by four points: two endpoints and two control points. The endpoints determine where the curve begins and ends. The control points determine the shape of the curve; however, unlike the endpoints, the control points do not intersect the curve.
bit count
The number of bits of data in a color plane that represent a single pixel. See also pixel.
bitmap
An array of bits that contains data that describes the colors found in a rectangular region on the screen (or the rectangular region found on a page of printer paper). See also rectangular region.
bitmapped image
A rectangular image on a video display (or page of printer paper) represented by the color data in a bitmap.
blink time
The elapsed time, in milliseconds, required to invert the caret display. This value is half of the flash time. See also caret, flash time.
blocking input and output (I/O)
A wait mode for I/O operations on a named pipe where functions wait for a process on the other end of the pipe to perform an action. In nonblocking wait mode, the functions return if their operations are not finished immediately. See also named pipe, pipe, process.
bottom-up DIB
A device-independent bitmap (DIB) whose origin lies at the bottom-left corner. See also top-down DIB.
bounding rectangle
Specifies the size and position of a graphical object. In the case of some GDI objects, the dimensions of this rectangle are inclusive-exclusive when no world transformation has been set, and inclusive-inclusive when a world transformation has been set.
breakpoint
A location in a process where execution is stopped to allow the developer to examine the process's code, variables, and register values, and, as necessary, make changes, continue execution, or terminate execution.
brush
A bitmap that is used to fill the interior of closed shapes, polygons, ellipses, and paths. See also bitmap, ellipse, path, polygon.
brush origin
A coordinate that specifies the location of one of the pixels in a brush's bitmap. The system maps this pixel to the upper left corner of the window that contains the object to be painted. See also bitmap, pixel, window.
button
A window control that enables a user to provide input to an application. Buttons are typically used in dialog boxes.
byte-order mark
A special Unicode character (0xFEFF) that is placed at the beginning of Unicode text files to indicate that the text is in Unicode format.
byte reversed
A Unicode file in which the most significant byte is first (as on Motorola architectures).
byte type pipe
A named pipe where data is written as a stream of bytes. See also named pipe.


C

caret
A flashing line, block, or bitmap that marks the location of the insertion point in a window's client area. See also bitmap.
character code
A numeric value that represents a particular character in a set, such as the ASCII character set. See also code page.
character set
A mapping of characters to their identifying numeric values. See also multibyte character set, single-byte character set, Unicode.
character-mode application
An application that does not provide its own graphical user interface (GUI). The Win32 API provides consoles for managing input and output (I/O) for character-mode applications. See also console.
child process
A process (child) initiated by another process (the parent). The child process can operate independently from the parent process. Further, the parent process can suspend or terminate without affecting the child process. See also parent process.
child window
A window that has the WS_CHILD style. A child window always appears within the client area of its parent window.
child-window identifier
An application-defined value assigned to a child window. An application that creates multiple child windows of the same class uses the identifiers to distinguish among the child windows.
chord
A region bounded by the intersection of an ellipse and a secant. It is outlined using the current pen and filled by using the current brush. See also ellipse, secant.
class cursor
The default cursor for a window class. The class cursor is specified by the hCursor member of a WNDCLASS structure. See also cursor.
class icon
The default icon for a window class. The class icon is identified by the hIcon member of a WNDCLASS structure. See also icon.
class menu
The default menu for a window class. All windows of a given class use the same menu unless the application specifies a different menu when creating a window of that class. See also menu, window.
click
To press and release a mouse button.
client area
The part of a window where the application displays output such as text or graphics.
client coordinates
Coordinates relative to the upper left corner of a window's client area.
clipboard
A set of functions and messages used to transfer information between applications or within an application.
clipboard format
The format of data on the clipboard. A window can copy information to the clipboard using multiple clipboard formats. A clipboard format is identified by a unique unsigned integer value. See also clipboard, window.
clipboard owner
The window associated with the information on the clipboard. It is possible for there to be no clipboard owner. See also clipboard, window.
clipboard viewer
A window that displays the contents of the clipboard. See also clipboard, window.
clip path
One or more irregular shapes in a window's client area where clipped output appears. The edges of a clip path can be straight lines, Bezier curves, or combinations of the two. See also irregular shape.
clipping
The process of limiting output to a region or path within the client area of an application's window.
clipping region
A polygon or ellipse in a window's client area where clipped output appears. See also ellipse, polygon.
cluster
The unit of storage allocation used in FAT and NTFS file systems. A cluster is an integer power of two multiple of the sector size. On floppy diskettes, the cluster is usually two sectors, or 1024 bytes, in size. On some file systems, a cluster may be as much as 64 sectors. For the purposes of defragmentation, a cluster may be viewed as either a logical cluster or a virtual cluster. See also defragmentation, logical cluster, virtual cluster.
CMY format
See cyan, magenta, yellow (CMY) format.
code page
A mapping of characters to 256 8-bit character codes. See also character code.
coherent
A description of file views that contain identical data at a given time. File views are coherent if they are derived from the same file-mapping object.
color management
A technology that translates the colors of an object (images, graphics, or text) from their current color space to the color space of output devices such as monitors, printers, and plotters.
color palette
An array containing the RGB (red, green, blue) values identifying the colors that can currently be displayed or drawn on the output device. Color palettes are used by devices that are capable of generating many colors but can only display or draw a subset of these at any given time.
color palette index
An integer value that identifies a specific palette entry.
color plane
An array of bits that represents the red, green, blue, or intensity components for the pixels in a bitmapped image. See also bitmapped image, pixel.
color space
A model for representing color as three or more coordinates. Color-space models map color components onto a Cartesian coordinate system in three or more dimensions. A color space may use any of several types of color encoding and visualizing color. The two most common types of color space models are RGB and YUV.
color table
An array of RGBQUAD structures. Each RGBQUAD structure describes a color consisting of relative intensities of red, green, and blue.
command item
A menu item that, when chosen, sends a command message to the window procedure of the window that owns the menu. See also menu item, window.
comment
A string of text inserted between records in a metafile. See also metafile.
committed page
A page of memory in a process's virtual address space for which physical storage has been allocated. The storage is either in RAM or on disk.
common dialog box
A dialog box that an application displays by calling a single function rather than by creating a dialog box procedure and a resource file containing the dialog box template. See also resource file.
common display context
The default display context assigned to a window that does not specify CS_OWNDC or CS_CLASSDC as the window's class style. See also display context, window.
communications resource
A physical or logical device that provides a single bidirectional, asynchronous data stream. Serial ports, parallel ports, fax machines, and modems are examples of communications resources. For each communications resource, there is a service provider, consisting of a library or driver, that enables applications to access the resource.
compatible device context (DC)
A virtual-device context that provides a means of storing an image that was created on a physical screen. (Compatible DCs are sometimes referred to as "memory" DCs.) See also device context.
completion routine
A function specified in a call to either the ReadFileEx or WriteFileEx function. A completion routine is queued for execution when the read or write operation is finished. The completion routine is not executed until the thread that called the ReadFileEx and WriteFileEx function enters an alertable wait. See also alertable wait.
composite character
An accented character represented by two character values, one for the base character and another for the nonspacing accent character. See also base character, nonspacing character, precomposed character.
compound file
A number of individual files bound together in one physical file. Each individual file in a compound file can be accessed as if it were a single physical file.
console
An interface that provides input and output to character-mode applications. See also character-mode application.
console modes
Settings associated with a console that determine the behavior of some of its input and output operations.
console process
A character-mode process whose entry point is the main function. A console process uses the console functions or the file input and output (I/O) functions for I/O, while a graphical user interface (GUI) process uses the USER/graphic device interface (GDI) functions. See also process.
console window
A window managed by the system that a console uses to receive input and display output.
container
A network resource that contains other network resources. The contained resources can be such objects as servers or printers, or containers that can also contain further objects and containers. See also sharepoint.
context record
A record of the machine state created when an exception occurs. The context record is saved in a CONTEXT structure.
control
A child window used to carry out simple input and output (I/O) tasks.
control identifier
A number that an application uses to uniquely identify a control.
control message
A message sent to a control to request information or perform an action.
control set
A set of configurable options for a computer. See also profile.
control style
A value, similar to a window style, that specifies the appearance and behavior of a control. The window procedure for the control uses the style to determine how to draw the control and process input.
coordinate space
A planar space based on the Cartesian coordinate system. This system requires two axes that are perpendicular and equal in length. There are four coordinate spaces: world, page, device, and physical device (client area, or desktop, or page of printer paper).
Coordinated Universal Time
The standard international time used internally by the system.
cosmetic pen
A pen with dimensions specified in device units. See also pen.
counter
A general term referring to an incrementing variable.
critical section
An object used to synchronize the threads of a single process. Only one thread at a time can own a critical-section object.
current directory
The directory at the end of the active path. This is the directory where the active application started, unless explicitly changed. See also directory.
current position
The starting point for any line-drawing or curve-drawing operations.
current selection
The portion of a document the user has marked in preparation for carrying out a command.
cursor
A small bitmap whose location on the screen is controlled by a pointing device, such as a mouse, pen, or trackball. See also bitmap.
cursor handle
A unique value of the HCURSOR type that identifies a cursor.
custom cursor
A cursor designed for use in a specific application.
custom icon
An icon designed for use in a specific application. See also icon.
custom resource
See application-defined resource.
cyan, magenta, yellow (CMY) format
A color format that identifies a given color with a cyan, magenta, yellow (CMY) format triplet. This format is used by printers and other ink-based devices.


D

DBCS
See double-byte character set.
DC
See device context.
DDE
See dynamic data exchange.
DDE client application
An application that requests a conversation with a dynamic data exchange (DDE) server application, and receives data from the server during the conversation. See also DDE server application.
DDE conversation
The interaction between a dynamic data exchange (DDE) client and a DDE server application.
DDE server application
An application that provides data to a dynamic data exchange (DDE) client application during a DDE conversation. See also DDE client application, DDE conversation.
DDE transaction
An exchange of messages or data between a dynamic data exchange (DDE) client application and a DDE server application. See also DDE client application.
dead key
A key used with another key to create an accented character. A dead key, when pressed, produces no visible character but indicates that the accent mark it represents is to be combined with the character produced by the next letter key pressed. See also key.
deadlock
A bug where the execution of thread A is blocked indefinitely waiting for thread B to perform some action, while thread B is blocked waiting for thread A. For example, two threads on opposite ends of a named pipe can become deadlocked if each thread waits to read data written by the other thread. A single thread can also deadlock itself. See also named pipe, thread.
debugger
An application that enables a developer to observe and correct programming errors by stepping through an application program, examining data, and checking conditions.
debugging
The process of observing and correcting logical and syntactical errors in an application.
debugging event
An event that occurs in a process being debugged that causes the system to notify the debugger. Also, the notification the system sends to the debugger. See also debugger, process.
decorated name
A string created by the compiler during compilation of the function definition or prototype. Functions in C and C++ programs are known internally by their decorated names. A decorated name is sometimes required when you specify a function name to the linker or other tools.
default color palette
An array of RGB values identifying the colors that can be used with a device context by default. The system associates the default color palette with a context whenever an application creates a context for a device that supports color palettes. The default color palette ensures that colors are available for use by an application without requiring additional action by the application.
defragmentation
The process of grouping all the virtual clusters of a file into contiguous logical clusters. Defragmentation is usually done in order to improved disk drive performance. See also logical cluster, virtual cluster.
default window procedure
A system-defined function that provides default processing for messages an application-defined window procedure does not process. See also window procedure.
desktop wallpaper
The pattern created by the bitmap that the desktop window uses to paint the background of the screen.
desktop window
A system-defined window that paints the background of the screen and serves as the base for all windows displayed by all applications.
detached process
A console process that does not have access to the console of its parent process. Typically, a detached process runs in the background, but it can use the AllocConsole function to create a new console if it needs to print a message to the screen or get input from the user. See also console process, parent process.
device
Input sources and output destinations are collectively referred to as devices. Some examples of devices are keyboard (input), monitor (output), printer(output), and disk files, which are input and output devices.
device capabilities
The curve-, line-, polygon-, raster-, and text-drawing capabilities of a display or printer.
device context
Structure that defines a set of graphic objects and their attributes, and the graphic modes that affect output. In addition, the device context (DC) refers to a physical output device—its name, device driver, and other attributes. GDI function call parameters contain a handle to a DC to include the attributes of the specified device. There are four types of DC: display (supports drawing operations on a video display terminal), printer (supports drawing operations on a printer or plotter), memory (supports drawing operations on a bitmap), and information (supports retrieval of device data.) See also graphic modes, graphic objects.
device coordinate space
One of four coordinate spaces used for all graphic device interface (GDI) drawing operations.
device-dependent bitmap
An array of bits that can only be used with a particular display or printer.
device-independent bitmap (DIB)
An array of bits combined with several structures that specify the width and height of the bitmapped image (in pixels), the color format of the device where the image was created, and the resolution of the device used to create that image. See also bitmapped image, pixel.
device interface
Device functionality that a driver exposes to applications or other system components. A driver can expose zero, one, or more than one interface for a particular device. Each device interface is a member of a device interface class.
device interface class
A group of device interfaces with the same functionality. For example, all the joysticks on a system could be members of the joystick device interface class.

An application or a system component can get a list of the devices on the system that support a particular interface by asking for the devices that export an interface of a particular device interface class.

A device interface class is identified by a class GUID. Microsoft defines classes for common device interfaces; IHVs and OEMs can define additional device interface classes.

device type
A class of Media Control Interface (MCI) devices that respond to a common set of commands.
DIB palette
The logical color palette created when a device-independent bitmap (DIB) was created. See also color palette.
DIB pattern-brush
A logical brush created from a device-independent bitmap (DIB). See also device-independent bitmap (DIB), logical brush.
digital differential analyzer (DDA)
An algorithm that determines which pixels on a video display (or dots on a printed page) are part of a line or curve. See also pixel.
directory
An organizational construct supported by most disk-based operating systems. Rather than listing all the files on a volume at once, users can create multiple directories to contain groups of files. Directories can also contain other directories.
disabled window
A window that cannot receive input from keyboard, mouse, or other input device.
disk drive
A physical device that reads from or writes to disks. Disk drives are referenced by letters, typically A for the first floppy-disk drive, B for the second floppy-disk, C for the first fixed-disk drive, D for the second fixed-disk drive, and so on. Each drive on an operating system is assigned a unique letter to distinguish it from other drives.
display context
A special device context that treats each window like a separate screen surface. See also device context, window.
display element
The parts of a window and the display that appear on the system display screen.
dithering
A graphics technique that simulates a color by altering two or more colors in a pattern.
DLL
See dynamic-link library (DLL).
domain
A group of workstations and servers that share a single group name.
double-byte character set (DBCS)
A mapping of characters to their identifying numeric values, in which each value is 2 bytes wide. Double-byte character sets are sometimes used for languages that have more than 256 characters. For example, a double-byte character set is used to encode Japanese (Kanji) characters. See also multibyte character set.
double-click
To press and release a mouse button twice in quick succession.
drag
To move the mouse while holding down a mouse button.
drag-drop
To select one or more files in File Manager, drag them to an open application, and drop them there.
driver service
A service that follows the device driver protocols for Windows NT. These services do not interface with the service control manager. See also service, Win32 service.
drop-down combo box
A combo box, created by using the CBS_DROPDOWN style, containing a drop-down list and a selection field that can be edited by the user.
drop-down list
A list in a combo box that is visible only when it is opened by the user. Combo boxes with the CBS_DROPDOWN and CBS_DROPDOWNLIST styles contain drop-down lists.
drop-down list box
A combo box, created by using the CBS_DROPDOWNLIST style, containing a drop-down list and a selection field that cannot be edited by the user. A drop-down list box can be used in place of a list box when screen space is tight.
due time
The time at which the state of the waitable timer is to be set to signaled. This value is specified when the timer is started. A positive value indicates an absolute time. A negative value indicates a relative time.
dynamic data exchange (DDE)
A form of interprocess communications that uses shared memory to exchange data between applications. Applications can use DDE for one-time data transfers and for ongoing exchanges in applications that send updates to one another as new data becomes available.
dynamic-link library (DLL)
A .DLL file that contains one or more functions compiled, linked, and stored separately from the processes that use them. The operating system maps the DLLs into the process's address space when the process is starting up or while it is running. The process then executes functions in the DLL. See also process.
dynamic priority
A thread priority value used by the scheduler in making scheduling decisions. The value for each thread can never be lower than the thread's base priority, but it can be raised and then lowered to enhance responsiveness to input or other significant events. See also base priority, thread.


E

early-warning position
A physical mark or device-computed position immediately before the end-of-partition marker.
edit control
A window control that allows the user to enter and edit text. Edit controls are typically used in dialog boxes.
ellipse
A closed curve defined by two fixed points such that the sum of the distances from any point on the curve to the two fixed points is constant.
elliptical region
A region with the shape of an ellipse. See also ellipse, region.
embedded font
A TrueType font stored as part of a document. (By storing a font in a document, the document's author is guaranteed that the original appearance and format of the document remain intact.) See also TrueType font.
end cap
A geometric pen attribute that specifies the shape of the pen. There are three types of end caps: flat, round, and square.
end-of-medium marker
The last position on a tape where you can record data.
end-of-partition marker
The last position on a partition where you can record data.
end-of-tape marker
Same as end-of-medium marker.
enhanced metafile
One of two metafile formats. This format, used in applications written to run with the Win32 application programming interface (API), consists of a header, a table of handles to graphics device interface (GDI) objects, a private palette, and an array of metafile records. See also handle.
environment variable
A symbolic variable that represents some element of the operating system, such as a path, a filename, or other literal data. For example, the environment variable PATH represents the directories to search for executable files. See also directory, path.
erase gap
An area of erased tape or a pattern that the device does not recognize as a marker or as user data; it is used to locate a filemark to be overwritten.
escapement
An angle defined by the escapement vector and the x-axis of a device. The base line of a string of text is parallel to the escapement vector. See also x-axis.
event object
An interprocess synchronization object whose state is explicitly set to signaled by the SetEvent or PulseEvent function. A manual-reset event object's state must be explicitly reset to the nonsignaled state by the ResetEvent function. A wait function resets an auto-reset event object's state to nonsignaled before returning. See also synchronization object , wait function.
exception
An event that occurs during the execution of a program and that requires the execution of software outside the normal flow of control.
exception record
A record of an exception. The exception record is saved in an EXCEPTION_RECORD structure.
extent
In the FAT and NTFS file systems, a group of one or more virtual clusters on contiguous sequential logical clusters. See also logical cluster, virtual cluster.


F

family name
One of two attributes used to organize TrueType fonts. Family names include Courier New, Arial, and Times New Roman. (The other attribute used to organize TrueType fonts is the style name.) See also TrueType font.
FAT
See file allocation table (FAT).
file
A named, ordered collection of information, such as a program, a set of data used by a program, or a user-created document. A file is the basic unit of storage that enables a computer to distinguish one set of information from another.
file allocation table (FAT)
A table that contains the status of various segments of disk space used for file storage. Also, the file system that maintains the table.
file handle
A unique identifier that the system assigns to a file when the file is opened or created. A file handle is valid until the file is closed.
file-mapping object
An object whose handle can be used to create a view to a file or piece of memory. The CreateFileMapping function creates file-mapping objects. See also handle.
file pointer
A pointer to the next byte to be read or written in a file.
file system
A part of the operating system that enables you to store, access, and organize files on storage devices, such as hard or floppy disks or tape drives. File allocation table (FAT) and NTFS are examples of file systems.
file time
A 64-bit value representing the number of 100-nanosecond intervals that have elapsed since January 1, 1601.
file view
A copy of a file or piece of memory that appears in a process's virtual address space. The MapViewOfFile function creates a file view in the process's address space and returns a pointer to the file view.
filemark
A special recorded element that contains no user data and is used to provide a segmentation scheme. A normal filemark does not contain an erase gap.
filled path
A path that is filled by using the brush currently selected into an application's device context. See also device context, path.
filter expression
An expression that is part of a frame-based exception handler. When an exception occurs during the execution of the guarded body of code in a frame-based exception handler, the system evaluates the filter expression to determine whether the exception handler code is to be executed. See also frame-based exception handler, guarded body of code.
filter function
A function called by a filter expression in a frame-based exception handler. See also frame-based exception handler.
first-chance notification
The first time the system notifies the debugger of an exception. See also debugger.
flash time
The elapsed time, in milliseconds, required to display, invert, and restore the caret display. This value is twice as much as the blink time. See also blink time, caret.
flattened path
A path altered by converting each curve (in the path) into a series of line segments. See also path.
floating pop-up menu
A pop-up menu that is not attached to a menu bar. See also pop-up menu.
font
(1) A collection of characters and symbols that share a common design.

(2) A drawing object used to write text on a display surface.

font mapper
Determines which available font most closely matches a requested font. See also font.
font table
An array that identifies each of the fonts whose resources have been loaded. Only fonts whose resources have been loaded can be used for text output. See also font.
foreground window
The window with which the user is currently working. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.
form type
A four-character code (FOURCC) identifying the type of data contained in a Resource Interchange File Format (RIFF) chunk. For example, a RIFF chunk with a form type of WAVE contains waveform audio data.
fragmentation
In file systems, when the virtual clusters of a file are on noncontiguous logical clusters. Because the file is spread out across the disk, access is slower, so fragmentation affects performance of the file system. See also logical cluster, virtual cluster.
frame-based exception handler
A mechanism used by a developer to deal with the possibility that an exception may occur in a certain sequence of code. A frame-based exception handler consists of a guarded body of code, a filter expression, and an exception handler. See also filter expression, guarded body of code.
free page
A page of memory in a process's virtual address space that is available to be reserved or committed. A process cannot access a free page. See also committed page, reserved page.
frequency
With respect to the high-resolution performance counter, the number of counts per second. This value is processor dependent.


G

GDI
See graphics device interface.
geometric pen
A pen with dimensions that are specified in world units. A geometric pen may possess attributes usually associated with a brush, such as pattern and hatch. See also brush, geometric pen, pen.
global atom
An atom stored in the global atom table. The value of a global atom is unique among all others in the operating system. See also atom.
global atom table
See atom table.
global subclassing
A type of subclassing in which an application replaces the window-procedure address stored in the WNDCLASS structure of a window class with the address of a subclass procedure. All subsequent windows created with the class use the subclass procedure rather than the original window procedure. See also subclassing, window, window procedure.
glyph
The bitmap, collection of points, or collection of graphic commands that define a single character or symbol in a font. See also bitmap, font.
graceful disconnect
In a graceful disconnect, all the data sent by both sides are delivered and there is full acknowledgment of the session termination by both sides. This contrasts with an abortive disconnect, in which one side unilaterally terminates the connection, disregarding any queued data. As a result, in an abortive disconnect there may be data loss.
graphic modes
A set of modes that define how the Win32 API draws output with the objects found in a device context. See also device context.
graphic objects
The pen, brush, bitmap, palette, region, and path associated with a device context. See also bitmap, brush, device context, palette, path, region.
graphical user interface (GUI) process
A process whose entry point is the WinMain function. A GUI process uses the USER/graphics device interface (GDI) functions for input and output (I/O), while a console process uses the console functions or the file I/O functions. See also console process.
graphics device interface
A system component that processes graphics function calls from applications and passes them to the appropriate device driver. See also dynamic-link library (DLL).
group box
A rectangle used to group related controls (usually check boxes or radio buttons). Because its sole purpose is to organize other controls, a group box cannot be selected. See also radio button.
guarded body of code
A set of one or more statements for which an exception or termination handler provides protection.
GUI process
See graphical user interface (GUI) process.


H

handle
A variable that identifies an object; an indirect reference to an operating system resource.
hatched brush
A logical brush created from one of twenty predefined bitmaps. See also bitmap, logical brush.
hidden window
A window that does not have the WS_VISIBLE style. A hidden window does not appear on the screen. As a result, it cannot receive user input or display output, although it can receive input from the system and other applications.
high-resolution performance counter
Hardware that provides high-resolution timing useful in improving the performance of applications.
hit testing
(1) The process of detecting user input by using the position of the mouse cursor hot spot. See also hot spot.

(2) A procedure for determining the current cursor position related to a given region. See also region.

hive
A discrete body of registry information, typically rooted at the top of the registry hierarchy. Each hive is usually supported by a single file of registry data.
HLS format
A color format that identifies a given color with a HLS (hue, luminosity, and saturation) triplet.
hollow brush
See null brush.
hook
A point in the message-handling mechanism where an application can install a subroutine to monitor messages.
hook chain
A list of pointers to the hook procedures associated with a hook. When a message occurs that is monitored by the hook, the system calls the first hook procedure in the chain.
hook procedure
An application-defined callback function whose address has been installed in a hook chain.
hot key
A key combination that generates a WM_HOTKEY message.
hot spot
The pixel in a cursor that marks the exact screen location affected by a mouse action, such as a button click. Mouse messages include the coordinates of the hot spot. See also cursor, pixel.


I

icon
A small bitmap that usually represents a minimized application. Icons may also serve as symbols in warning messages or other windows. See also bitmap.
icon handle
A unique value of the HICON type that identifies an icon. See also icon.
iconic
Minimized. If an icon represents a minimized application, the application's window is said to be iconic. See also icon, window.
ideographic
A single character that represents a word, object or a phrase — for example, a single character that means "month." This term would apply to the Han script.
image
A rectangular region on a video display that contains a graphical representation of an object. See also rectangular region.
import library
A .LIB file that contains information about one or more dynamic-link libraries (DLLs), but does not contain the DLL's executable code. The linker uses an import library when building an executable module of a process, to provide the information needed to resolve the external references to DLL functions. See also dynamic-link library, process.
information context
A device context used strictly for data retrieval; it cannot be used for any drawing operations. See also device context.
input buffer
A buffer containing a queue of input records with information about keyboard, mouse, and window-sizing events for a console. See also console.
input event
An event--such as a keystroke, mouse movement, or mouse-button click--that causes a console to place an INPUT_RECORD structure in its input buffer. A console process can get information about an input event by reading from the console's input buffer.
instance
An instantiation of a particular object type in a class, such as a specific process or thread. All instances of a given type have identical performance counters.
instance subclassing
A type of subclassing where an application replaces the window-procedure address of a single instance of a window with the address of a subclass procedure. See also subclassing, window.
integer atom
An atom that identifies an integer value. See also atom.
interlocked operation
The thread that performs an interlocked operation on a variable is guaranteed to have exclusive access to the variable until the operation has completed.
irregular curve
A curve that does not fit the perimeter of a conic section.
irregular shape
A shape composed of curves and straight line segments.
item name
A string that identifies a unit of data a server can pass to a client during a transaction.


J

job object
An object that allows groups of processes to be managed as a unit. Job objects are namable, securable, sharable objects that control attributes of the processes associated with them. Operations performed on the job object affect all processes associated with the job object. See also process.
join style
A geometric pen attribute that specifies how the ends of connected lines are joined. See also geometric pen.


K

key
An entry (or node) in the registry. A key may have one or more values, subkeys, or both. With the exception of four predefined keys, all keys are subkeys of other keys. See also registry, subkey.
keyboard accelerator
A keystroke or combination of keystrokes that sends a command message to the specified application window.
keyboard focus
A property of the window currently receiving keyboard input. Only one window at a time can have the keyboard focus. See also window.


L

language identifier
A 16-bit value that identifies a language and, where appropriate, the variant of the language being used. A language identifier is a combination of a primary language identifier and a sublanguage identifier. For example, if the primary language identifier specifies English, the sublanguage identifier might specify Australian English.
last-chance notification
The last time the system notifies the debugger of an exception. If the debugger does not handle an exception after last-chance notification, the system terminates the process being debugged. See also debugger, process.
last-error code
A per-thread value set by Win32 functions when an error occurs. The last-error code can be retrieved by using the GetLastError function.
LCID
See locale identifier.
LCN
Logical cluster number. See logical cluster.
license server
The part of a license system that runs on a file or applications server.
line
A set of highlighted pixels on a video display (or a series of dots on a printed page) that is defined by two points: a starting point and an ending point. See also pixel.
line and curve attributes
The width, color, style, and (in the case of lines or curves drawn with a geometric pen) end cap, join style, and transformation of a line or curve. See also end cap, geometric pen, join style, transformation.
list box
A control window that contains a list of items that can be selected by the user.
load-time linking
Dynamic linking that occurs when a program (either an application or a dynamic-link library [DLL]) makes an explicit call to a DLL function. This requires that the executable module of the program be built by linking with the DLL's import library. When the program is executed, the operating system uses the information provided by the import library to locate the executable module of the DLL, which is mapped into the address space of the process. See also import library, process.
local atom
An atom stored in an application's atom table. The value of a local atom is unique within the application but may not be unique throughout the operating system. See also atom, atom table.
local atom table
See atom table.
locale identifier (LCID)
A value containing the language identifier in the lower word and a reserved value in the upper word. The identifier supplied in an LCID is a standard international numeric abbreviation. This LCID has the components necessary to uniquely identify one of the installed system-defined locales.
logfile
A configuration registry key that specifies the filename of an event log. Logfiles are subkeys of the EventLog registration key. See also key, subkey.
logging off
The action of stopping all processes running in the security context of the process that called the Exit function.
logical brush
A description of a bitmap. A logical brush can be selected into a device context. See also bitmap, device context.
logical cluster
One of the clusters of a file for which the clusters are in the order in which they are found on the hard drive. Logical clusters are distinguished from virtual clusters. See also virtual cluster.
logical coordinate space
Another name for the world or page coordinate space. If an application has set a world-space to page-space transformation, the logical space is the world space; otherwise, the logical space is the page space.
logical palette
An array of colors, or "color palette," that an application creates and associates with a device context and uses for graphics output. See also device context.
logical volume
See partition.
long filemark
A filemark that contains a long erase gap that enables an application to position the tape at the beginning of the filemark and to overwrite the filemark and the erase gap. See also erase gap.


M

mailslot
A pseudofile used for one-way interprocess communications.
mailslot client
A process that writes a message to a mailslot.
mailslot server
A process that creates and owns a mailslot and can read messages from it. See also process.
main window
The window that serves as the primary interface between the user and an application.
manual-reset event object
See event object.
mapping
A representation of the elements (or points) from a source coordinate space on a target coordinate space.
mapping mode
Specifies the size of the units used for any drawing operations associated with a particular device context.
matrix
An n-dimensional array that is used to specify a transformation. Transformations in a two-dimensional space require either a two-dimensional or a three-dimensional array.
maximize button
A window component that, when clicked, causes the system to enlarge the window to the size of the screen.
maximized window
A window that has the WS_MAXIMIZE style. A maximized top level window fills the screen; a maximized child window fills the client area of its parent window.
maximum tracking size
The largest window size the user can produce by dragging the sizing border.
MDI client window
See multiple document interface client window.
MDI frame window
See multiple document interface frame window.
memory device context (DC)
See compatible device context (DC).
menu
A list of items that represent an application's commands. A menu item can be either a string or a bitmap. See also bitmap, menu item.
menu bar
The topmost menu in a hierarchy of menus. A menu bar typically contains one or more menu items that the user can select to display pop-up menus. See also menu, menu item, pop-up menu.
menu handle
A unique value of the type HMENU used to identify a menu. See also menu.
menu item
A string or bitmap displayed in a menu. Choosing a menu item either sends a command message or activates a pop-up menu. See also bitmap, pop-up menu.
message
A data packet used for communicating information or a request. Messages can be passed between the operating system and an application, different applications, threads within an application, and windows within an application. See also thread, window.
message loop
A program loop that retrieves messages from a thread's message queue and dispatches them to the appropriate window procedures. See also message queue.
message parameters
A pair of values that contains information a window procedure uses while processing a message.
message queue
An operating system-defined memory object that holds an ordered list of messages awaiting processing. The system message queue holds mouse and keyboard input waiting to be passed to a thread's message queue. A thread's message queue holds messages waiting to be retrieved by a thread's message loop. See also message loop.
message-type pipe
A named pipe where data is written as a stream of messages. See also named pipe.
metafile
An array of variable-length structures (called metafile records) that store a picture in a device-independent format. A metafile is played when its records are converted to device commands and processed by the appropriate device. (There are two metafile formats: the enhanced format and the Windows format.)
metafile bits
The binary representation of a metafile. The bits include the header, an optional palette, an optional text description of the metafile contents, and the metafile records. See also metafile record, palette.
metafile device context (DC)
A device context that is used for metafile operations. See also device context.
metafile handle table
An array of handles that identify pens, brushes, fonts, and other objects used to create the picture stored in the metafile. See also brush, font, handle, metafile, pen.
metafile header
A structure that specifies the size of the picture stored in the metafile, the size of the metafile (in bytes), the number of entries in the metafile palette, the number of records in the metafile, a pointer to the metafile description (if one exists), and a pointer to the metafile palette (if one exists). See also metafile, metafile palette, palette.
metafile palette
An array of red, green, blue (RGB) values that represent the colors used to create the picture stored in a metafile. See also metafile.
metafile record
A variable-length structure that contains information such as resolution of the device on which the picture was created, the dimension of the picture, and the GDI functions required to create the picture. See also metafile.
minimize button
A window component that, when clicked, causes the system to reduce the window to the size of an icon.
minimized window
A window that has the WS_MINIMIZE style. A minimized window is the same size as an icon. The system displays a minimized top-level window at the bottom of the screen; the system displays a minimized child window at the bottom of its parent window's client area.
minimum tracking size
The smallest window size the user can produce by dragging the window's sizing border.
module-definition file
A text file (.DEF) that contains one or more statements describing various attributes of an executable module. See also dynamic-link library (DLL).
mount
To install a volume onto a computer. The operating system performs this installation when the system starts. Microsoft® Windows® 2000, Microsoft® Windows NT®, Windows 95/98, and Microsoft® MS-DOS® mount volumes to drive letters at startup. In addition, with Windows 2000 you can mount one volume to another volume. For more information, see Volume Mount Points and Mounting Volumes.
mount point
A directory on one volume that an application can use to mount a different volume, that is to set it up for use at the location a user specifies. In other words, you can use a mount point as a gateway to the volume. When a volume is mounted at a mount point, users and applications can refer to the mounted volume by the path of the mount point or a drive letter. For example, with a mount point set the user might refer to drive D as "C:\mnt\Ddrive" as well as "D:". Mount points are implemented with reparse points. For more information, see Volume Mount Points and Mounting Volumes.
mouse capture
The act of channeling mouse input to a specific window without regard to the position of the mouse-cursor hot spot. See also hot spot, window.
MS-DOS date
A date in the format used by MS-DOS. The date is a packed 16-bit value in which bits in the value represent the day, month, and year.
MS-DOS time
A time in the format used by MS-DOS. The time is a packed 16-bit value in which bits in the value represent the hour, minute, and second.
multibyte character set
A character set in which each character is identified by using more than one byte--for example, a double-byte character set (DBCS). Although Unicode characters are 2 bytes wide, the Unicode character set is not referred to by this term. See also double-byte character set (DBCS), single-byte character set, Unicode.
multiple document interface (MDI) client window
A window that belongs to the MDICLIENT window class. An MDI client window serves as the background for MDI child windows, and it provides support for creating and manipulating child windows. See also window.
multiple document interface (MDI) frame window
The main window of a multiple document interface (MDI) application. See also window.
multiple-selection list box
A list box in which more than one item can be selected at the same time.
mutex object
An interprocess synchronization object whose state is set to signaled when it is not owned by any thread, and nonsignaled when it is owned. Only one thread at a time can own a mutex. See also nonsignaled, signaled, synchronization object.


N

named pipe
A one-way or two-way pipe used for communications between a server process and one or more client processes. A server process specifies a name when it creates one or more instances of a named pipe. Each instance of the pipe can be connected to a client process that uses the pipe name to open a handle to the other end of the pipe. See also handle, pipe.
network provider
The supplier of a complete implementation of a networking system: for example, Microsoft Server or Novell Netware.
network root
The topmost container resource in a network hierarchy. The network root can contain the network providers on a system.
nonclient area
The parts of a window that are not a part of the client area. A window's nonclient area consists of the border, menu bar, title bar, scroll bar, System menu, Minimize button, and Maximize button. See also menu bar, scroll bar, window.
nonpalettized device
The color output of a palettized device is stored in an array of RAM locations associated with the device. Images that are output to the device do not contain colors in their pixel information. They contain indexes for the array of palette colors. The contents of the palette can be changed by software as a program runs.
nonpalettized display mode
A mode in which the bit depth indicates the total number of bits that are used to describe a pixel.
nonqueued message
A message sent directly to a window procedure.
nonsignaled
The state of an object used for synchronization in one of the wait functions is either signaled or nonsignaled. A nonsignaled state can prevent the wait function from returning. See also signaled, wait function.
nonspacing character
A character that prints over the preceding character – typically, an accent mark. See also base character.
normal filemark
A filemark that does not contain an erase gap. See also erase gap.
notification message
A message a control sends to its parent window when events, such as input from the user, occur.
NTFS file system (NTFS)
A file system that supports object-oriented applications by treating all files as objects with user-defined and system-defined attributes. NTFS provides all the capabilities of the file allocation table (FAT) file system without many of its limitations.
null brush
A logical brush created from a bitmap that matches the current window background colors. (A null brush is identical to a hollow brush.) See also bitmap , hollow brush, logical brush.


O

object
(1) An internal structure that represents a system resource, such as a file, a thread, or a graphic image. See also thread.

(2) A network resource that does not contain any further network resources. It is not necessarily possible to connect to an object.

overlapped input and output (I/O)
See asynchronous input and output (I/O).
overlapped window
A style of window meant to serve as an application's main window.
owned window
A window that has an owner. Being owned affects the window's position in the Z order and its visibility and can determine when the window is destroyed.
owner window
A window that affects aspects of another window's appearance and behavior.
owner-drawn button
A button with the style BS_OWNERDRAW. Unlike all other button types, an owner-drawn button has no predefined appearance or behavior. Also, the application, not the system, is responsible for painting it. See also button.
owner-drawn control
A predefined control that sends messages to its parent window when it must be drawn.
owner-drawn item
A menu item whose appearance is controlled by a menu's owner window rather than by the system. See also menu item, window.


P

page
A unit of memory that is used by the system in managing memory. The size of a page is computer dependent and can be determined by using the GetSystemInfo function. The system manages memory by assigning pages of memory to specific processes, moving pages to and from a paging file on disk to keep the most recently used pages in physical memory (RAM), and maintaining a page map for each process that keeps track of the current physical location of each committed page in a process's virtual address space. See also committed page, page map.
page coordinate space
The coordinate space in which all graphics device interface (GDI) drawing operations begin if an application has not set the world-space to page-space transformation.
page map
An internal data structure maintained by the system for each process that maps the pages of a process's virtual address space with the corresponding pages of physical storage. See also page.
paging file
A disk file that the system uses to increase the amount of physical storage.
palette
An array of colors currently available on a device.
palettized device
A device that uses the bit values in the frame buffer to directly define their color.
palettized display mode
A mode in which each pixel is a value representing an index into an associated palette. The bit depth of the display mode determines the number of colors that can be in the palette. For example, in an 8-bit palettized display mode, each pixel is a value from 0 to 255. In such a display mode, the palette can contain 256 entries.
palette animation
A method of updating the colors in the logical palette.
PANOSE numbers
Special values specified by an application to select a particular font.
parent process
A process (parent) that initiates and controls another process (child) in a multitasking environment. The parent process defines the environment for the child process. The parent process can suspend or complete its own processing while the child process continues its operation. See also child process.
parent window
A window that has one or more child windows.
partition
A logically distinct portion of memory or a storage device that the system references as though it were a physically separate unit. The partition is referenced as a separate volume. For example, a single fixed disk may be divided into two partitions, referred to as C and D, even though they exist on the same physical volume.
path
(1) A string that describes the location of a file or directory on a volume relative to the current directory or the root directory.

(2) One or more figures that are filled, outlined, or filled and outlined. See also directory, volume.

path bracket
One or more graphics device interface (GDI) functions embedded between a BeginPath and an EndPath function. (The BeginPath function defines the start of the bracket; the EndPath function defines the end.)
pattern brush
A logical brush created from an application-defined bitmap. See also bitmap, logical brush.
pen
A drawing tool used to draw lines and curves.
pen style
One of the cosmetic and geometric pen attributes that define the appearance of lines drawn with the pen. There are eight possible styles: solid, dashed, dotted, dashed and dotted, dash followed by two dots, invisible, inside frame, and user defined. See also cosmetic pen, geometric pen, pen.
pen type
An attribute that determines whether the pen's dimensions are specified in world units or device units.
performance monitoring
The process of determining the system resources an application consumes, such as processor time and memory.
persistent connection
A network connection that the system restores automatically when the user logs on.
physical brush
A bitmap that the system uses to paint the interior of filled shapes. A physical brush is a device driver's approximation of a logical brush. See also bitmap, logical brush.
physical device
The fourth and final coordinate space for most graphics device interface (GDI) drawing operations. (The points in this coordinate space may correspond to the desktop, a client area, or a page of printer paper.)
physical palette
See system palette.
picture frame
A rectangle defining the width and height of the picture stored in a metafile. (The dimensions of this rectangle are always specified in .01-mm units.) See also metafile.
pie
A region bounded by the intersection of an ellipse and two radials. A pie is outlined by using the current pen and filled by using the current brush. See also ellipse, radial.
pipe
A communication conduit with two ends. A process with a handle to one end can communicate through a pipe with a process having a handle to the other end. Pipes can be one way (where one end is read only and the other end is write only) or two way (where both ends of the pipe can be used for reading or writing). The Win32 application programming interface (API) provides both anonymous (unnamed) pipes and named pipes. See also anonymous pipe, handle, named pipe, process.
pipe instance
A separate conduit for named pipe communications between a client and a server process. A named pipe can have multiple instances, where all instances share the same pipe name but each instance has its own buffers and handles. See also handle, named pipe.
pixel
The smallest definable unit on a video display. (A pixel's size is a function of video-display technology.)
playing a metafile
The process of converting the records in a metafile into the respective device commands and drawing the corresponding picture on the device. See also metafile.
Point-to-Point Protocol (PPP)
The Point-to-Point Protocol, or PPP, is an industry-standard suite of control protocols that allow multiple network protocols to be carried on a point-to-point link. Windows NT supports IP, IPX, and NBF connections using PPP. This allows the use of applications that write to a network-specific interface, connections to third-party PPP servers, and remote access to the Internet.
polygon
A closed figure with straight sides. A polygon is outlined by using the current pen and filled by using the current brush. See also brush, pen.
polygon fill mode
An algorithm that determines the parts of a region that can be filled, painted, inverted, or clipped. See also region.
polygonal region
A region with the shape of a polygon. See also polygon, region.
pop-up item
A menu item that, when chosen, displays a pop-up menu. See also menu item, pop-up menu.
pop-up menu
A menu that is hidden until the user performs an action that causes the system to display the menu. See also menu.
pop-up window
A special type of overlapped window typically used for dialog boxes, message boxes, and other temporary windows that appear outside an application's main window.
PPP
See Point-to-Point Protocol.
precomposed character
An accented character represented by a single character value. See also base character, composite character, nonspacing character.
predefined control
A control belonging to a window class supplied by the system.
primary domain
The domain used by the local computer as its usual and default network environment. See also domain.
primary language identifier
An 8-bit value identifying the primary language in a language identifier. See also language identifier, sublanguage identifier.
primary thread
The initial thread of a process. Also called the main thread or thread 1. When the main or WinMain function of a primary thread returns, the ExitProcess function is called implicitly, terminating all other threads of the process. A primary thread does not differ from other threads with respect to signals because all signals are delivered to the thread that caused them. See also process, thread.
priority class
A process priority category (high, normal, or idle) used to determine the scheduling priorities of a process's threads. Each priority class has five levels. See also thread.
private memory
Pages of a process's memory that cannot be accessed by other processes. All memory objects allocated by the GlobalAlloc, LocalAlloc, VirtualAlloc, and HeapAlloc functions are in private pages.
process
An executing application that consists of a private virtual address space, code, data, and other operating system resources, such as files, pipes, and synchronization objects that are visible to the process. A process also contains one or more threads that run in the context of the process. See also pipe, process, thread.
profile
A set of configurable options for a user. See also control set.
push button
A rounded rectangle used by the user to start or cancel an operation by clicking the rectangle, which "pushes" the button. A default push button is "pushed" when the user presses the ENTER key. See also button.


Q

queued message
A message in a message queue. See also message queue.


R

race condition
A bug in a multithreaded process where the code of thread A relies on thread B to complete some action, but where there is no synchronization between the two threads. The process works if thread B wins the race by completing its action before thread A needs it, but the process fails if thread A wins the race. See also process, thread.
radial
A line drawn from the center of an ellipse to a point on the ellipse. See also ellipse.
radio button
A round button operated by the user to choose from a set of related but mutually exclusive options. The check mark for a radio button is a black dot. A radio button can assume two states: checked (dot) or unchecked (no dot). In automatic radio buttons, the system is responsible for changing the state of the radio button.
raster device
A device that creates text and graphics output by highlighting rows and columns of pixels (in the case of video displays) or rows and columns of dots (in the case of printers). See also pixel.
rasterizer
Converts the graphics commands and hints for TrueType glyphs into actual bitmaps that are drawn on a video display or page of paper. See also bitmap, glyph, dynamic-link library (DLL).
rectangular region
A region with the shape of a rectangle. See also region.
red, green, blue (RGB) format
A color format that identifies a given color with a red, green, blue (RGB) triplet. This format is used by video displays.
reference count
The number of times a string has been added to or deleted from an atom table. The AddAtom or GlobalAddAtom function increments the count; the DeleteAtom or GlobalDeleteAtom function decrements the count. See also atom table.
reference device
The device where the original picture was created.
reference device context (DC)
The device context associated with the reference device.
reflection
A transformation that creates a mirror image of an object.
region
A rectangle, polygon, ellipse (or a combination of two or more of these shapes) used by applications to define a part of the client area to be painted, inverted, filled with output, framed, or used for hit testing. See also ellipse, hit testing, polygon.
region operation
A procedure such as inverting, painting, clipping, or hit testing. See also clipping, hit testing.
registered clipboard format
A clipboard format registered by an application, as opposed to a standard clipboard format.
registry
The database in which configuration information is registered. This database takes the place of most configuration and initialization files for the system and new applications.
regular curve
A curve that defines the perimeter of a conic section.
render
To make data available in a specific clipboard format. See also clipboard format.
reparse point
A collection of user-defined data about a file or directory, the format of which is understood by the application that stores the data and by a file system filter, which you install to interpret the data and process the file or directory. When an application sets a reparse point, it stores this user-defined data, plus a reparse tag, which uniquely identifies the data stored. One use of reparse points is to link files, that is to allow a file or directory to exist as an entry within more than one directory or to exist as more than one entry in the same directory. Another is for mount points. For more information, see Reparse Points.
reserved page
A page of memory in a process's virtual address space that has been set aside for future use. The page is not accessible and has no physical storage associated with it. A reserve page reserves a range of virtual addresses that cannot be used subsequently by other allocation operations.
resolution
The accuracy of the timer event. A resolution value of zero means that the event must occur at the exact time requested; a resolution value of ten means that the event must occur within ten milliseconds of the requested time.
resource
Binary data the resource compiler or developer adds to an application's executable file. Windows resources include icons, cursors, menus, dialog boxes, bitmaps, fonts, keyboard-accelerator tables, message-table entries, string-table entries, version data, and user-defined data.
resource compiler
An application that creates a binary resource file based on the resource-definition file. The resource compiler can also append binary resource data to an executable file and create a resource table in the executable file's header. See also resource table.
resource-definition file
A text file containing descriptions of an application's resources. The resource compiler creates a binary resource file based on the contents of the resource-definition file. Resource-definition files usually have a .RC extension.
resource file
A binary file created by the resource compiler that contains an application's resource data. Resource files usually have a .RES extension. See also resource compiler.
resource object
An object file that consists of the resource file and the resource table. The linker links the resource object to the executable file. See also resource file.
resource table
Data the resource compiler adds to the header of an application's executable file. This data includes the location, name, type, language, and so on, of each resource in the executable file. See also resource compiler.
restore box
A button that, when clicked, restores the window to its previous size and position.
restored window
A window that does not have the WS_MAXIMIZE or WS_MINIMIZE style.
RGB color space
A color space type that represents colors as red, green and blue coordinates by mapping the color components onto a Cartesian coordinate system in three or more dimensions. red, green, and blue each have a numeric color value; their intensity and hue can be changed by adding to or subtracting from those values. All three coordinates are needed for the calculation of any color.
RGB format
See red, green, blue (RGB) format.
RGB triplet
Consists of three 8-bit values specifying the RGB intensities of its color components.
root directory
The topmost directory on a volume. Files and directories on a volume are organized in a tree structure whose entry point is the root directory. The root directory is referenced in a path by a single backslash (\\) or a leading backslash in a longer path (\\MYDIR\\MYFILE.TXT). See also directory, path, volume.
rotation
A transformation that rotates an object with respect to the coordinate-space origin.
run-time linking
Dynamic linking that occurs when the LoadLibrary and GetProcAddress functions are used to get the starting address of a dynamic-link library (DLL) function.


S

scalable font
A TrueType font. See also TrueType font.
scaling
A transformation that alters the apparent size of an object.
scan code
A device-dependent value that identifies a physical key on the keyboard. Each key on a keyboard generates two unique scan codes--one when the user presses the key and the other when the user releases the key.
scan line
A single row of adjacent pixels on a video display. See also pixel.
scheduler
The component of the operating system that determines which of the competing threads receives the next slice of the processor's time. See also thread.
screen buffer
A two-dimensional array of character and color data for output in a console window. A screen buffer can be accessed for reading and writing whether it is active or inactive. Its character data can be either a Unicode™ or ANSI value. See also console window.
screen coordinates
Coordinates relative to the upper left corner of the screen.
scroll bar
A window control that converts mouse or keyboard input into values that a window procedure can use to shift the contents of a window's client area either horizontally or vertically. See also window procedure.
scroll box
A movable area in a scroll bar that indicates the position of the information currently displayed in the associated window. The position of the scroll box is relative to the total amount of information available for display. See also scroll bar.
scrolling
The process of shifting a data object in a window's client area in order to see parts of the object that extend beyond the border of the client area.
scrolling range
The minimum and maximum values that a scroll bar can report. See also scroll bar.
secant
A line drawn through two points on an ellipse. See also ellipse.
sector
The atomic unit of disk allocation, reading, and writing. The sector size is set when the hard drive is physically formatted, usually at the factory. 512 byte sector sizes are common.
security domain
A collection of nodes in a security database that share a common set of user and group accounts.
seek
(1) With file input and output (I/O), to change the current position in the file. (The current position is the location where the next read or write operation will take place.)

(2) With a media device (such as a hard disk), to position the medium so a certain sector can be accessed. The seek operation involves a physical movement of the device, so the time it takes can often be perceived by the user.

selection field
The portion of a combo box that displays the currently selected item. Selecting an item in the list causes that item to appear in the selection field. In simple and drop-down combo boxes, the selection field is an edit control and can be used to enter input not in the list.
semaphore object
An interprocess synchronization object that maintains a count between zero and some maximum value. The object's state is set to signaled when its count is greater than zero, and nonsignaled when its count is zero. See also synchronization object.
service
An executable object that is installed in a registry database maintained by the Service Control Manager. The executable file associated with a service can be started at boot time by a boot program or by the system, or it can be started on demand by the Service Control Manager. The two types of service are Win32 service and driver service. See also driver service, Win32 service.
service control manager
A system process that provides a unified and secure means of controlling Win32 and driver services. Each computer that is running Windows NT has a service control manager process that is started during system startup.
service name
A string that a server application responds to when a client attempts to establish a conversation with the server.
setmark
A special recorded element that contains no user data and is used to provide a segmentation scheme hierarchically superior to filemarks. Setmarks typically provide faster positioning on high-capacity tapes.
share mode
A condition that indicates whether a file is to be shared for reading, writing, both, or neither.
shared arena
The Windows® 95 shared arena (or shared address space) is the memory in the address range between 2 GB and 3 GB. It contains components that must be mapped into the address space of every process, such as the 16-bit global heap, shared system DLLs, and file views of file mapping objects. The DPMI server also allocates memory in this address range.
shared memory
Memory that two or more processes can read from and write to. If the file-mapping object that references the shared memory has a name, the memory is referred to as "named shared memory."
sharepoint
A network resource that remote applications can address specifically and use across a network--for example, a printer or a shared directory. See also container.
shearing
A transformation that alters the apparent length and orientation of vertical or horizontal lines in an object.
shell
An application that enables users to group, start, and otherwise control other applications.
short filemark
A filemark that contains a short erase gap that cannot be overwritten unless the write operation is performed from the beginning of the partition or from an earlier long filemark.
show state
The collective qualities of a window at a given time (whether active or visible; minimized; maximized; or restored).
shut down
To stop all processes, flush all file-system buffers to disk, and bring the system to a condition in which it is safe to turn off the computer.
sibling window
A child window that has the same parent window as one or more other child windows.
signaled
The state of an object used for synchronization in one of the wait functions. A signaled state can enable the wait function to return. See also nonsignaled, wait function.
signature
A 4-byte value that identifies an enhanced metafile. See also enhanced metafile.
simple combo box
A combo box in which the list box is visible at all times.
simple list
A list in a combo box that is always visible. Combo boxes with the CBS_SIMPLE style contain simple lists.
single-byte character set
A mapping of characters to their identifying numeric values, in which each value is one byte wide. The ANSI and original equipment manufacturer (OEM) character sets are single-byte character sets. See also character set, multibyte character set, Unicode.
single-selection list box
A list box in which only one item can be selected at a time.
sizing border
A type of window border that enables the user to size the window by clicking and dragging the border.
solid brush
A logical brush created from a bitmap that contains pixels of the same color. See also bitmap, logical brush, pixel.
source
A configuration registry key that specifies message-file names for replacement strings in events logged by an application, service, or group of applications. Sources are subkeys of logfile keys. See also key, logfile, subkey.
standard cursors
The default cursors that the system automatically displays when users move windows or icons, resize windows, or wait. Standard cursors include an arrow, hourglass, crosshair, and I-beam. Standard cursors are also known as system cursors. See also cursor, icon, window.
standard icons
The default icons that the system displays in system message boxes. Standard icons include, among other bitmaps, a stop sign and a circled exclamation point. See also icon.
standard resource
A resource whose format is defined and recognized by the system. Standard resources include icons, cursors, menus, dialog boxes, bitmaps, fonts, keyboard accelerator tables, message-table entries, string-table entries, and version data.
standard scroll bar
A scroll bar created as part of the nonclient area of an overlapped, pop-up, or child window. See also scroll bar.
standard VGA
A video adapter that supports a resolution of 640 by 480 pixels and 16 simultaneous colors. See also pixel.
static control
A window control that displays text and graphics that require no response from the user. Static controls are typically used in dialog boxes.
stock brush
One of seven logical brushes maintained by the system. See also logical brush.
stock pen
A cosmetic pen created and maintained by the system. There are three kinds of stock pens: black, white, and invisible. See also cosmetic pen.
streaming
The process of transferring information from a storage device, such as a hard disk or CD-ROM, to a device driver.
string atom
An atom that identifies a character string in an atom table. See also atom, atom table.
string handle
A doubleword value, assigned by the operating system, that identifies a string passed between a dynamic data exchange (DDE) client and a DDE server. See also dynamic data exchange (DDE).
stroked path
A path that is outlined by using the pen that is currently selected into an application's device context. See also device context, path, pen.
structured exception handling
A mechanism for handling hardware- and software-generated exceptions. Structured exception handling gives developers complete control over the handling of exceptions, provides support for debuggers, and is usable across all programming languages and computers.
style names
One of two attributes used to organize TrueType® fonts. Style names include extra-bold, bold, and italic. (The other attribute used to organize TrueType fonts is the family name.) See also TrueType font.
subclass procedure
An application-defined window procedure that replaces a window's original window procedure when the window is subclassed. See also subclassing, window procedure.
subclassing
A technique that allows an application to intercept and process messages sent or posted to a particular window before the window has a chance to process them. See also subclass procedure.
subdirectory
A directory within another directory. See also directory.
subkey
An entry (or node) in the registry subordinate to a given key. With the exception of four predefined keys, all keys are subkeys of other keys. See also key, registry.
sublanguage identifier
An 8-bit value identifying the variant of a language in a language identifier. See also language identifier, primary language identifier.
subtractive color mixing
A method of color mixing that uses white as the base color, from which colors may be subtracted. If you begin with white, all colors are present in equal amounts. If you subtract cyan and yellow from white, the resulting image is magenta. In a green image, subtracting cyan will result in changing the image to yellow. The subtractive primary colors are cyan, yellow, and magenta.
subtractive color technology
The color technology, used by ink-based printers, that is based on the three primary colors cyan, yellow, and magenta. Other colors (except white) are obtained by combining two or more of the primaries in varying amounts. White is defined as the absence of the primaries. Black is defined as the presence of all the primaries.
super VGA
A video adapter that supports resolutions higher than 640-by-480 pixels or more than 16 simultaneous colors (or both).
superclass procedure
An application-defined window procedure that replaces the window procedure for a window of a particular window class when the class is superclassed. See also superclassing, window procedure.
superclassing
A technique that allows an application to create a new window class that has the basic functionality of the existing class, but with enhancements provided by the application. See also superclass procedure.
syllabary
A single character that represents what we would call a syllable, using consonant/vowel combinations as their linguistically-discrete units — for example, the sound created by "ta." This term would apply to Kana (Katakana and Hiragana) and Hangul scripts. Linguists use the word "syllabary" to define a system of phonemic (linguistically-distinct) syllabic units used in a language.
synchronization object
An object whose handle can be specified in one of the wait functions to coordinate the execution of multiple threads. Synchronization objects include change notification, console input, event, mutex, process, thread, and semaphore objects. See also object, wait function.
system directory
The directory that contains system dynamic-link libraries, drivers, and font files. See also directory.
System menu
See Window menu.
system metric
A dimension of a display element, such as the border width, scroll bar arrow height, icon height, and so on. System metrics may also describe other aspects of the operating system, such as whether a mouse is installed, whether double-byte characters are supported, and so on. See also scroll bar.
system paging file
The storage file that the system uses to hold pages of memory swapped out of RAM.
system palette
An array that identifies all of the colors that can be displayed simultaneously on a device. For most displays, this array is a subset of all possible colors that can appear on the display.
system time
The "real-time" clock format. System time uses a structure containing individual members for the date and time.


T

tape drive
A device that reads from and writes to a tape.
tape volume
A recording medium and its physical carrier.
tension
To move the tape to the end-of-medium marker and back to the beginning-of-medium marker in one command.
termination handler
A mechanism by which a developer ensures that a block of termination code is executed. A termination handler consists of a guarded body of code and a termination block. See also guarded body of code.
thread
The basic entity to which the operating system allocates CPU time. A thread can execute any part of the application's code, including a part currently being executed by another thread. All threads of a process share the virtual address space, global variables, and operating system resources of the process. See also process.
thread affinity mask
A bit vector in which each bit represents the processors that a thread is allowed to run on.
thread local storage
A storage method in which an index can be used by multiple threads of the same process to store and retrieve a different value for each thread. See also thread.
time-out value
The interval, in milliseconds, measured by a timer.
timer
An internal routine that causes the system to send a WM_TIMER message whenever a specified interval elapses.
timer object
An interprocess synchronization object whose state is set to signaled when the specified due time arrives. See also due time, synchronization object.
time slice
A unit of processor time (in clock ticks) allocated to a thread. See also thread.
title bar
A window component that displays an application-defined line of text. Typically, the text identifies the application or indicates the purpose of the window.
TLS
See thread local storage.
top-down DIB
A device-independent bitmap (DIB) whose origin lies at the top-left corner. See also bottom-up DIB.
top-level window
A window that has no parent window.
topic name
A string that identifies the type of data requested by a dynamic data exchange (DDE) client application.
topmost window
A window with the WS_EX_TOPMOST style. A topmost window overlaps all other non-topmost windows.
transaction filter
A flag that prevents the Data Exchange Management Library (DDEML) from passing an unwanted type of transaction to an application's dynamic data exchange (DDE) callback function. See also dynamic data exchange (DDE).
transformation
An algorithm that alters ("transforms") the size, orientation, and shape of objects.
translation
A transformation that shifts an object farther from or closer to the coordinate-space origin.
tristimulus value
The amounts of the three primary color stimuli necessary to produce a color match by additive color mixing.
TrueType font
A font whose glyphs are stored as a collection of line and curve commands plus a collection of hints. The system uses the line and curve commands to define the outline of the glyph's bitmap. The system uses the hints to adjust the length of the lines and shapes of the curves. These hints and the respective adjustments are based on the amount of scaling used to reduce or increase the size of the bitmap. See also bitmap, font, glyph.
try block
A guarded body of code in a try-except frame-based exception handler or try-finally termination handler. See also frame-based exception handler, guarded body of code, termination handler.


U

Unicode
A 16-bit character set capable of encoding all known characters and used as a worldwide character-encoding standard. Windows NT® uses Unicode exclusively; Windows® 95 and Windows® 98 do not.
unique volume name
A name containing a globally unique identifier (GUID) that is assigned to a volume. The name is guaranteed to be unique. Using unique volume names, you can avoid the ambiguity of drive letters in the Microsoft® MS-DOS®. operating system. This ambiguity arises because, unless you use the Microsoft® Windows NT®/Windows® 2000 Disk Administrator to assign MS-DOS drive letters to volumes, installing or removing a hard drive from a computer may affect the MS-DOS drive letters not only of the drive installed or removed, but of other drives as well. For more information, see Volume Mount Points and Mounting Volumes.
user-defined pen
A cosmetic or geometric pen that uses a unique series of dashes, dots, or dashes and dots defined by the user. See also cosmetic pen, geometric pen.
UTC
See Coordinated Universal Time.


V

value
Data associated with a key. A key may have zero or more values. Each value has three parts: a name, a type, and data. See also key.
VCN
Virtual cluster number. See virtual cluster.
vector device
A device that creates text and graphics output by drawing lines.
viewport
A rectangle in device space that is used to specify a transformation between page and device space. The viewport extents are always measured in pixels for a video display or dots for printers.
viewport extent
The width or height of the viewport.
viewport origin
The corner of the viewport from which the extents are measured. (The viewport-origin coordinates are specified with respect to the device-space origin.)
virtual cluster
One of the clusters of a file for which the clusters are in the order in which they are read sequentially in the file. Virtual clusters are distinguished from logical clusters. See also logical cluster.
virtual-key code
A device-independent value that identifies the purpose of a keystroke as interpreted by the keyboard device driver.
visible region
The part of the client area that is visible to the user.
visible window
A window that has the WS_VISIBLE style. A visible window is displayed on the screen and can receive user input.
volatile key
A key that is valid only until the next time the operating system is started. See also key.
volume
A storage medium, such as a disk or tape, that is formatted to contain files and directories. A volume is accessed through a disk drive. In a path, a volume is referenced by the letter of the disk drive that accesses the volume. For example, a fixed disk may be referred to as C. A single volume may be divided into more than one logical volume, also called a partition. Each partition is referenced by a unique volume identifier.


W

waitable timer object
See timer object.
wait function
A function that blocks the execution of the calling thread until a specified set of conditions has been met.
waiting thread
A thread whose execution is blocked while waiting for a wait function to return. See also wait function.
wide character
A synonym for a Unicode character; Unicode characters are 2 bytes wide.
widened path
A modified path. See also path.
wildcard characters
Characters that represent one or more characters in a filename. The wildcard characters are the question mark (?) and the asterisk (*). The question mark matches any single character; the asterisk matches any combination of characters. For example, if a directory contains files with the names BAT, B12, BOAT, and CAT, the pattern b\* matches the names BAT, B12, and BOAT. The pattern b?t matches only the name BAT.
Win32
The application programming interface in Windows 95, Windows 98, Windows NT, Windows 2000, and Windows CE that enables applications to use the 32-bit instructions available on 80386 and higher processors.
Win32 service
A service that conforms to the interface rules of the Service Control Manger. This enables the Service Control Manager to start the service at system startup or on demand and enables communication between the service and service control programs. A Win32 service can execute in its own process, or it can share a process with other Win32 services. See service, driver service.
window
A rectangle in page space that is used to specify a transformation between page and device space.
window extent
The width or height of the window.
window handle
A value, assigned by the system, that uniquely identifies a window.
Window menu
A pop-up menu, defined mainly by the operating system, that typically contains commands used to set a window's size or position, close a window or application, or activate a different application. See also pop-up menu.
window name
A text string that identifies a window for the user.
window origin
(1) The upper left corner of a window's client area.

(2) The corner of the window from which the extents are measured. (The window-origin coordinates are specified with respect to the page-space origin.)

window procedure
A function, called by the operating system, that controls the appearance and behavior of its associated windows. The procedure receives and processes all messages to these windows.
window style
A named constant that defines an aspect of the window's appearance and behavior not specified by the window's class.
window text
See window name.
Windows directory
The directory that contains Windows-based applications, initialization files, and help files. See also directory.
Windows metafile
One of two metafile formats. This format, used for applications written to run with Windows version 3.x, consists of a header and an array of metafile records. See also metafile record.
Windows time
The number of milliseconds since Windows started running. This time is recorded as a 32-bit value, so it overflows to zero every 49.7 days.
world coordinate space
The coordinate space in which all graphics device interface (GDI) drawing operations begin if an application has set the world-space to page-space transformation.
world space
The coordinate space in which all graphics device interface (GDI) drawing operations begin if an application has set the world-space to page-space transformation. Applications use world space to rotate shear, or reflect graphics output. World space measures 2^(32) units high by 2^(32) units wide, and is one of four coordinate spaces used in the Win32 API. See also device coordinate space, page coordinate space, and physical device.


X

x-axis
The axis that normally extends horizontally across a coordinate space.


Y

y-axis
The axis that normally extends vertically across a coordinate space.
YUV color space
A color space type that is true-color encoding. It uses one luminance value (Y) and two chroma values (UV). YUV is typically used by video displays.


Z

Z order
A stack of overlapping windows. Each window has a unique position in the Z order.


Topic Not Found

No matching topic was found. Some possible reasons and remedies are as follows:

  • The file (.chm) that contains the destination topic is not in the expected location.

    Remedy: Rerun the MSDN Library Setup.

  • The file (.chm) that contains the current topic or destination topic is out-of-date and the link is no longer valid.

    Remedy: Install the latest version of the MSDN Library.

  • The MSDN Library CD is not in the CD-ROM drive.

    Remedy: Insert the MSDN Library CD into the CD-ROM drive.