首页 > 代码库 > Microsoft Win32 to Microsoft .NET Framework API Map

Microsoft Win32 to Microsoft .NET Framework API Map

Microsoft Win32 to Microsoft .NET Framework API Map

.NET Development (General) Technical Articles
 
  Microsoft .NET Framework and Microsoft Visual Studio User Education Teams
Microsoft Corporation

January 2004

Applies to:
    Microsoft® .NET Framework version 1.0 or 1.1
    Microsoft Visual Studio® .NET
    Microsoft Win32® functions

Summary: This article identifies the Microsoft .NET Framework version 1.0 or 1.1 APIs that provide similar functionality to Microsoft Win32 functions. One or more relevant .NET Framework APIs are shown for each Win32 function listed. The intended audience for this article is experienced Win32 developers who are creating applications or libraries based on the Microsoft .NET Framework, but anyone looking for a managed counterpart for a Win32 function could find this document useful. (85 printed pages)

In this article, the Microsoft® Win32® functions are organized by category. Each Win32 function that is listed belongs to only one category, and each category is presented in its own table. An alphabetical list of the Win32 categories is provided, as well as a hierarchical list. To locate a Win32 function, select the appropriate category from one of the category lists or search the article for the name of the function. If you do not find the Win32 function that you are seeking, it means that no equivalent .NET Framework API exists in the .NET Framework version 1.0 or 1.1 or that the Win32 function and the relevant .NET Framework API were inadvertently omitted from the list.

If you believe that a Win32 function and the relevant .NET Framework API have been omitted from this article, please let us know by using the feedback link. For more information on the APIs listed in this article, see the Platform SDK documentation or the .NET Framework SDK documentation in the MSDN® library.

Alphabetical Win32 Category List

A-C

Atom functionsColor functions
Bitmap functionsCombo box functions
Brush functionsCommon dialog box functions
Button functionsConsole functions
Clipboard functionsCoordinate functions
Clipping functonsCursor functions

D-I

Debugging functionsFile I/O functions
Device context functionsFile system functions
Dialog box functionsFilled shape functions
Dynamic-link library functionsFont and text functions
Error handling functionsIcon functions
Event logging functionsInput Method Editor functions

J-N

Keyboard accelerator functionsMessage and message queue functions
Keyboard input functionsMetafile functions
Line and curve functionsMouse input functons
List box functionsMultiple display monitor functions
Memory management functionsMultiple-document interface functions
Menu functionsNational language functions

O-R

Painting and drawing functionsPSAPI functions
Path functionsRectangle functions
Pen functionsRegion functions
Performance monitoring functionsRegistry functions
Printing functionsResource functions
Process and thread functionsRich edit control functions

S-T

Scroll bar functionsTape backup functions
Service functionsText object model functions
String functionsTime functions
Structured exception-handling functionsTimer functions
Synchronization functionsTool Help functions
System information functions 

U-Z

Unicode and character set functionsWindow functions
User profile functionsWindow class functions
Version information functionsWindow procedure functions
 Window property functions

Hierarchical Win32 Category List

Base Services

Debugging and Error HandlingMiscellaneous
DebuggingMemory management
Error handlingUser profile
Event loggingPerformance
Structured exception-handlingPerformance monitoring
DLLs, Processes, and ThreadsPSAPI
Console applicationsTool Help
Dynamic-link libraryWindows System Information
Process and threadRegistry
ServiceSystem information
SynchronizationTime
Files and I/O 
File I/O 
File system 
Tape backup 

Graphics Device Interface

BitmapMetafile
BrushMultiple display monitor
ClippingNational language
ColorPainting and drawing
CoordinatePath
Device contextPen
Filled shapePrinting and print spooler
Font and textRectangle
Input Method EditorRegion
Line and curveUnicode and character set

User Interface

ControlsUser Input
ButtonCommon dialog box
Combo boxKeyboard accelerator
List boxKeyboard input
Rich edit controlMouse input
Scroll barWindowing
Text object modelDialog box
Data ExchangeMessage and message queue
AtomMultiple-document interface
ClipboardTimer
ResourcesWindow
CursorWindow class
IconWindow procedure
MenuWindow property
Resource 
String 
Version information 

Atom Functions

Win32 functionDescription.NET Framework API
AddAtomAdds a character string to the local atom table.System.String.Intern

Note   String is not exactly an atom.

FindAtomSearches the local atom table for the specified character string.System.String.IsInterned

Note   Stringis not exactly an atom.

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Bitmap Functions

Win32 functionDescription.NET Framework API
AlphaBlendDisplays a bitmap with transparent or semitransparent pixels.System.Drawing.Graphics.DrawImage
BitBltPerforms a bit-block transfer.System.Drawing.Graphics.DrawImage
CreateBitmapCreates a bitmap.System.Drawing.Bitmap constructor

Note   Creates a DIB, not a DDB.

GetBitmapDimensionExGets the dimensions of a bitmap.System.Drawing.Bitmap.Size
GetDIBColorTableRetrieves RGB color values from a DIB section bitmap.System.Drawing.Bitmap.Palette
GetDIBitsCopies a bitmap into a buffer.System.Drawing.Bitmap.LockBits
GetPixelGets the RGB color value of the pixel at a given coordinate.System.Drawing.Bitmap.GetPixel
GradientFillFills rectangle and triangle structures.System.Drawing.Graphics.FillRectangle(Drawing2D.LinearGradiantBrush, Rectangle)
LoadBitmapLoads a bitmap from a module‘s executable file.System.Drawing.Bitmap.Bitmap(Type, String)
SetPixelSets the color for a pixel.System.Drawing.Bitmap.SetPixel
SetPixelVSets a pixel to the best approximation of a color.System.Drawing.Bitmap.SetPixel(, Graphics.GetNearestColor(Color))
StretchBltCopies a bitmap and stretches or compresses it.System.Drawing.Graphics.DrawImage

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Brush Functions

Win32 functionDescription.NET Framework API
CreateBrushIndirectCreates a brush with a specified style, color, and pattern.Any of the following:
System.Drawing.Brushes
System.Drawing.SolidBrush
System.Drawing.TextureBrush
System.Drawing.Drawing2D.HatchBrush
System.Drawing.Drawing2D.LinearGradientBrush
System.Drawing.Drawing2D.PathGradientBrush
CreateHatchBrushCreates a brush with a hatch pattern and color.System.Drawing.Drawing2D.HatchBrush constructor
CreatePatternBrushCreates a brush with a bitmap pattern.System.Drawing.TextureBrush constructor
CreateSolidBrushCreates a brush with a solid color.System.Drawing.SolidBrush constructor
GetSysColorBrushGets a handle for a brush that corresponds to a color index.System.Drawing.Brushes class

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Button Functions

Win32 functionDescription.NET Framework API
CheckDlgButtonChanges the check state of a button control.System.Windows.Forms.CheckBox.Checked
CheckRadioButtonAdds a check mark to a specified radio button in a group and removes a check mark from all other radio buttons in the group.System.Windows.Forms.RadioButton.Checked
IsDlgButtonCheckedDetermines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither.System.Windows.Forms.CheckBox.CheckState

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Clipboard Functions

Win32 functionDescription.NET Framework API
CountClipboardFormatsRetrieves the number of different data formats currently on the clipboard.System.Windows.Forms.DataObject.GetFormats
EnumClipboardFormatsEnumerates the data formats currently available on the clipboard.System.Windows.Forms.DataObject.GetFormats
GetClipboardDataRetrieves data from the clipboard in a specified format.System.Windows.Forms.ClipBoard.GetDataObject
IsClipboardFormatAvailableDetermines whether the clipboard contains data in the specified format.System.Windows.Forms.DataObject.GetDataPresent
RegisterClipboardFormatRegisters a new clipboard format.System.Windows.Forms.DataFormats.GetFormat
SetClipboardDataPlaces data on the clipboard in a specified clipboard format.System.Windows.Forms.ClipBoard.SetDataObject

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Clipping Functions

Win32 functionDescription.NET Framework API
ExcludeClipRectCreates a new clipping region that consists of the existing clipping region minus the specified rectangle.System.Drawing.Graphics.ExcludeClip
ExtSelectClipRgnCombines the specified region with the current clipping region using the specified mode.System.Drawing.Graphics.SetClip
GetClipBoxRetrieves the dimensions of the tightest bounding rectangle that can be drawn around the current visible area on the device.System.Drawing.Graphics.VisibleClipBounds
GetClipRgnRetrieves a handle identifying the current application-defined clipping region for the specified device context.System.Drawing.Graphics.Clip
IntersectClipRectCreates a new clipping region from the intersection of the current clipping region and the specified rectangle.System.Drawing.Graphics.IntersectClip
OffsetClipRgnMoves the clipping region of a device context by the specified offsets.System.Drawing.Graphics.TranslateClip
PtVisibleDetermines whether the specified point is within the clipping region of a device context.System.Drawing.Graphics.IsVisible
RectVisibleDetermines whether any part of the specified rectangle lies within the clipping region of a device context.System.Drawing.Graphics.IsVisible
SelectClipPathSelects the current path as a clipping region for a device context, combining the new region with any existing clipping region by using the specified mode.System.Drawing.Graphics.SetClip
SelectClipRgnSelects a region as the current clipping region for the specified device context.System.Drawing.Graphics.Clip

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Color Functions

Win32 functionDescription.NET Framework API
CreateHalftonePaletteCreates a halftone palette for the specified device context.System.Drawing.Graphics.GetHalftonePalette
CreatePaletteCreates a logical palette.System.Drawing.Image.Palette
GetNearestColorRetrieves a color value identifying a color from the system palette that will be displayed when the specified color value is used.System.Drawing.Graphics.GetNearestColor
GetPaletteEntriesRetrieves a specified range of palette entries from the given logical palette.System.Drawing.Image.Palette.Entries

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Combo Box Functions

Win32 functionDescription.NET Framework API
DlgDirListComboBoxReplaces the contents of a combo box with the names of specified subdirectories and files.System.Windows.Forms.ComboBox.Items.AddRange(System.IO.Directory.GetFileSystemEntries)
DlgDirSelectComboBoxExRetrieves the current selection from a combo box filled by using DlgDirListComboBox.System.Windows.Forms.ComboBox.SelectedItem
GetComboBoxInfoRetrieves information about a specified combo box.System.Windows.Forms.ComboBox properties

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Common Dialog Box Functions

Win32 functionDescription.NET Framework API
ChooseColorCreates a Color dialog box that enables the user to select a color.System.Windows.Forms.ColorDialog constructor

Note   Dialog cannot be modified through a hook.

ChooseFontCreates a Font dialog box that enables the user to choose attributes for a logical font.System.Windows.Forms.FontDialog constructor

Note   Dialog cannot be modified through a hook.

GetFileTitleRetrieves the name of the specified file.System.IO.FileInfo.Name

Note   Does not take user preferences into account.

GetOpenFileNameCreates an Open dialog box that lets the user specify the drive, directory, and name of a file or set of files to open.System.Windows.Forms.OpenFileDialog.ShowDialog

Note   Dialog cannot be modified through a hook.

GetSaveFileNameCreates a Save dialog box that lets the user specify the drive, directory, and name of a file to save.System.Windows.Forms.SaveFileDialog.ShowDialog

Note   Dialog cannot be modified through a hook.

PageSetupDlgCreates a Page Setup dialog box that enables the user to specify the attributes of a printed page.System.Windows.Forms.PageSetupDialog.ShowDialog

Note   Dialog cannot be modified through a hook.

PrintDlgDisplays a Print dialog box.System.Windows.Forms.PrintDialog.ShowDialog

Note   Dialog cannot be modified through a hook.

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Console Functions

Win32 functionDescription.NET Framework API
GetStdHandleRetrieves a handle for the standard input, standard output, or standard error device.System.Console.OpenStandardIn
System.Console.OpenStandardOut
System.Console.OpenStandardError
ReadConsoleReads character input from the console input buffer and removes it from the buffer.System.Console.Read
SetStdHandleSets the handle for the standard input, standard output, or standard error device.System.Console.SetIn
System.Console.SetOut
System.Console.SetError
WriteConsoleWrites a character string to a console screen buffer beginning at the current cursor location.System.Console.Write

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Coordinate Functions

Win32 functionDescription.NET Framework API
ClientToScreenConverts the client-area coordinates of a specified point to screen coordinates.System.Windows.Forms.Form.PointToScreen
CombineTransformConcatenates two world-space to page-space transformations.System.Drawing.Drawing2D.Matrix.Multiply
DPtoLPConverts device coordinates into logical coordinates.System.Drawing.Graphics.TransformPoints
GetMapModeRetrieves the current mapping mode.System.Drawing.Graphics.PageUnit
GetWindowExtExRetrieves the x-extent and y-extent of the window for the specified device context.System.Drawing.Graphics.PageScale
GetWindowOrgExRetrieves the x-coordinates and y-coordinates of the window origin for the specified device context.System.Drawing.Graphics.Transform.OffsetX
System.Drawing.Graphics.Transform.OffsetY
GetWorldTransformRetrieves the current world-space to page-space transformation.System.Drawing.Graphics.Transform
LPtoDPConverts logical coordinates into device coordinates.System.Drawing.Graphics.TransformPoints
ModifyWorldTransformChanges the world transformation for a device context using the specified mode.System.Drawing.Graphics.Transform
OffsetViewportOrgExModifies the viewport origin for a device context using the specified horizontal and vertical offsets.System.Drawing.Graphics.TranslateTransform
OffsetWindowOrgExModifies the window origin for a device context using the specified horizontal and vertical offsets.System.Drawing.Graphics.TranslateTransform
ScreenToClientConverts the screen coordinates of a specified point on the screen-to-client coordinates.System.Windows.Forms.Form.PointToClient
SetMapModeSets the mapping mode of the specified device context.System.Drawing.Graphics.PageUnit
SetWindowExtExSets the horizontal and vertical extents of the window for a device context by using the specified values.System.Drawing.Graphics.PageScale
Drawing.Graphics.ScaleTransform
SetWindowOrgExSpecifies which window point maps to the viewport origin (0,0).System.Drawing.Graphics.TranslateTransform
SetWorldTransformSets a two-dimensional linear transformation between world space and page space for the specified device context.System.Drawing.Graphics.Transform

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Cursor Functions

Win32 functionDescription.NET Framework API
ClipCursorConfines the cursor to a rectangular area on the screen.System.Windows.Forms.Cursor.Clip
CopyCursorCopies the specified cursor.System.Windows.Forms.Cursor.CopyHandle
CreateCursorCreates a cursor having the specified size, bit patterns, and hot spot.System.Windows.Forms.Cursor constructor
System.Windows.Forms.Cursor.Size
System.Windows.Forms.Cursor.Position
DestroyCursorDestroys a cursor.System.Windows.Forms.Cursor.Dispose
GetClipCursorRetrieves the screen coordinates of the rectangular area to which the cursor is confined.System.Windows.Forms.Cursor.Clip
GetCursorRetrieves a handle to the current cursor.System.Windows.Forms.Cursor.Handle
GetCursorInfoRetrieves information about the global cursor.System.Windows.Forms.Cursor.Position
System.Windows.Forms.SystemInformation.CursorSize
GetCursorPosRetrieves the cursor‘s position.System.Windows.Forms.Control.MousePosition
System.Windows.Forms.Cursor.Position
LoadCursorLoads a cursor resource from an executable file.System.Windows.Forms.Cursor constructor
LoadCursorFromFileCreates a cursor based on data contained in a file.System.Windows.Forms.Cursor constructor
SetCursorSets the cursor shape.System.Windows.Forms.Cursor.Current
SetCursorPosMoves the cursor to the specified screen coordinates.System.Windows.Forms.Cursor.Position
ShowCursorDisplays or hides the cursor.System.Windows.Forms.Cursor.Show
Windows.Forms.Cursor.Hide

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Debugging Functions

Win32 functionDescription.NET Framework API
DebugActiveProcessEnables a debugger to attach to an active process and debug it.System.Diagnostics.Debugger.Launch
DebugBreakCauses a breakpoint exception to occur in the current process.System.Diagnostics.Debugger.Break
IsDebuggerPresentDetermines whether the calling process is running under the context of a debugger.System.Diagnostics.Debugger.IsAttached
OutputDebugStringSends a string to the debugger for display.System.Diagnostics.Debugger.Log

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Device Context Functions

Win32 functionDescription.NET Framework API
ChangeDisplaySettingsChanges the settings of the default display device to the specified graphics mode.System.Management.ManagementClass("Win32_VideoController")
ChangeDisplaySettingsExChanges the settings of the specified display device to the specified graphics mode.System.Management.ManagementClass("Win32_VideoController")
DeviceCapabilitiesRetrieves the capabilities of a printer device driver.System.Drawing.Printing.PageSettings
System.Drawing.Printing.PrinterSettings
EnumDisplayDevicesRetrieves information about the display devices in a system.System.Management.ManagementClass("Win32_DesktopMonitor")
EnumDisplaySettingsRetrieves information about one of the graphics modes for a display device.System.Management.ManagementClass("CIM_VideoControllerResolution")
GetDCRetrieves a handle to a display device context for the client area of a specified window or for the entire screen.To retrieve a Graphics object, use any of the following:
System.Drawing.Graphics.FromHwnd(Windows.Forms.Control.Handle)
System.Drawing.Printing.PrintPageEventArgs.Graphics
System.Windows.Forms.PaintEventArgs.Graphics

To explicitly retrieve a handle, use the following:
System.Drawing.Graphics.GetHdc

GetDCExRetrieves a handle to a display device context for the client area of a specified window or for the entire screen.To retrieve a Graphics object, use any of the following:
System.Drawing.Graphics.FromHwnd(Windows.Forms.Control.Handle)
System.Drawing.Printing.PrintPageEventArgs.Graphics
System.Windows.Forms.PaintEventArgs.Graphics

To explicitly retrieve a handle, use the following:
System.Drawing.Graphics.GetHdc

GetDeviceCapsRetrieves device-specific information for the specified device.System.Drawing.Graphics properties
System.Drawing.Printing.PrinterSettings
System.Management
classes
GetLayoutRetrieves the layout of a device context.System.Windows.Forms.Control.RightToLeft
GetObjectRetrieves information for the specified graphics object.System.Drawing.Bitmap properties
System.Drawing.Brush
properties
System.Drawing.Font
properties
System.Drawing.Pen
properties
GetObjectTypeRetrieves the type of the specified object.System.Object.GetType
GetStockObjectRetrieves a handle to one of the stock pens, brushes, fonts, or palettes.System.Drawing.Brushes
System.Drawing.Pens
ReleaseDCReleases a device context, freeing it for use by other applications.System.Drawing.Graphics.ReleaseHdc
SetLayoutSets the layout for a device context.System.Windows.Forms.Control.RightToLeft = System.Windows.Forms.RightToLeft.Yes

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Dialog Box Functions

Win32 functionDescription.NET Framework API
CreateDialogCreates a modeless dialog box from a dialog box template resource.System.Windows.Forms.Form constructor
System.Windows.Forms.Form
properties
CreateDialogIndirectCreates a modeless dialog box from a dialog box template in memory.System.Windows.Forms.Form constructor
System.Windows.Forms.Form
properties
DefDlgProcCalls the default dialog box window procedure to provide default processing for any window messages that a dialog box with a private window class does not process.System.Windows.Forms.Form.DefWndProc
DialogBoxCreates a modal dialog box from a dialog box template resource.System.Windows.Forms.Form constructor
System.Windows.Forms.Form.ShowDialog
DialogBoxIndirectCreates a modal dialog box from a dialog box template in memory.System.Windows.Forms.Form constructor
System.Windows.Forms.Form.ShowDialog
DialogProcAn application-defined callback function used with the CreateDialog and DialogBox families of functions.System.Windows.Forms.Form.WndProc
EndDialogDestroys a modal dialog box.System.Windows.Forms.Form.Close
GetDlgCtrlIDRetrieves the identifier of the specified control.System.Windows.Forms.Form.Controls.IndexOf
GetDlgItemRetrieves a handle to a control in the specified dialog box.System.Windows.Forms.Form.Controls.Item
GetDlgItemIntTranslates the text of a specified control in a dialog box into an integer value.System.Int32.Parse(Form.Text)
System.UInt32.Parse(Form.Text)
GetDlgItemTextRetrieves the title or text associated with a control in a dialog box.System.Windows.Forms.Form.Controls.Item[].Text
GetNextDlgGroupItemRetrieves a handle to the first control in a group of controls that precedes (or follows) the specified control.Iterate through the controls:
System.Windows.Forms.Form.Controls.Item

Remember to determine whether the control is active by referencing the Enabled and Visible properties of the control.

Note   The order that the controls are presented in might not be the same order in which GetNextDlgGroupItem presents the controls.

GetNextDlgTabItemRetrieves a handle to the first control that has the WS_TABSTOP style that precedes (or follows) the specified control.Iterate through the controls:
System.Windows.Forms.Form.Controls.Item

Remember to determine whether the control is active by referencing the Enabled, Visible,and TabStop properties of the control.

Note   The order that the controls are presented in might not be the same order in which GetNextDlgGroupItem presents the controls.

MessageBoxCreates, displays, and operates a message box.System.Windows.Forms.MessageBox.Show
MessageBoxExCreates, displays, and operates a message box.System.Windows.Forms.MessageBox.Show
MessageBoxIndirectCreates, displays, and operates a message box.System.Windows.Forms.MessageBox.Show
SendDlgItemMessageSends a message to the specified control in a dialog box.System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message)
SetDlgItemIntSets the text of a control in a dialog box to the string representation of a specified integer value.System.Windows.Forms.Control.Text = System.Int32.ToString
SetDlgItemTextSets the title or text of a control in a dialog box.System.Windows.Forms.Control.Text

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Dynamic-Link Library Functions

Win32 functionDescription.NET Framework API
GetModuleFileNameRetrieves the full path and file name for the file containing the specified module.System.Reflection.Module.FullyQualifiedName
GetModuleHandleRetrieves a module handle for the specified module.System.Runtime.InteropServices.Marshal.GetHINSTANCE
LoadLibraryMaps the specified executable module into the address space of the calling process.Any of the following:
System.Reflection.Assembly.Load
System.Reflection.Assembly.LoadFrom
System.Reflection.Assembly.LoadWithPartialName
LoadLibraryExMaps the specified executable module into the address space of the calling process.Any of the following:
System.Reflection.Assembly.Load
System.Reflection.Assembly.LoadFrom
System.Reflection.Assembly.LoadWithPartialName

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Error Handling Functions

Win32 functionDescription.NET Framework API
FatalAppExitDisplays a message box and terminates the application when the message box is closed.System.Windows.Forms.MessageBox.Show
System.Diagnostics.Process.Kill
GetLastErrorRetrieves the calling thread‘s last-error code value.System.Runtime.InteropServices.Marshall.GetLastWin32Error

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Event Logging Functions

Win32 functionDescription.NET Framework API
ClearEventLogClears the specified event log, and optionally saves the current copy of the log file to a backup file.System.Diagnostics.EventLog.Clear
CloseEventLogCloses a read handle to the specified event log.System.Diagnostics.EventLog.Close
DeregisterEventSourceCloses a write handle to the specified event log.System.Diagnostics.EventLog.DeleteEventSource
GetNumberOfEventLogRecordsRetrieves the number of records in the specified event log.System.Diagnostics.EventLog.Entries.Count
GetOldestEventLogRecordRetrieves the absolute record number of the oldest record in the specified event log.System.Diagnostics.EventLogEntryCollection[0]
System.Diagnostics.EventLogEntry.TimeWritten
NotifyChangeEventLogEnables an application to receive notification when an event is written to the specified event log file.System.Diagnostics.EventLog.EnableRaisingEvents
OpenBackupEventLogOpens a handle to a backup event log.System.Diagnostics.EventLog constructor
OpenEventLogOpens a handle to an event log.System.Diagnostics.EventLog constructor
ReadEventLogReads a whole number of entries from the specified event log.System.Diagnostics.EventLogEntryCollection.CopyTo
RegisterEventSourceRetrieves a registered handle to an event log.System.Diagnostics.EventLog.CreateEventSource
ReportEventWrites an entry at the end of the specified event log.System.Diagnostics.EventLog.WriteEntry

Alphabetical Win32 Category List
Hierarchical Win32 Category List

File I/O Functions

Win32 functionDescription.NET Framework API
CopyFileCopies an existing file to a new file.Either of the following:
System.IO.File.Copy
IO.FileInfo.CopyTo
CreateDirectoryCreates a new directory.Any of the following:
System.IO.Directory.CreateDirectory
System.IO.Directory.CreateSubdirectory
System.IO.DirectoryInfo.Create
CreateFileCreates or opens a file object.System.IO.File classand System.IO.FileInfo class
DeleteFileDeletes an existing file.Any of the following:
System.IO.Directory.Delete
System.IO.DirectoryInfo.Delete
System.IO.File.Delete
System.IO.FileInfo.Delete
FileIOCompletionRoutineAn application-defined callback function used with ReadFileEx and WriteFileEx.User defined.
FindCloseCloses the specified search handle.See FindFirstFile and FindNextFile
FindCloseChangeNotificationStops change notification handle monitoring.System.IO.FileSystemWatcher.EnableRaisingEvents
FindFirstChangeNotificationCreates a change notification handle.System.IO.FileSystemWatcher class
FindFirstFileSearches a directory for a file whose name matches the specified file name.Any of the following:
System.IO.Directory.Exists
System.IO.Directory.GetDirectories
System.IO.Directory.GetFileSystemEntries
System.IO.Directory.GetFiles
System.IO.DirectoryInfo.Exists
System.IO.DirectoryInfo.GetDirectories
System.IO.DirectoryInfo.GetFileSystemInfos
System.IO.DirectoryInfo.GetFiles
System.IO.File.Exists
System.IO.FileInfo.Exists
FindFirstFileExSearches a directory for a file whose name and attributes match the specified file name.Same as FindFirstFile
FindNextChangeNotificationRequests that the operating system signal a change notification handle the next time it detects an appropriate change.System.IO.FileSystemWatcher class
FindNextFileContinues a file search.Any of the following:
System.IO.Directory.GetDirectories
System.IO.Directory.GetFileSystemEntries
System.IO.Directory.GetFiles
System.IO.DirectoryInfo.GetDirectories
System.IO.DirectoryInfo.GetFileSystemInfos
System.IO.DirectoryInfo.GetFiles
FlushFileBuffersClears the buffers for the specified file and causes all buffered data to be written to the file.System.IO.FileStream.Flush
GetBinaryTypeDetermines whether a file is executable.System.IO.FileSystemInfo.Extension

Note   Only manipulates strings; does not do a file-system check.

GetCurrentDirectoryRetrieves the current directory for the current process.System.IO.Directory.GetCurrentDirectory
GetDriveTypeDetermines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.System.Management.ManagementObject("Win32_LogicalDisk.DeviceID=\"C:\"").Get
System.Management.ManagementObject.Properties
System.IO.DriveInfo.DriveType
GetFileAttributesRetrieves attributes for a specified file or directory.Any of the following:
System.IO.Directory.GetAttributes
System.IO.File.GetAttributes
System.IO.FileSystemInfo.Attributes
GetFileAttributesExRetrieves attributes for a specified file or directory.Any of the following:
System.IO.Directory.GetAttributes
System.IO.File.GetAttributes
System.IO.FileSystemInfo.Attributes
GetFileInformationByHandleRetrieves file information for a specified file.System.IO.FileInfo properties
GetFileSizeRetrieves the size of a specified file.Either of the following:
System.IO.FileInfo.Length
System.IO.FileStream.Length
GetFileSizeExRetrieves the size of a specified file.Either of the following:
System.IO.FileInfo.Length
System.IO.FileStream.Length
GetFullPathNameRetrieves the full path and file name of a specified file.Either of the following:
System.IO.FileSystemInfo.FullName
System.IO.Path.GetFullPath
GetTempFileNameCreates a name for a temporary file.System.IO.Path.GetTempFileName
GetTempPathRetrieves the path of the directory designated for temporary files.System.IO.Path.GetTempPath
LockFileLocks a region in an open file.System.IO.FileStream.Lock
LockFileExLocks a region in an open file for shared or exclusive access.System.IO.FileStream.Lock
MoveFileMoves an existing file or a directory.Any of the following:
System.IO.Directory.Move
System.IO.DirectoryInfo.MoveTo
System.IO.File.Move
System.IO.FileInfo.MoveTo
ReadDirectoryChangesWRetrieves information describing the changes occurring within a directory.System.IO.FileSystemWatcher class
ReadFileReads data from a file, starting at the specified position.Any of the following:
System.IO.FileStream.BeginRead/EndRead
System.IO.FileStream.Read
System.IO.FileStream.ReadByte
ReadFileExReads data from a file asynchronously.System.IO.FileStream.BeginRead/EndRead
RemoveDirectoryDeletes an existing empty directory.Either of the following:
System.IO.Directory.Delete
System.IO.DirectoryInfo.Delete
SearchPathSearches for the specified file.Any of the following:
System.IO.Directory.Exists
System.IO.Directory.GetDirectories
System.IO.Directory.GetFileSystemEntries
System.IO.Directory.GetFiles
System.IO.DirectoryInfo.Exists
System.IO.DirectoryInfo.GetDirectories
System.IO.DirectoryInfo.GetFileSystemInfos
System.IO.DirectoryInfo.GetFiles
System.IO.File.Exists
System.IO.FileInfo.Exists
SetCurrentDirectoryChanges the current directory for the current process.System.IO.Directory.SetCurrentDirectory
SetEndOfFileMoves the end-of-file position for the specified file.System.IO.FileStream.SetLength
SetFileAttributesSets the attributes for a file.System.IO.File.SetAttributes
SetFilePointerMoves the file pointer of an open file.Either of the following:
System.IO.FileStream.Position
System.IO.FileStream.Seek
SetFilePointerExMoves the file pointer of an open file.Either of the following:
System.IO.FileStream.Position
System.IO.FileStream.Seek
UnlockFileUnlocks a previously locked region in an open file.System.IO.FileStream.Unlock
UnlockFileExUnlocks a previously locked region in an open file.System.IO.FileStream.Unlock
WriteFileWrites data to a file.Any of the following:
System.IO.FileStream.BeginWrite
and EndWrite
System.IO.FileStream.Write
System.IO.FileStream.WriteByte
System.IO.BinaryWriter.Write
WriteFileExWrites data to a file asynchronously.System.IO.FileStream.BeginWrite and EndWrite

Alphabetical Win32 Category List
Hierarchical Win32 Category List

File System Functions

Used with file systems:

Win32 functionDescription.NET Framework API
GetDiskFreeSpaceRetrieves information about the specified disk, including the amount of free space on the disk.System.Management.ManagementObject("Win32_LogicalDisk.DeviceID=\"C:\"").Get
System.Management.ManagementObject.Properties
GetDiskFreeSpaceExRetrieves information about the specified disk, including the amount of free space on the disk.System.Management.ManagementObject("Win32_LogicalDisk.DeviceID=\"C:\"").Get
System.Management.ManagementObject.Properties
GetLogicalDriveStringsFills a buffer with strings that specify valid drives in the system.Either of the following:
System.Environment.GetLogicalDrives
System.IO.Directory.GetLogicalDrives

Used with an encrypted file system:

Win32 functionDescription.NET Framework API
DecryptFileDecrypts an encrypted file or directory.System.Security.Cryptography.CryptoStream.Read
EncryptFileEncrypts a file or directory.System.Security.Cryptography.CryptoStream.Write
FileEncryptionStatusRetrieves the encryption status of the specified file.System.IO.FileSystemInfo.Attributes

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Filled Shape Functions

Win32 functionDescription.NET Framework API
ChordDraws an area bounded by an ellipse and a line segment.System.Drawing.Graphics.DrawArc
System.Drawing.Graphics.DrawLine
EllipseDraws an ellipse.System.Drawing.Graphics.DrawEllipse
System.Drawing.Graphics.FillEllipse
FillRectFills a rectangle using a brush.System.Drawing.Graphics.FillRectangle
InvertRectInverts the color values of the pixels in a rectangle.System.Windows.Forms.ControlPaint.DrawReversibleFrame
System.Windows.Forms.ControlPaint.DrawReversibleLine
PieDraws a pie-shaped wedge bounded by an ellipse and two radials.System.Drawing.Graphics.DrawPie
System.Drawing.Graphics.FillPie
PolygonDraws a polygon.System.Drawing.Graphics.DrawPolygon
System.Drawing.Graphics.FillPolygon
RectangleDraws a rectangle.System.Drawing.Graphics.DrawRectangle
System.Drawing.Graphics.FillRectangle
RoundRectDraws a rectangle with rounded corners.System.Drawing.Drawing2D.GraphicsPath.AddLines
System.Drawing.Pen.LineJoin = System.Drawing.Pen.LineJoin.Round
System.Drawing.Graphics.DrawPath
System.Drawing.Graphics.FillPath

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Font and Text Functions

Win32 functionDescription.NET Framework API
AddFontMemResourceExAdds an embedded font to the system font table.System.Drawing.Text.PrivateFontCollection.AddMemoryFont
AddFontResourceExAdds a private or non-enumerable font to the system font table.System.Drawing.Text.PrivateFontCollection.AddFontFile
CreateFontCreates a logical font.System.Drawing.Font constructor
DrawTextDraws formatted text in a rectangle.System.Drawing.Graphics.DrawString
DrawTextExDraws formatted text in a rectangle.System.Drawing.Graphics.DrawString
EnumFontFamExProcAn application-defined callback function used with EnumFontFamiliesEx to process fonts.System.Drawing.Text.InstalledFontCollection.Families
EnumFontFamiliesExEnumerates all fonts in the system with certain characteristics.System.Drawing.Text.InstalledFontCollection.Families
ExtTextOutDraws a character string.System.Drawing.Graphics.DrawString
GetCharABCWidthsGets the widths of consecutive characters from the TrueType font.Get a Region[] for the characters:
System.Drawing.Graphics.MeasureCharacterRanges;

Determine the width of each Region:
System.Drawing.Rectangle.Round(Region.GetBounds).Width

GetCharABCWidthsFloatGets the widths of consecutive characters from the current font.Get a Region[] for the characters:
System.Drawing.Graphics.MeasureCharacterRanges;

Determine the width of each Region:
System.Drawing.Region.GetBounds.Width

GetCharWidth32Gets the widths of consecutive characters from the current font.Get a Region[] for the characters:
System.Drawing.Graphics.MeasureCharacterRanges;

Determine the width of each Region:
System.Drawing.Rectangle.Round(Region.GetBounds).Width

GetCharWidthFloatGets the fractional widths of consecutive characters from the current font.Get a Region[] for the characters:
System.Drawing.Graphics.MeasureCharacterRanges;

Determine the width of each Region:
System.Drawing.Region.GetBounds.Width

GetOutlineTextMetricsGets text metrics for TrueType fonts.System.Drawing.Font properties
GetTabbedTextExtentComputes the width and height of a character string, including tabs.System.Drawing.Graphics.MeasureString
GetTextAlignGets the text-alignment setting for a device context.System.Drawing.StringFormat.Alignment
System.Drawing.StringFormat.LineAlignment
GetTextColorGets the text color for a device context.System.Drawing.SolidBrush.Color
GetTextExtentPoint32Computes the width and height of a string of text.System.Drawing.Graphics.MeasureString
GetTextFaceGets the name of the font that is selected into a device context.System.Drawing.Font.Name
GetTextMetricsFills a buffer with the metrics for a font.System.Drawing.Font properties
RemoveFontMemResourceExRemoves a font whose source was embedded in a document from the system font table.System.Drawing.Text.PrivateFontCollection.Dispose
RemoveFontResourceExRemoves a private or non-enumerable font from the system font table.System.Drawing.Text.PrivateFontCollection.Dispose
SetTextAlignSets the text-alignment flags for a device context.System.Drawing.StringFormat.Alignment
System.Drawing.StringFormat.LineAlignment
SetTextColorSets the text color for a device context.Either of the following:
System.Drawing.Brushes
System.Drawing.SolidBrush.SolidBrush(Color)
TabbedTextOutWrites a character string at a location, expanding tabs to specified values.System.Drawing.Graphics.DrawString using System.Drawing.StringFormat.SetTabStops
TextOutWrites a character string at a location.System.Drawing.Graphics.DrawString

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Icon Functions

Win32 functionDescription.NET Framework API
CopyIconCopies an icon from another module.System.Drawing.Icon.FromHandle
CreateIconCreates an icon with a specified size, color, and bit pattern.System.Drawing.Icon constructor
DestroyIconDestroys an icon.System.Drawing.Icon.Dispose
DrawIconDraws an icon.System.Drawing.Graphics.DrawIcon
DuplicateIconCreates a duplicate of a specified icon.System.Drawing.Icon.Clone
LoadIconLoads an icon from the executable file associated with an application.System.Drawing.Icon constructor

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Input Method Editor Functions

Win32 functionDescription.NET Framework API
ImmAssociateContextAssociates the specified input context with the specified window.Either of the following:
System.Windows.Forms.Control.DefaultImeMode
System.Windows.Forms.Control.ImeMode
ImmAssociateContextExChanges the association between the input method context and the specified window or its children.Any of the following:
System.Windows.Forms.Control.DefaultImeMode
System.Windows.Forms.Control.ImeMode
System.Windows.Forms.Control.ResetImeMode
ImmDisableIMEDisables the Input Method Editor.System.Windows.Forms.Control.ImeMode = System.Windows.Forms.ImeMode.Disable
ImmGetContextRetrieves the input context associated with the specified window.System.Windows.Forms.Control.ImeMode

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Keyboard Accelerator Functions

Win32 functionDescription.NET Framework API
TranslateAcceleratorProcesses accelerator keys for menu commands.System.Windows.Forms.MenuItem.Shortcut

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Keyboard Input Functions

Win32 functionDescription.NET Framework API
ActivateKeyboardLayoutSets the input locale identifier for the calling thread or the current process.System.Windows.Forms.InputLanguage.CurrentInputLanguage
EnableWindowEnables or disables mouse and keyboard input to the specified window or control.System.Windows.Forms.Control.Enabled
GetActiveWindowRetrieves the window handle to the active window attached to the calling thread‘s message queue.System.Windows.Forms.Form.ActiveForm
GetFocusRetrieves the handle to the window that has the keyboard focus.System.Windows.Forms.Control.Controls[].Focused
GetKeyboardLayoutRetrieves the active input locale identifier for the specified thread.System.Windows.Forms.InputLanguage.CurrentInputLanguage
GetKeyboardLayoutListRetrieves the input locale identifiers corresponding to the current set of input locales in the system.System.Windows.Forms.InputLanguage.InstalledInputLanguages
GetKeyboardLayoutNameRetrieves the name of the active input locale identifier.System.Windows.Forms.InputLanguage.LayoutName
GetKeyNameTextRetrieves a string that represents the name of a key.System.Windows.Forms.KeyEventArgs.KeyCode.ToString
IsWindowEnabledDetermines whether the specified window is enabled for mouse and keyboard input.System.Windows.Forms.Form.Enabled
SetActiveWindowActivates a window.System.Windows.Forms.Activate
SetFocusSets the keyboard focus to the specified window.System.Windows.Forms.Form.Focus
ToAsciiTranslates the specified virtual-key code and keyboard state to the corresponding character or characters.System.Windows.Forms.KeyPressEventArgs.KeyChar
ToUnicodeTranslates the specified virtual-key code and keyboard state to the corresponding Unicode character or characters.System.Windows.Forms.KeyPressEventArgs.KeyChar

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Line and Curve Functions

Win32 functionDescription.NET Framework API
AngleArcDraws a line segment and an arc.System.Drawing.Graphics.DrawLine
System.Drawing.Graphics.DrawArc
ArcDraws an elliptical arc.System.Drawing.Graphics.DrawArc
ArcToDraws an elliptical arc.System.Drawing.Graphics.DrawArc
LineToDraws a line from the current position up to, but not including, the specified point.System.Drawing.Graphics.DrawLine
PolyBezierDraws one or more B&x00E9;zier curves.System.Drawing.Graphics.DrawBeziers
PolylineDraws a series of line segments by connecting the points in the specified array.System.Drawing.Graphics.DrawLines

Alphabetical Win32 Category List
Hierarchical Win32 Category List

List Box Functions

Win32 functionDescription.NET Framework API
DlgDirListReplaces the contents of a list box with the names of the subdirectories and files in a specified directory.System.Windows.Forms.ListBox.Items.AddRange(System.IO.Directory.GetFileSystemEntries)
DlgDirSelectExRetrieves the current selection from a single-selection list box.System.Windows.Forms.ListBox.SelectedItem
GetListBoxInfoRetrieves information about the specified list box.System.Windows.Forms.ListBox properties

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Memory Management Functions

Memory management functions:

Win32 functionDescription.NET Framework API
GlobalMemoryStatusObtains information about the system‘s current usage of both physical and virtual memory.System.Management.ManagementClass("Win32_OperatingSystem")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject.Properties
GlobalMemoryStatusExObtains information about the system‘s current usage of both physical and virtual memory.System.Management.ManagementClass("Win32_OperatingSystem")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject.Properties

Global and local functions:

Win32 functionDescription.NET Framework API
GlobalAllocAllocates the specified number of bytes from the heap.System.Runtime.InteropServices.Marshall.AllocHGlobal
GlobalFreeFrees the specified global memory object.System.Runtime.InteropServices.Marshall.FreeHGlobal
GlobalReAllocChanges the size or attributes of a specified global memory object.System.Runtime.InteropServices.Marshall.ReAllocHGlobal
LocalAllocAllocates the specified number of bytes from the heap.System.Runtime.InteropServices.Marshall.AllocHGlobal
LocalFreeFrees the specified local memory object.System.Runtime.InteropServices.Marshall.FreeHGlobal
LocalReAllocChanges the size or the attributes of a specified local memory object.System.Runtime.InteropServices.Marshall.ReAllocHGlobal

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Menu Functions

Win32 functionDescriptions.NET Framework API
AppendMenuAppends an item to various menus and submenus.System.Windows.Forms.Menu.MenuItemCollection.Add
CheckMenuItemChecks or clears a menu item.System.Windows.Forms.MenuItem.Checked
CheckMenuRadioItemChecks a specified menu item and makes it a radio item.System.Windows.Forms.MenuItem.RadioCheck
CreateMenuCreates a menu.Any of the following:
System.Windows.Forms.ContextMenu
constructor
System.Windows.Forms.MainMenu
constructor
System.Windows.Forms.Menu.MenuItemCollection
constructor
CreatePopupMenuCreates a drop-down menu, submenu, or shortcut menu.Either of the following:
System.Windows.Forms.ContextMenu
constructor
System.Windows.Forms.Menu.MenuItemCollection
constructor
DeleteMenuDeletes a menu item.System.Windows.Forms.Menu.MenuItemCollection.Remove
DestroyMenuDeletes a menu.System.Windows.Forms.Menu.Dispose
EnableMenuItemEnables, disables, or grays a menu item.System.Windows.Forms.MenuItem.Enabled
GetMenuGets a handle to the menu.System.Windows.Forms.Form.Menu.Handle
GetMenuBarInfoGets information about a menu bar.System.Windows.Forms.Form.Menu
GetMenuCheckMarkDimensionsReturns the dimensions of the default check-mark bitmap.System.Windows.Forms.SystemInformation.MenuCheckSize
GetMenuDefaultItemGets the default menu item on a menu.System.Windows.Forms.MenuItem.DefaultItem
GetMenuInfoGets information about a menu.System.Windows.Forms.MenuItem properties
GetMenuItemCountGets the number of items in a menu.System.Windows.Forms.Menu.MenuItemCollection.Count
GetMenuItemIDGets the identifier of a menu item.System.Windows.Forms.MenuItem.MenuID
GetMenuItemInfoGets information about a menu item.System.Windows.Forms.MenuItem properties
GetMenuItemRectGets the bounding rectangle for a menu item.System.Windows.Forms.MenuItem.DrawItem
System.Windows.Forms.DrawItemEventArgs.Bounds
GetMenuStateGets the menu flags associated with a menu item.System.Windows.Forms.MenuItem.Break
System.Windows.Forms.MenuItem.BarBreak
System.Windows.Forms.MenuItem.Checked
System.Windows.Forms.MenuItem.Enabled
System.Windows.Forms.MenuItem.OwnerDraw
GetMenuStringCopies the text string of a menu item into a buffer.System.Windows.Forms.MenuItem.Text
GetSubMenuGets a handle to the drop-down menu or submenu activated by a menu item.System.Windows.Forms.Menu.MenuItems[].Handle
InsertMenuInserts a new menu item into a menu.System.Windows.Forms.Menu.MenuItemCollection.Add
InsertMenuItemInserts a new menu item in a menu.System.Windows.Forms.Menu.MenuItemCollection.Add
ModifyMenuChanges an existing menu item.System.Windows.Forms.MenuItem.Break
System.Windows.Forms.MenuItem.BarBreak
System.Windows.Forms.MenuItem.Checked
System.Windows.Forms.MenuItem.Enabled
System.Windows.Forms.MenuItem.OwnerDraw
System.Windows.Forms.MenuItem.Text
RemoveMenuDeletes a menu item or detaches a submenu from a menu.System.Windows.Forms.Menu.MenuItemCollection.Remove
SetMenuAssigns a new menu to a window.System.Windows.Forms.Form.Menu
SetMenuDefaultItemSets the default menu item for a menu.System.Windows.Forms.MenuItem.DefaultItem
SetMenuInfoSets information for a menu.System.Windows.Forms.MenuItem properties
SetMenuItemBitmapsAssociates a bitmap with a menu item.System.Windows.Forms.MenuItem.DrawItem
SetMenuItemInfoChanges information about a menu item.System.Windows.Forms.MenuItem properties
TrackPopupMenuDisplays a shortcut menu at a location and tracks item selection on a menu.System.Windows.Forms.ContextMenu.Show

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Message and Message Queue Functions

Win32 functionDescription.NET Framework API
GetMessagePosRetrieves the position of the cursor for the last message retrieved by GetMessage.Inside an event handler:
System.Windows.Forms.Windows.Forms.Control.MousePosition
PostQuitMessageIndicates to the system that a thread has made a request to terminate (quit).System.Windows.Forms.Application.ExitThread
SendMessageSends the specified message to a window or windows.Any of the following:
System.Windows.Forms.Control.DefWndProc
System.Windows.Forms.Control.WndProc
System.Windows.Forms.Form.DefWndProc
System.Windows.Forms.Form.WndProc

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Metafile Functions

Win32 functionDescription.NET Framework API
CopyEnhMetaFileCopies the contents of an enhanced-format metafile to a specified file.System.Drawing.Imaging.Metafile.Save
CreateEnhMetaFileCreates a device context for an enhanced-format metafile.System.Drawing.Imaging.Metafile constructor
DeleteEnhMetaFileDeletes an enhanced-format metafile or an enhanced-format metafile handle.System.Drawing.Imaging.Metafile.Dispose
EnhMetaFileProcAn application-defined callback function used with EnumEnhMetaFile.System.Drawing.Graphics.EnumerateMetafileProc
EnumEnhMetaFileEnumerates the records within an enhanced-format metafile.System.Drawing.Graphics.EnumerateMetafile
GdiCommentCopies a comment from a buffer into a specified enhanced-format metafile.System.Drawing.Graphics.AddMetafileComment
GetEnhMetaFileCreates a handle that identifies the enhanced-format metafile stored in the specified file.System.Drawing.Imaging.Metafile constructor
GetEnhMetaFileBitsRetrieves the contents of the specified enhanced-format metafile and copies it into a buffer.System.Drawing.Imaging.Metafile.Save
GetEnhMetaFileHeaderRetrieves the record containing the header for the specified enhanced-format metafile.System.Drawing.Imaging.Metafile.GetMetafileHeader
GetEnhMetaFilePaletteEntriesRetrieves optional palette entries from the specified enhanced metafile.System.Drawing.Imaging.Metafile.Palette.Entries
GetWinMetaFileBitsConverts the enhanced-format records from a metafile into Windows-format records.System.Drawing.Imaging.Metafile.Save
PlayEnhMetaFileDisplays the picture stored in the specified enhanced-format metafile.System.Drawing.Graphics.DrawImage
PlayEnhMetaFileRecordPlays an enhanced-metafile record by executing the graphics device interface functions identified by the record.System.Drawing.Imaging.Metafile.PlayRecord
System.Drawing.Imaging.PlayRecordCallback
SetEnhMetaFileBitsCreates a memory-based enhanced-format metafile from the specified data.System.Drawing.Imaging.Metafile.Save
SetWinMetaFileBitsConverts a metafile from the older Windows format to the new enhanced format.System.Drawing.Imaging.Metafile.Save

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Mouse Input Functions

Win32 functionDescription.NET Framework API
GetDoubleClickTimeGets the double-click time for the mouse.System.Windows.Forms.SystemInformation.DoubleClickTime
mouse_eventSynthesizes mouse motion and button clicks.System.Windows.Forms.MouseEventArgs
ReleaseCaptureReleases the mouse capture and restores mouse input processing.System.Windows.Forms.Control.Capture
SetCaptureSets the mouse capture to a window.System.Windows.Forms.Control.Capture
TrackMouseEvent
–or–
_TrackMouseEvent
Posts messages when a mouse leaves a window or hovers over a window.System.Windows.Forms.Control.OnMouseLeave
System.Windows.Forms.Control.OnMouseHover

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Multiple Display Monitor Functions

Win32 functionDescription.NET Framework API
GetMonitorInfoRetrieves information about a display monitor.System.Windows.Forms.Screen.Bounds
System.Windows.Forms.Screen.Primary
System.Windows.Forms.Screen.WorkingArea
MonitorFromPointRetrieves a handle to the display monitor that contains a specified point.System.Windows.Forms.Screen.FromPoint
MonitorFromRectRetrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.System.Windows.Forms.Screen.FromRectangle
MonitorFromWindowRetrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.System.Windows.Forms.Screen.FromHandle

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Multiple-Document Interface Functions

Win32 functionDescription.NET Framework API
CreateMDIWindowCreates a multiple-document interface (MDI) child window.System.Windows.Forms.Form constructor
System.Windows.Forms.Form.AutoScroll
System.Windows.Forms.Form.DesktopBounds
System.Windows.Forms.Form.MdiParent
System.Windows.Forms.Form.WindowState
TranslateMDISysAccelProcesses accelerator keystrokes for window menu commands of the MDI child windows associated with the specified MDI client window.Keyboard events for MDI children are automatically translated.

Alphabetical Win32 Category List
Hierarchical Win32 Category List

National Language Functions

Win32 functionDescription.NET Framework API
ConvertDefaultLocaleConverts a default locale value to an actual locale identifier.System.Globalization.CultureInfo.CurrentCulture
System.Globalization.CultureInfo.InstalledUICulture
EnumCalendarInfoEnumerates calendar information for a specified locale.Access the System.Globalization.CultureInfo.DateTimeFormat property to get a System.Globalization.DateTimeFormatInfo object, and then access its properties:
System.Globalization.DateTimeFormatInfo.AbbreviatedDayNames
System.Globalization.DateTimeFormatInfo.AbbreviatedMonthNames
System.Globalization.DateTimeFormatInfo.DayNames
System.Globalization.DateTimeFormatInfo.LongDatePattern
System.Globalization.DateTimeFormatInfo.MonthNames
System.Globalization.DateTimeFormatInfo.ShortDatePattern
EnumCalendarInfoExEnumerates calendar information for a specified locale.Iterate through the calendars:
System.Globalization.CultureInfo.DateTimeFormat.Calendar = System.Globalization.CultureInfo.OptionalCalendars[i]
EnumCalendarInfoProcAn application-defined function used with EnumCalendarInfo.Same as EnumCalendarInfo
EnumCalendarInfoProcExAn application-defined function used with EnumCalendarInfoEx.Same as EnumCalendarInfoEx
EnumCodePagesProcAn application-defined function used with EnumSystemCodePages.Same as EnumSystemCodePages
EnumDateFormatsEnumerates the long or short date formats that are available for a specified locale.System.DateTime.GetDateTimeFormats(System.Globalization.CultureInfo)
EnumDateFormatsExEnumerates the long or short date formats that are available for a specified locale, including date formats for any alternate calendars.Iterate through the calendars:
System.Globalization.CultureInfo.DateTimeFormat.Calendar = System.Globalization.CultureInfo.OptionalCalendars[i];
System.DateTime.GetDateTimeFormats(System.Globalization.CultureInfo)
EnumDateFormatsProcAn application-defined function used with EnumDateFormats.Same as EnumDateFormats
EnumDateFormatsProcExAn application-defined function used with EnumDateFormatsEx.Same as EnumDateFormatsEx
EnumGeoInfoProcA callback function used with EnumSystemGeoID.Same as EnumSystemGeoID
EnumLocalesProcAn application-defined function used with EnumSystemLocales.Same as EnumSystemLocales
EnumSystemCodePagesEnumerates the code pages that are either installed on or supported by a system.System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.AllCultures) returns an array of CultureInfo

The various code page properties of System.Globalization.CultureInfo.TextInfo

EnumSystemGeoIDEnumerates all GeoIDs on the system.Retrieve an array of CultureInfo by calling System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.AllCultures), and then access the following CultureInfo properties:
System.Globalization.CultureInfo.ThreeLetterISOLanguageName
System.Globalization.CultureInfo.ThreeLetterWindowsLanguageName
System.Globalization.CultureInfo.TwoLetterISOLanguageName
EnumSystemLocalesEnumerates the locales that are either installed on or supported by a system.System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.SpecificCultures)
System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.InstalledWin32Cultures)
EnumTimeFormatsEnumerates the time formats that are available for a specified locale.System.DateTime.GetDateTimeFormats
EnumTimeFormatsProcAn application-defined function used with EnumTimeFormats.Same as EnumTimeFormats
GetACPRetrieves the current ANSI code-page identifier for the system.System.Globalization.CultureInfo.InstalledUICulture.TextInfo.ANSICodePage
GetCalendarInfoRetrieves information about a calendar.System.Globalization.CultureInfo.DateTimeFormat
GetCurrencyFormatFormats a number string as a currency string for a specified locale.Create a System.Globalization.CultureInfo object using the constructor, specifying either the culture name or identifier (or use the current culture of the application available on System.Threading.Thread.CurrentCulture);
call System.Convert.ToDouble(str) where str is the numeric string you want to format;
and then call System.Double.ToString("C", ci) (or System.Double.ToString("C") to use the current culture), where C is the standard currency format specifier and ci is the CultureInfo object you created

Note    For more information on the variety of formatting options available in the .NET Framework, see System.String.Format.

GetDateFormatFormats a date as a date string for a specified locale.System.DateTime(, CultureInfo(LCID).Calendar).ToString
GetLocaleInfoRetrieves information about a locale.System.Globalization.CultureInfo.DateTimeFormat
System.Globalization.CultureInfo.NumberFormat
System.Globalization.CultureInfo.TextInfo
GetNumberFormatFormats a number string as a number string customized for a specified locale.Create a System.Globalization.CultureInfo object using the constructor, specifying either the culture name or identifier (or use the current culture of the application available on System.Threading.Thread.CurrentCulture);
call System.Convert.ToDouble(str). where str is the numeric string you want to format;
and then call System.Double.ToString("N", ci) (or System.Double.ToString("N") to use the current culture), where N is the standard number format specifier and ci is the CultureInfo object you created

Note    For more information on the variety of formatting options available in the .NET Framework, see System.String.Format.

GetOEMCPRetrieves the current original equipment manufacturer (OEM) code-page identifier for the system.System.Globalization.CultureInfo.InstalledUICulture.TextInfo.OEMCodePage
GetSystemDefaultLangIDRetrieves the language identifier of the system locale.System.Globalization.CultureInfo.InstalledUICulture
GetSystemDefaultLCIDRetrieves the system default locale identifier.System.Globalization.CultureInfo.InstalledUICulture
GetSystemDefaultUILanguageRetrieves the language identifier for the default language of the system.System.Globalization.CultureInfo.InstalledUICulture
GetThreadLocaleRetrieves the current locale for the calling thread.Either of the following:
System.Globalization.CultureInfo.CurrentCulture
System.Threading.Thread.CurrentCulture
GetTimeFormatFormats time as a time string for a specified locale.System.DateTime(, CultureInfo(LCID).Calendar).ToString
GetUserDefaultLangIDRetrieves the language identifier of the current user locale.System.Globalization.CultureInfo.CurrentCulture
GetUserDefaultLCIDRetrieves the user default–locale identifier.System.Globalization.CultureInfo.CurrentCulture
GetUserDefaultUILanguageRetrieves the language identifier for the current user language.System.Globalization.CultureInfo.CurrentUICulture
GetUserGeoIDGets information about the user‘s location.System.Globalization.RegionInfo
IsValidCodePageDetermines whether a specified code page is valid.Use an array of CultureInfo objects returned by:
System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.AllCultures)

Compare to the code page properties of System.Globalization.CultureInfo.TextInfo

IsValidLocaleDetermines whether a specified locale identifier is valid.try{ System.Globalization.CultureInfo(LCID) }
LCMapStringMaps one character string to another, performing a specified locale-dependent transformation.System.Globalization.SortKey
SetCalendarInfoSets an item of locale information for a calendar.System.Globalization.CultureInfo.DateTimeFormat
SetLocaleInfoSets an item of locale information.System.Globalization.CultureInfo.DateTimeFormat
System.Globalization.CultureInfo.NumberFormat
SetThreadLocaleSets the current locale for the calling thread.System.Threading.Thread.CurrentCulture

Note   Sets langid only.

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Painting and Drawing Functions

Win32 functionDescription.NET Framework API
BeginPaintPrepares a window for painting.System.Windows.Forms.Form.OnPaint
DrawFrameControlDraws a frame control.System.Window.Forms.ControlPaint
GetBkColorReturns the background color for a device context.System.Windows.Forms.Form.BackColor
GetBkModeReturns the background mix mode for a device context.System.Windows.Forms.Form.GetStyle(ControlStyles.Opaque)
GetUpdateRectGets the coordinates of the smallest rectangle that encloses the update region of a window.System.Windows.Forms.PaintEventArgs.ClipRectangle
GetWindowDCGets the device context for a window, including title bar, menus, and scroll bars.Any of the following:
System.Drawing.Graphics.FromHwnd(Windows.Forms.Control.Handle)
System.Windows.Forms.Control.CreateGraphics.GetHdc
System.Windows.Forms.PaintEventArgs.Graphics.GetHdc
GetWindowRgnGets a copy of the window region of a window.System.Windows.Forms.Control.Region
GrayStringDraws gray text at a location.System.Drawing.Graphics.DrawString(, Drawing.Brushes.Gray, )
InvalidateRectAdds a rectangle to the update region of a window.System.Windows.Forms.Control.Invalidate
InvalidateRgnInvalidates the client area within a region.System.Windows.Forms.Control.Invalidate(System.Windows.Forms.Form.ClientRectangle)
RedrawWindowUpdates a region in the client area of a window.System.Windows.Forms.Control.Update
SetBkColorSets the background to a color value.System.Windows.Forms.Form.BackColor
SetBkModeSets the background mix mode of a device context.System.Windows.Forms.Form.SetStyle(System.Windows.Forms.ControlStyles.Opaque, System.Boolean)
SetWindowRgnSets the window region of a window.System.Windows.Forms.Control.Region
UpdateWindowUpdates the client area of a window.System.Windows.Forms.Control.Update

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Path Functions

Win32 functionDescription.NET Framework API
CloseFigureCloses an open figure in a path.System.Drawing.Drawing2D.GraphicsPath.CloseFigure
FillPathCloses any open figures in the current path and fills the interior of the path by using the current brush and polygon-filling mode.System.Drawing.Graphics.FillPath
System.Drawing.Drawing2D.GraphicsPath.CloseFigures
FlattenPathTransforms any curves in the path that is selected into the current device context, turning each curve into a sequence of lines.System.Drawing.Drawing2D.GraphicsPath.Flatten
GetMiterLimitRetrieves the miter limit for the specified device context.System.Drawing.Pen.MiterLimit
GetPathRetrieves the coordinates defining the endpoints of lines and the control points of curves found in the path that is selected into the specified device context.System.Drawing.Drawing2D.GraphicsPath.PathData
PathToRegionCreates a region from the path that is selected into the specified device context.System.Drawing.Region.Region(System.Drawing.Drawing2D.GraphicsPath)
SetMiterLimitSets the limit for the length of miter joins for the specified device context.System.Drawing.Pen.MiterLimit
StrokeAndFillPathCloses any open figures in a path, strokes the outline of the path by using the current pen, and fills its interior by using the current brush.System.Drawing.Graphics.DrawPath
System.Drawing.Graphics.FillPath
System.Drawing.Drawing2D.GraphicsPath.CloseFigures
StrokePathRenders the specified path by using the current pen.System.Drawing.Graphics.DrawPath
WidenPathRedefines the current path as the area that would be painted if the path were stroked using the pen currently selected into the given device context.System.Drawing.Drawing2D.GraphicsPath.Widen

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Pen Functions

Win32 functionDescription.NET Framework API
CreatePenCreates a logical pen that has the specified style, width, and color.System.Drawing.Pen constructor
ExtCreatePenCreates a logical cosmetic or geometric pen that has the specified style, width, and brush attributes.System.Drawing.Pen constructor

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Performance Monitoring Functions

Win32 functionDescription.NET Framework API
PdhAddCounterInitializes a counter structure for the specified counter in the specified query.System.Diagnostics.PerformanceCounter constructor
PdhCalculateCounterFromRawValueComputes the current value of a counter using the raw counter data passed in the parameter list.System.Diagnostics.CounterSample.Calculate
PdhCloseLogCloses the specified log file.System.Diagnostics.EventLog.Close
PdhCloseQueryCloses all counters contained in the specified query, closes all handles related to the query, and frees all memory associated with the query.System.Diagnostics.PerformanceCounterCategory.Delete
PdhCollectQueryDataCollects the current raw data value for all counters in the specified query and updates the status code of each counter. System.Diagnostics.PerformanceCounterCategory.ReadCategory
PdhEnumObjectItemsReturns the available counters and instances provided by the specified object on the specified computer.System.Diagnostics.PerformanceCounterCategory.GetCounters
System.Diagnostics.PerformanceCounterCategory.GetInstanceNames
PdhEnumObjectsReturns a list of objects available on the specified computer.System.Diagnostics.PerformanceCounterCategory.GetCategories
PdhFormatFromRawValueConverts one raw performance data value to the specified format or two raw performance data values if the format conversion is time-based.System.Diagnostics.CounterSample.Calculate
PdhGetCounterInfoRetrieves information about a counter, such as data size, counter type, path, and user-supplied data values.System.Diagnostics.PerformanceCounter properties
PdhGetCounterTimeBaseReturns the time base of the specified counter.System.Diagnostics.CounterSample.CounterFrequency
PdhGetFormattedCounterValueReturns the current value of a specified counter in the format requested by the caller.System.Diagnostics.PerformanceCounter.NextValue
PdhGetRawCounterArrayReturns an array of raw values from the specified counter.System.Diagnostics.PerformanceCounterCategory.ReadCategory
PdhGetRawCounterValueReturns the current raw value of the counter.System.Diagnostics.PerformanceCounter.NextSample

Note   System.Diagnostics.InstanceData holds the raw data.

PdhMakeCounterPathCreates a full counter path using the members specified in the structure passed in the parameter list.All of the following:

System.Diagnostics.PerformanceCounter.MachineName
System.Diagnostics.PerformanceCounter.CategoryName
System.Diagnostics.PerformanceCounter.InstanceName
System.Diagnostics.PerformanceCounter.CounterName

PdhOpenLogOpens the specified log file.System.Diagnotics.EventLog constructor

Note   Must explicitly handle writing to the log file.

PdhOpenQueryCreates and initializes a unique query structure that is used to manage the collection of performance data.System.Diagnostics.PerformanceCounterCategory constructor
PdhValidatePathValidates that the specified counter is present on the computer that is specified in the counter path.Either of the following:
System.Diagnostics.PerformanceCounterCategory.Exists
System.Diagnostics.PerformanceCounterCategory.InstanceExists

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Printing Functions

Functions used to print:

Win32 functionDescription.NET Framework API
AbortDocStops the current print job and erases everything drawn since the last call to StartDoc.System.Drawing.Printing.PrintPageEventArgs.Cancel
DeviceCapabilitiesRetrieves the capabilities of a printer device driver.System.Drawing.Printing.PrinterSettings.PrinterName
System.Drawing.Printing.PrinterSettings
properties
EndDocEnds a print job.Either of the following:
System.Drawing.Printing.PrintDocument.OnEndPrint
System.Drawing.Printing.PrintController.OnEndPrint
EndPageNotifies the device that the application has finished writing to a page.System.Drawing.Printing.PrintController.OnEndPage
StartDocStarts a print job.System.Drawing.Printing.PrintDocument.Print
System.Drawing.Printing.PrintDocument.OnBeginPrint
System.Drawing.Printing.PrintController.OnStartPrint
StartPagePrepares the printer driver to accept data.System.Drawing.Printing.PrintDocument.OnQueryPageSettings
System.Drawing.Printing.PrintController.OnStartPage
System.Drawing.Printing.PrintDocument.OnPrintPage

Functions used to access the print spooler:

Win32 functionDescription.NET Framework API
DocumentPropertiesRetrieves or modifies printer initialization information or displays a printer-configuration property sheet for the specified printer.System.Windows.Forms.PageSetupDialog
System.Windows.Forms.PrintDialog
EndPagePrinterNotifies the print spooler that the application is at the end of a page in a print job.System.Drawing.Printing.PrintPageEventArgs.HasMorePages
EnumFormsEnumerates the forms supported by the specified printer.System.Drawing.Printing.PrinterSettings.PaperSizes
EnumPrintersEnumerates available printers, print servers, domains, or print providers.System.Drawing.Printing.PrinterSettings.InstalledPrinters
GetDefaultPrinterRetrieves the printer name of the default printer for the current user on the local computer.System.Drawing.Printing.PrinterSettings constructor
System.Drawing.Printing.PrinterSettings.PrinterName
GetFormRetrieves information about a specified form.System.Drawing.Printing.PrinterSettings.PaperSizes[]
GetPrinterRetrieves information about a specified printer.System.Drawing.Printing.PrinterSettings.PrinterName
System.Drawing.Printing.PrinterSettings
properties
PrinterPropertiesDisplays a printer-properties property sheet for the specified printer.System.Windows.Forms.PageSetupDialog
System.Windows.Forms.PrintDialog
SetPrinterSets the data for a specified printer or sets the state of the specified printer by pausing printing, resuming printing, or clearing all print jobs.System.Drawing.Printing.PrinterSettings.PrinterName
System.Drawing.Printing.PrinterSettings
properties

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Process and Thread Functions

Functions used with processes:

Win32 functionDescription.NET Framework API
CreateProcessCreates a new process and its primary thread.System.Diagnostics.Process constructor
System.Diagnostics.Process.Start
ExitProcessEnds a process and all its threads.System.Diagnostics.Process.CloseMainWindow
GetCommandLineRetrieves the command-line string for the current process.Either of the following:
System.Environment.CommandLine
System.Diagnostics.ProcessStartInfo.Arguments
GetCurrentProcessRetrieves a pseudo handle for the current process.System.Diagnostics.Process.Handle
GetCurrentProcessIdRetrieves the process identifier of the calling process.System.Diagnostics.Process.Id
GetEnvironmentStringsRetrieves the environment block for the current process.System.Diagnostics.ProcessStartInfo.EnvironmentVariables
GetEnvironmentVariableRetrieves the value of the specified variable from the environment block of the calling process.System.Diagnostics.ProcessStartInfo.EnvironmentVariables[]
GetExitCodeProcessRetrieves the termination status of the specified process.System.Diagnostics.Process.ExitCode
GetPriorityClassRetrieves the priority class for the specified process.System.Diagnostics.Process.PriorityClass
GetProcessAffinityMaskRetrieves a process affinity mask for the specified process and the system affinity mask for the system.System.Diagnostics.Process.ProcessorAffinity
GetProcessPriorityBoostRetrieves the priority boost control state of the specified process.System.Diagnostics.Process.PriorityBoostEnabled
GetProcessTimesRetrieves timing information for the specified process.System.Diagnostics.Process.ExitTime
System.Diagnostics.Process.PrivilegedProcessorTime
System.Diagnostics.Process.StartTime
System.Diagnostics.Process.TotalProcessorTime
System.Diagnostics.Process.UserProcessorTime
GetProcessWorkingSetSizeRetrieves the minimum and maximum working set sizes of the specified process.System.Diagnostics.Process.MinWorkingSet
System.Diagnostics.Process.MaxWorkingSet
GetStartupInfoRetrieves the contents of the STARTUPINFO structure that was specified when the calling process was created.System.Diagnostics.Process.StandardError
System.Diagnostics.Process.StandardInput
System.Diagnostics.Process.StandardOutput
System.Diagnostics.Process.StartInfo.WindowStyle
OpenProcessOpens an existing process object.System.Diagnostics.Process.GetProcessById
SetEnvironmentVariableSets the value of an environment variable for the current process.System.Diagnostics.ProcessStartInfo.EnvironmentVariables[]
SetPriorityClassSets the priority class for the specified process.System.Diagnostics.Process.PriorityClass
SetProcessAffinityMaskSets a processor affinity mask for the threads of a specified process.System.Diagnostics.Process.ProcessorAffinity
SetProcessPriorityBoostDisables the ability of the system to temporarily boost the priority of the threads of the specified process.System.Diagnostics.Process.PriorityBoostEnabled
SetProcessWorkingSetSizeSets the minimum and maximum working set sizes for the specified process.System.Diagnostics.Process.MaxWorkingSet
System.Diagnostics.Process.MinWorkingSet
TerminateProcessTerminates the specified process and all of its threads.System.Diagnostics.Process.Kill

Functions used with threads:

Win32 functionDescription.NET Framework API
CreateThreadCreates a thread to execute within the virtual address space of the calling process.System.Threading.Thread constructor
System.Threading.Thread.Start
GetCurrentThreadRetrieves a pseudo handle for the current thread.System.Threading.Thread.CurrentThread
GetCurrentThreadIdRetrieves the thread identifier of the calling thread.Either of the following:
System.AppDomain.GetCurrentThreadId
System.Diagnostics.ProcessThread.Id
GetThreadPriorityRetrieves the priority value for the specified thread.Either of the following:
System.Diagnostics.ProcessThread.PriorityLevel
System.Threading.Thread.Priority
GetThreadPriorityBoostRetrieves the priority boost control state of the specified thread.System.Diagnostics.ProcessThread.PriorityBoostEnabled
GetThreadTimesRetrieves timing information for the specified thread.System.Diagnostics.ProcessThread.PrivilegedProcessorTime
System.Diagnostics.ProcessThread.StartTime
System.Diagnostics.ProcessThread.TotalProcessorTime
System.Diagnostics.ProcessThread.UserProcessorTime
ResumeThreadDecrements the suspend count for a thread.System.Threading.Thread.Resume
SetThreadAffinityMaskSets a processor affinity mask for the specified thread.System.Diagnostics.ProcessThread.ProcessorAffinity
SetThreadIdealProcessorSpecifies a preferred processor for a thread.System.Diagnostics.ProcessThread.IdealProcessor
SetThreadPrioritySets the priority value for the specified thread.Either of the following:
System.Diagnostics.ProcessThread.PriorityLevel
System.Threading.Thread.Priority
SetThreadPriorityBoostEnables or disables the ability of the system to temporarily boost the priority of a thread.System.Diagnostics.ProcessThread.PriorityBoostEnabled
SleepSuspends the execution of the current thread for a specified interval.System.Threading.Thread.Sleep
SuspendThreadSuspends the specified thread.System.Threading.Thread.Suspend
SwitchToThreadCauses the calling thread to yield execution to another thread that is ready to run on the current processor.System.Threading.Thread.Sleep(0)
TerminateThreadTerminates a thread.System.Threading.Thread.Abort
ThreadProcAn application-defined function that serves as the starting address for a thread.See System.Threading.ThreadStart delegate
TlsAllocAllocates a thread local storage (TLS) index.System.Threading.Thread.AllocateNamedDataSlot
TlsFreeReleases a TLS index.System.Threading.Thread.FreeNamedDataSlot
TlsGetValueRetrieves the value in the calling thread‘s TLS slot for a specified TLS index.System.Threading.Thread.GetData
TlsSetValueStores a value in the calling thread‘s TLS slot for a specified TLS index.System.Threading.Thread.SetData
WaitForInputIdleWaits until the specified process is waiting for user input with no input pending or until the time-out interval has elapsed.System.Diagnostics.Process.WaitForInputIdle

Functions used in thread pooling:

Win32 functionDescription.NET Framework API
BindIoCompletionCallbackBinds the specified file handle to the I/O completion port for the thread pool.System.Threading.ThreadPool.BindHandle
QueueUserWorkItemQueues a work item to a worker thread in the thread pool.System.Threading.ThreadPool.QueueUserWorkItem
System.Threading.ThreadPool.UnsafeQueueUserWorkItem

Alphabetical Win32 Category List
Hierarchical Win32 Category List

PSAPI Functions

Win32 functionDescription.NET Framework API
EnumProcessesRetrieves the process identifier for each process object in the system.System.Diagnostics.Process.GetProcesses
EnumProcessModulesRetrieves a handle for each module in the specified process.System.Diagnostics.Process.Modules
GetModuleBaseNameRetrieves the base name for the specified module.System.Diagnostics.ProcessModule.ModuleName
GetModuleFileNameExRetrieves the fully qualified path for the specified module.Either of the following:
System.Diagnostics.ProcessModule.FileName
System.Reflection.Module.FullyQualifiedName
GetModuleInformationRetrieves information about the specified module.System.Diagnostics.ProcessModule
GetProcessMemoryInfoRetrieves information about the memory usage of the specified process.System.Diagnostics.Process.PagedMemorySize
System.Diagnostics.Process.PeakPagedMemorySize
System.Diagnostics.Process.PeakWorkingSet
System.Diagnostics.Process.WorkingSet

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Rectangle Functions

Win32 functionDescription.NET Framework API
EqualRectDetermines whether the two specified rectangles are equal by comparing the coordinates of their upper-left and lower-right corners.System.Drawing.Rectangle.Equals
InflateRectIncreases or decreases the width and height of the specified rectangle.System.Drawing.Rectangle.Inflate
IntersectRectCalculates the intersection of two source rectangles and places the coordinates of the intersection rectangle into the destination rectangle.System.Drawing.Rectangle.Intersect
IsRectEmptyDetermines whether the specified rectangle is empty.System.Drawing.Rectangle.IsEmpty
OffsetRectMoves the specified rectangle by the specified offsets.System.Drawing.Rectangle.Offset
PtInRectDetermines whether the specified point lies within the specified rectangle.System.Drawing.Rectangle.Contains
SetRectSets the coordinates of the specified rectangle.System.Drawing.Rectangle.FromLTRB
SetRectEmptyCreates an empty rectangle in which all coordinates are set to zero.System.Drawing.Rectangle.FromLTRB
UnionRectCreates the union of two rectangles.System.Drawing.Rectangle.Union

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Region Functions

Win32 functionDescription.NET Framework API
CombineRgnCombines two regions and stores the result in a third region.System.Drawing.Region.Clone
System.Drawing.Region.Exclude
System.Drawing.Region.Intersect
System.Drawing.Region.Union
System.Drawing.Region.Xor
CreateEllipticRgnCreates an elliptical region.System.Drawing.Drawing2D.GraphicsPath constructor
System.Drawing.Drawing2D.GraphicsPath.AddEllipse
System.Drawing.Region.Region(System.Drawing.Drawing2D.GraphicsPath)
CreateEllipticRgnIndirectCreates an elliptical region.System.Drawing.Drawing2D.GraphicsPath constructor
System.Drawing.Drawing2D.GraphicsPath.AddEllipse
System.Drawing.Region.Region(System.Drawing.Drawing2D.GraphicsPath)
CreatePolygonRgnCreates a polygonal region.System.Drawing.Drawing2D.GraphicsPath constructor
System.Drawing.Drawing2D.GraphicsPath.AddPolygon
System.Drawing.Region.Region(System.Drawing.Drawing2D.GraphicsPath)
CreatePolyPolygonRgnCreates a region consisting of a series of polygons.System.Drawing.Drawing2D.GraphicsPath constructor
System.Drawing.Drawing2D.GraphicsPath.AddPolygon
System.Drawing.Region.Region(System.Drawing.Drawing2D.GraphicsPath)
CreateRectRgnIndirectCreates a rectangular region.System.Drawing.Region.Region(System.Drawing.Rectangle)
CreateRoundRectRgnCreates a rectangular region with rounded corners.System.Drawing.Drawing2D.GraphicsPath.AddLines
System.Drawing.Pen.LineJoin = System.Drawing.Drawing2D.LineJoin.Round
EqualRgnChecks the two specified regions to determine whether they are identical.System.Drawing.Region.Equals
ExtCreateRegionCreates a region from the specified region and transformation data.System.Drawing.Region.Transform
FillRgnFills a region by using the specified brush.System.Drawing.Graphics.FillRegion
GetPolyFillModeRetrieves the current polygon fill mode.System.Drawing.Drawing2D.GraphicsPath.FillMode
GetRegionDataFills the specified buffer with data describing a region.System.Drawing.Region.GetRegionData
GetRgnBoxRetrieves the bounding rectangle of the specified region.System.Drawing.Region.GetBounds
OffsetRgnMoves a region by the specified offsets.System.Drawing.Region.Translate
PtInRegionDetermines whether the specified point is inside the specified region.System.Drawing.Region.IsVisible
RectInRegionDetermines whether any part of the specified rectangle is within the boundaries of a region.System.Drawing.Region.IsVisible
SetPolyFillModeSets the polygon fill mode for functions that fill polygons.System.Drawing.Drawing2D.GraphicsPath.FillMode

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Registry Functions

Win32 functionDescription.NET Framework API
RegCloseKeyReleases a handle to the specified registry key.Microsoft.Win32.RegistryKey.Close
RegConnectRegistryEstablishes a connection to a predefined registry handle on another computer.Microsoft.Win32.RegistryKey.OpenRemoteBaseKey
RegCreateKeyExCreates the specified registry key.Microsoft.Win32.RegistryKey.CreateSubKey
RegDeleteKeyDeletes a subkey.Microsoft.Win32.RegistryKey.DeleteSubKeyTree
RegDeleteValueRemoves a named value from the specified registry key.Microsoft.Win32.RegistryKey.DeleteValue
RegEnumKeyExEnumerates subkeys of the specified open registry key.Microsoft.Win32.RegistryKey.GetSubKeyNames
RegEnumValueEnumerates the values for the specified open registry key.Microsoft.Win32.RegistryKey.GetValueNames
Microsoft.Win32.RegistryKey.GetValue
RegFlushKeyWrites all the attributes of the specified open registry key into the registry.Microsoft.Win32.RegistryKey.Flush
RegOpenCurrentUserRetrieves a handle to the HKEY_CURRENT_USER key for the user that the current thread is impersonating.Microsoft.Win32.Registry.CurrentUser
RegOpenKeyExOpens the specified registry key.Microsoft.Win32.RegistryKey.OpenSubKey
RegOpenUserClassesRootRetrieves a handle to the HKEY_CLASSES_ROOT key for the specified user.Microsoft.Win32.Registry.ClassesRoot
RegQueryInfoKeyRetrieves information about the specified registry key.Microsoft.Win32.RegistryKey.SubKeyCount
Microsoft.Win32.RegistryKey.ValueCount
RegQueryValueExRetrieves the type and data for a specified value name associated with an open registry key.Microsoft.Win32.RegistryKey.GetValue
RegSetValueExSets the data and type of a specified value under a registry key.Microsoft.Win32.RegistryKey.SetValue

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Resource Functions

Win32 functionDescription.NET Framework API
CopyImageCreates a new icon, cursor, or bitmap and copies the attributes of the old one to the new one.System.Drawing.Image.Clone
EnumResNameProcAn application-defined callback function used with EnumResourceNames.System.Resources.ResourceReader.GetEnumerator
EnumResourceNamesSearches for resources of a specified type and passes the name or the ID to a callback function.System.Resources.ResourceReader.GetEnumerator
LoadImageLoads an icon, cursor, or bitmap.System.Drawing.Bitmap.Bitmap(System.Type, System.String)
System.Drawing.Icon.Icon(System.Type, System.String)
System.Windows.Forms.Cursor.Cursor(System.Type, System.String)
System.Resources.ResourceManager.GetObject
System.Resources.ResourceSet.GetObject

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Rich Edit Control Functions

Win32 FuntionDescription.NET Framework API
EditStreamCallbackAn application-defined callback function used with the EM_STREAMIN and EM_STREAMOUT messages.System.Windows.Forms.RichTextBox.LoadFile
System.Windows.Forms.RichTextBox.RichTextBox.SaveFile

Note   Not a callback function.

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Scroll Bar Functions

Win32 functionDescription.NET Framework API
EnableScrollBarEnables or disables one or both scroll bar arrows.System.Windows.Forms.ScrollBar.Enabled

Note   Cannot enable/disable built-in scrollbars (auto-scrolling).

GetScrollBarInfoRetrieves information about the specified scroll bar.System.Windows.Forms.ScrollBar.Value
System.Windows.Forms.ScrollEventArgs.Type
GetScrollInfoRetrieves the parameters of a scroll bar.System.Windows.Forms.ScrollBar.Maximum
System.Windows.Forms.ScrollBar.Minimum
System.Windows.Forms.ScrollBar.Value
GetScrollPosRetrieves the current position of the scroll box.System.Windows.Forms.ScrollBar.Value
GetScrollRangeRetrieves the current minimum and maximum scroll box positions.System.Windows.Forms.ScrollBar.Minimum
System.Windows.Forms.ScrollBar.Maximum
SetScrollInfoSets the parameters of a scroll bar.System.Windows.Forms.ScrollBar.Maximum
System.Windows.Forms.ScrollBar.Minimum
System.Windows.Forms.ScrollBar.Value
SetScrollPosSets the position of the scroll box.System.Windows.Forms.ScrollBar.Value
SetScrollRangeSets the minimum and maximum scroll box position.System.Windows.Forms.ScrollBar.Minimum
System.Windows.Forms.ScrollBar.Maximum
ShowScrollBarShows or hides the specified scroll bar.Any of the following:
System.Windows.Forms.Form.AutoScroll
System.Windows.Forms.HScrollBar
constructor
System.Windows.Forms.ListBox.HorizontalScrollBar
System.Windows.Forms.ListBox.ScrollAlwaysVisible
System.Windows.Forms.RichTextBox.ScrollBars
System.Windows.Forms.ScrollableControl.HScroll
System.Windows.Forms.ScrollableControl.VScroll
System.Windows.Forms.TextBox.ScrollBars
System.Windows.Forms.VScrollBar
constructor

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Service Functions

Functions implemented by services:

Win32 functionDescription.NET Framework API
HandlerAn application-defined callback function used with RegisterServiceCtrlHandler.All of the following:
System.ServiceProcess.ServiceBase.OnContinue
System.ServiceProcess.ServiceBase.OnCustomCommand
ServiceProcess.ServiceBase.OnPause
System.ServiceProcess.ServiceBase.OnShutdown
System.ServiceProcess.ServiceBase.OnStop
HandlerExAn application-defined callback function used with RegisterServiceCtrlHandlerEx.All of the following:
System.ServiceProcess.ServiceBase.OnContinue
System.ServiceProcess.ServiceBase.OnCustomCommand
System.ServiceProcess.ServiceBase.OnPause
System.ServiceProcess.ServiceBase.OnPowerEvent
System.ServiceProcess.ServiceBase.OnShutdown
System.ServiceProcess.ServiceBase.OnStop
ServiceMainAn application-defined function that serves as the entry point for a service.System.ServiceProcess.ServiceBase.Run

Functions used by programs that control or configure services:

Win32 functionDescription.NET Framework API
ChangeServiceConfigChanges the configuration parameters of a service.System.ServiceProcess.ServiceController.DisplayName
CloseServiceHandleCloses the specified handle to a service control manager object or a service object.System.ServiceProcess.ServiceController.Close
ControlServiceSends a control code to a service.System.ServiceProcess.ServiceController.Continue
System.ServiceProcess.ServiceController.Pause
System.ServiceProcess.ServiceController.Stop
CreateServiceCreates a service object and adds it to the specified service control manager database.System.ServiceProcess.ServiceBase.ServiceName
System.ServiceProcess.ServiceInstaller.Install
DeleteServiceMarks the specified service for deletion from the service control manager database.System.ServiceProcess.ServiceInstaller.Uninstall
EnumDependentServicesRetrieves the name and status of each service that depends on the specified service.System.ServiceProcess.ServiceController.DependentServices
EnumServicesStatusEnumerates services in the specified service control manager database.System.ServiceProcess.ServiceController.GetServices
GetServiceDisplayNameRetrieves the display name of the specified service.System.ServiceProcess.ServiceController.DisplayName
GetServiceKeyNameRetrieves the name of the specified service.System.ServiceProcess.ServiceBase.ServiceName
System.ServiceProcess.ServiceController.ServiceName
OpenServiceOpens an existing service.System.ServiceProcess.ServiceController constructor
QueryServiceConfigRetrieves the configuration parameters of the specified service.System.ServiceProcess.ServiceController.DisplayName
System.ServiceProcess.ServiceController.ServicesDependedOn
System.ServiceProcess.ServiceController.ServiceName
System.ServiceProcess.ServiceController.ServiceType
QueryServiceStatusRetrieves the current status of the specified service.System.ServiceProcess.ServiceController.Status
StartServiceStarts a service.System.ServiceProcess.ServiceController.Start

Alphabetical Win32 Category List
Hierarchical Win32 Category List

String Functions

Win32 functionDescription.NET Framework API
CharLowerConverts a character string or a single character to lowercase.System.String.ToLower
CharNextRetrieves a pointer to the next character in a string.System.String.GetEnumerator.MoveNext
CharUpperConverts a character string or a single character to uppercase.System.String.ToUpper
CompareStringCompares two character strings, using the specified locale.System.String.Compare
IsCharAlphaDetermines whether a character is an alphabetical character.System.Char.IsLetter
IsCharAlphaNumericDetermines whether a character is either an alphabetical or a numeric character.System.Char.IsLetterOrDigit
IsCharLowerDetermines whether a character is lowercase.System.Char.IsLower
IsCharUpperDetermines whether a character is uppercase.System.Char.IsUpper
LoadStringLoads a string resource from the executable file associated with a specified module.System.Resources.ResourceManager.GetString
lstrcatAppends one string to another.System.String.Concat

Note   Strings are immutable in the .NET Framework. Methods that appear to modify a string actually return a new string.

lstrcmpCompares two character strings.System.String.Compare
lstrcmpiCompares two character strings.System.String.Compare
lstrcpyCopies a string to a buffer.System.String.ToCharArray
lstrcpynCopies a specified number of characters from a source string into a buffer.System.String.CopyTo
System.String.ToCharArray
lstrlenRetrieves the length of the specified string (not including the terminating null character).System.String.Length
wsprintfFormats and stores a series of characters and values in a buffer.System.String.Format
wvsprintfFormats and stores a series of characters and values in a buffer.System.String.Format

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Structured Exception-Handling Functions

Win32 functionDescription.NET Framework API
GetExceptionCodeRetrieves a code that identifies the type of exception that occurred.System.Exception.GetType
GetExceptionInformationRetrieves a machine-independent description of an exception and information about the machine state that existed for the thread when the exception occurred.System.Exception class
RaiseExceptionRaises an exception in the calling thread.Throw an instance of a System.Exception

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Synchronization Functions

CriticalSection functions:

Win32 functionDescription.NET Framework API
EnterCriticalSectionWaits for ownership of the specified critical section object.System.Threading.Monitor.Enter
LeaveCriticalSectionReleases ownership of the specified critical section object.System.Threading.Monitor.Exit
TryEnterCriticalSectionAttempts to enter a critical section without blocking.System.Threading.Monitor.TryEnter

Event functions:

Win32 functionDescription.NET Framework API
CreateEventCreates or opens a named or an unnamed event object.Either of the following:
System.Threading.AutoResetEvent
constructor
System.Threading.ManualResetEvent
constructor
ResetEventSets the specified event object to the nonsignaled state.Either of the following:
System.Threading.AutoResetEvent.Reset
System.Threading.ManualResetEvent.Reset
SetEventSets the specified event object to the signaled state.Either of the following:
System.Threading.AutoResetEvent.Set
System.Threading.ManualResetEvent.Set

Interlocked functions:

Win32 functionDescription.NET Framework API
InterlockedCompareExchangePerforms an atomic comparison of the specified values and exchanges the values, based on the outcome of the comparison.System.Threading.Interlocked.CompareExchange
InterlockedCompareExchangePointerPerforms an atomic comparison of the specified values and exchange of the values, based on the outcome of the comparison.System.Threading.Interlocked.CompareExchange
InterlockedDecrementDecrements (decreases by one) the value of the specified variable and checks the resulting value.System.Threading.Interlocked.Decrement
InterlockedExchangeAtomically exchanges a pair of values.System.Threading.Interlocked.Exchange
InterlockedIncrementIncrements (increases by one) the value of the specified variable and checks the resulting value.System.Threading.Interlocked.Increment

Mutex functions:

Win32 functionDescription.NET Framework API
CreateMutexCreates or opens a named or an unnamed mutex object.System.Threading.Mutex constructor
OpenMutexOpens an existing named mutex object.System.Threading.Mutex(false, string, name) constructor
ReleaseMutexReleases ownership of the specified mutex object.System.Threading.Mutex.ReleaseMutex

Wait functions:

Win32 functionDescription.NET Framework API
RegisterWaitForSingleObjectDirects a wait thread in the thread pool to wait on the object.System.Threading.ThreadPool.RegisterWaitForSingleObject
System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject
UnregisterWaitCancels a registered wait operation.System.Threading.RegisteredWaitHandle.Unregister
WaitForMultipleObjectsReturns when the specified criteria for the specified objects is met.Either of the following:
System.Threading.WaitHandle.WaitAll
System.Threading.WaitHandle.WaitAny
WaitForSingleObjectReturns when the specified criteria for the specified object is met.System.Threading.WaitHandle.WaitOne
WaitOrTimerCallbackReturns when the specified criteria is met.See System.Threading.WaitOrTimerCallback delegate

WaitableTimer functions:

Win32 functionDescription.NET Framework API
CancelWaitableTimerSets the specified waitable timer to the inactive state.System.Threading.Timer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite)
CreateWaitableTimerCreates or opens a waitable timer object.System.Threading.Timer constructor
SetWaitableTimerActivates the specified waitable timer.System.Threading.Timer constructor
TimerAPCProcApplication-defined timer completion routine used with SetWaitableTimer.See System.Threading.TimerCallback delegate

Alphabetical Win32 Category List
Hierarchical Win32 Category List

System Information Functions

Win32 functionDescription.NET Framework API
ExpandEnvironmentStringsReplaces environment-variable strings with their defined values.System.Environment.ExpandEnvironmentVariables
GetComputerNameRetrieves the NetBIOS name of the local computer.System.Environment.MachineName
System.Windows.Forms.SystemInformation.ComputerName
GetCurrentHwProfileRetrieves the current hardware profile for the local computer.Use System.Management and Microsoft.Win32.RegistryKey
GetKeyboardTypeRetrieves information about the current keyboard.System.Management.ManagementClass("Win32_Keyboard")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject.Properties
GetNativeSystemInfoRetrieves information about the current system for an application running under WOW64.System.Management.ManagementClass("Win32_Processor")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject.Properties
GetSysColorRetrieves the current color of a display element.System.Drawing.SystemColors
GetSystemDirectoryRetrieves the path of the system directory.System.Environment.SystemDirectory
GetSystemInfoRetrieves information about the current system.System.Management.ManagementClass("Win32_Processor")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject.Properties
GetSystemMetricsRetrieves system metrics and configuration settings.System.Windows.Forms.SystemInformation properties
GetUserNameRetrieves the user name of the current thread.System.Environment.UserName
GetVersionRetrieves the version number of the operating system.System.Environment.OSVersion
GetVersionExRetrieves the version number of the current operating system.System.Environment.OSVersion
GetWindowsDirectoryRetrieves the path of the Windows directory.System.Management.ManagementClass("Win32_OperatingSystem")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject["WindowsDirectory"].ToString

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Tape Backup Functions

Win32 functionDescription.NET Framework API
GetTapeParametersRetrieves information that describes the tape or the tape drive.System.Management.ManagementClass("MSTapeMediaCapacity")
System.Management.ManagementClass("Win32_TapeDrive")
System.Management.ManagementClass.GetInstances
System.Management.ManagementObject.Properties

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Text Object Model Functions

Win32 functionDescription.NET Framework API
ITextDocumentRetrieves the active selection and range objects for any story in the document.System.Windows.Forms.RichTextBox
ITextFontEncapsulates the functionality of the Microsoft Word Font dialog box.System.Windows.Forms.RichTextBox
ITextParaEncapsulates the functionality of the Microsoft Word Paragraph dialog box.System.Windows.Forms.RichTextBox
ITextRangeEnables an application to select text in a story, and then examine or change that text.System.Windows.Forms.RichTextBox

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Time Functions

Win32 functionDescription.NET Framework API
GetSystemTimeRetrieves the current system date and time in UTC format.System.DateTime.UtcNow
GetTimeFormatFormats a system time as a time string for a specified locale.System.DateTime.ToString
SystemTimeToFileTimeConverts a system time to a file time.System.DateTime.ToFileTime
FileTimeToLocalFileTimeConverts a UTC file time to a local file time.System.DateTime.ToFileTime
GetLocalTimeRetrieves the current local date and time.System.DateTime.Now
GetTimeZoneInformationRetrieves the current time-zone parameters.System.TimeZone.CurrentTimeZone
CompareFileTimeCompares two file times.System.DateTime.Compare
FileTimeToLocalFileTimeConverts a UTC file time to a local file time.System.DateTime.ToLocalTime
FileTimeToSystemTimeConverts a file time to system time format.System.DateTime.ToUniversalTime
GetFileTimeRetrieves the date and time that a file was created, last accessed, and last modified.Any of the following:
System.IO.Directory.GetCreationTime
System.IO.Directory.GetLastAccessTime
System.IO.Directory.GetLastWriteTime
System.IO.DirectoryInfo.CreationTime
System.IO.DirectoryInfo.LastAccessTime
System.IO.DirectoryInfo.LastWriteTime
System.IO.File.GetCreationTime
System.IO.File.GetLastAccessTime
System.IO.File.GetLastWriteTime
System.IO.FileInfo.CreationTime
System.IO.FileInfo.LastAccessTime
System.IO.FileInfo.LastWriteTime
GetSystemTimeAsFileTimeRetrieves the current system date and time in UTC format.System.DateTime.UtcNow.ToFileTimeUtc
LocalFileTimeToFileTimeConverts a local file time to a file time based on UTC.System.DateTime.ToFileTimeUtc
SetFileTimeSets the date and time that a file was created, last accessed, or last modified.Any of the following:
System.IO.Directory.SetCreationTime
System.IO.Directory.SetLastAccessTime
System.IO.Directory.SetLastWriteTime
System.IO.DirectoryInfo.CreationTime
System.IO.DirectoryInfo.LastAccessTime
System.IO.DirectoryInfo.LastWriteTime
System.IO.File.SetCreationTime
System.IO.File.SetLastAccessTime
System.IO.File.SetLastWriteTime
System.IO.FileInfo.CreationTime
System.IO.FileInfo.LastAccessTime
System.IO.FileInfo.LastWriteTime
SystemTimeToFileTimeConverts a system time to a file time.System.DateTime.ToFileTime
GetTickCountRetrieves the number of milliseconds that have elapsed since the system was started.System.Environment.TickCount

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Timer Functions

Win32 functionDescription.NET Framework API
KillTimerDestroys the specified timer.System.Threading.Timer.Dispose
System.Timers.Timer.Dispose
System.Windows.Forms.Timer.Dispose
QueryPerformanceCounterRetrieves the current value of the high-resolution performance counter.System.Diagnostics.PerformanceCounter.NextValue
System.Diagnostics.PerformanceCounter.RawValue
QueryPerformanceFrequencyRetrieves the frequency of the high-resolution performance counter.System.Diagnostics.PerformanceCounter.CounterType
SetTimerCreates a timer with the specified time-out value.Any of the following:
System.Threading.Timer
constructor
System.Timers.Timer
constructor
System.Windows.Forms.Timer
constructor
System.Windows.Forms.Timer.Interval
TimerProcAn application-defined callback function that processes WM_TIMER messages.Either of the following:
System.Threading.TimerCallback
delegate
System.Timers.ElapsedEventHandler
delegate

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Tool Help Functions

Win32 functionDescription.NET Framework API
CreateToolhelp32SnapshotTakes a snapshot of the processes and heaps, modules, and threads used by the processes.System.Diagnostics.Process.GetProcesses
System.Diagnostics.Process.Modules
System.Diagnostics.Process.Threads
Module32FirstRetrieves information about the first module associated with a process.System.Diagnostics.Process.Modules
Module32NextRetrieves information about the next module associated with a process or thread.System.Diagnostics.Process.Modules
Process32FirstRetrieves information about the first process encountered in a system snapshot.System.Diagnostics.Process.GetProcesses
Process32NextRetrieves information about the next process recorded in a system snapshot.System.Diagnostics.Process.GetProcesses
Thread32FirstRetrieves information about the first thread of any process encountered in a system snapshot.System.Diagnostics.Process.Threads
Thread32NextRetrieves information about the next thread of any process encountered in the system memory snapshot.System.Diagnostics.Process.Threads

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Unicode and Character Set Functions

Win32 functionDescription.NET Framework API
GetTextCharsetRetrieves a character-set identifier for the font that is currently selected into a specified device context.System.Drawing.Font.GdiCharSet

Alphabetical Win32 Category List
Hierarchical Win32 Category List

User Profile Functions

Win32 functionDescription.NET Framework API
CreateEnvironmentBlockRetrieves the environment variables for the specified user.Microsoft.Win32.Registry class
Microsoft.Win32.RegistryKey.OpenSubKey(name).GetValue
DeleteProfileDeletes the user profile and all user-related settings from the specified computer.System.IO.Directory.Delete
Microsoft.Win32.Registry
Microsoft.Win32.RegistryKey.DeleteSubKey
ExpandEnvironmentStringsForUserExpands the source string by using the environment block established for the specified user.Microsoft.Win32.Registry class

Microsoft.Win32.RegistryKey.OpenSubKey(name).GetValueNames, and then call GetValue for each name

GetAllUsersProfileDirectoryRetrieves the path to the root of the All Users profile.Microsoft.Win32.Registry class
Microsoft.Win32.RegistryKey.OpenSubKey(name).GetValue
GetDefaultUserProfileDirectoryRetrieves the path to the root of the Default User profile.Microsoft.Win32.Registry class
Microsoft.Win32.RegistryKey.OpenSubKey(name).GetValue
GetProfilesDirectoryRetrieves the path to the root directory where all of the user profiles are stored.Microsoft.Win32.Registry class
Microsoft.Win32.RegistryKey.OpenSubKey(name).GetValue
GetUserProfileDirectoryRetrieves the path to the root directory of the profile for the specified user.Microsoft.Win32.Registry class
Microsoft.Win32.RegistryKey.OpenSubKey(name).GetValue

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Version Information Functions

Win32 functionDescription.NET Framework API
GetFileVersionInfoRetrieves version information for the specified file.System.Diagnostics.FileVersionInfo.GetVersionInfo
GetFileVersionInfoSizeDetermines whether the operating system can retrieve version information for a specified file. If version information is available, the function returns the size, in bytes, of that information.System.Diagnostics.FileVersionInfo.GetVersionInfo
VerLanguageNameRetrieves a description string for the language associated with a specified binary Microsoft language identifier.System.Globalization.CultureInfo.Name
VerQueryValueRetrieves specified version information from the specified version-information resource.System.Diagnostics.FileVersionInfo properties

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Window Functions

Win32 functionDescription.NET Framework API
AdjustWindowRectCalculates the required size of the window rectangle, based on the desired client-rectangle size.System.Windows.Forms.Form.ClientSize
AdjustWindowRectExCalculates the required size of the window rectangle, based on the desired client-rectangle size.System.Windows.Forms.Form.ClientSize
ArrangeIconicWindowsArranges all minimized (iconic) child windows of the specified parent window.System.Windows.Forms.Form.LayoutMdi(MdiLayout.ArrangeIcons)
BringWindowToTopBrings the specified window to the top of the Z order.System.Windows.Forms.Form.BringToFront
CascadeWindowsCascades the specified child windows of the specified parent window.System.Windows.Forms.Form.LayoutMdi(MdiLayout.Cascade)
ChildWindowFromPointDetermines which, if any, of the child windows belonging to a parent window contains the specified point.System.Windows.Forms.Form.GetChildAtPoint
CloseWindowMinimizes (but does not destroy) the specified window.System.Windows.Forms.Form.WindowState = System.Windows.Forms.FormWindowState.Minimized
CreateWindowCreates an overlapped, pop-up, or child window.System.Windows.Forms.Form constructor
CreateWindowExCreates an overlapped, pop-up, or child window with an extended window style.System.Windows.Forms.Form constructor
DestroyWindowDestroys the specified window.System.Windows.Forms.Form.Close
EnumChildProcAn application-defined callback function used with EnumChildWindows.Same as EnumChildWindows
EnumChildWindowsEnumerates the child windows that belong to the specified parent window.System.Windows.Forms.Form.Controls
GetAncestorRetrieves the handle to the ancestor of the specified window.System.Windows.Forms.Form.FindForm
System.Windows.Forms.Form.Owner
System.Windows.Forms.Form.Parent
GetClientRectRetrieves the coordinates of the client area for a window.System.Windows.Forms.Form.ClientRectangle
GetForegroundWindowReturns a handle to the foreground window.System.Windows.Forms.Form.ActiveForm
GetLayeredWindowAttributesRetrieves the opacity and transparency color key of a layered window.System.Windows.Forms.Form.Opacity
System.Windows.Forms.Form.TransparencyKey
GetNextWindowRetrieves a handle to the next or previous window in Z order.System.Windows.Forms.Form.Controls[1 +/- Control.IndexOf]
GetParentRetrieves a handle to the parent window for the specified child window.System.Windows.Forms.Form.FindForm
System.Windows.Forms.Form.Parent
GetTitleBarInfoRetrieves information about the specified title bar.System.Windows.Forms.Form.SystemInformation.CaptionButtonSize
System.Windows.Forms.Form.SystemInformation.CaptionHeight
System.Windows.Forms.Form.HelpButton
System.Windows.Forms.Form.MaximizeBox
System.Windows.Forms.Form.MinimizeBox
GetTopWindowRetrieves a handle to the child window at the top of the Z order.System.Windows.Forms.Form.Controls[0]
GetWindowRetrieves a handle to a window that has the specified relationship to the specified window.System.Windows.Forms.Form.Controls
GetWindowInfoRetrieves information about the specified window.System.Windows.Forms.Form.ClientSize
System.Windows.Forms.Form.CreateParams.ExStyle
System.Windows.Forms.Form.CreateParams.Style
System.Windows.Forms.Form.Name
System.Windows.Forms.Form.ProductVersion
System.Windows.Forms.Form.Size
System.Windows.Forms.SystemInformation.BorderSize
GetWindowPlacementRetrieves the show state and the restored, minimized, and maximized positions of the specified window.System.Windows.Forms.Form.Bounds
System.Windows.Forms.Form.MaximizedBounds
System.Windows.Forms.Form.Visible
System.Windows.Forms.Form.WindowState
GetWindowRectRetrieves the dimensions of the bounding rectangle of the specified window.System.Windows.Forms.Form.Bounds
GetWindowTextCopies the text of the title bar of the specified window.System.Windows.Forms.Form.Text
GetWindowTextLengthRetrieves the length of the title bar text for the specified window.System.Windows.Forms.Form.Text.Length
IsChildTests whether a window is a child window or descendant window of a specified parent window.System.Windows.Forms.Form.Contains
System.Windows.Forms.Form.IsMdiChild
IsIconicDetermines whether the specified window is minimized (iconic).System.Windows.Forms.Form.WindowState
IsWindowVisibleRetrieves the visibility state of the specified window.System.Windows.Forms.Form.Visible
IsZoomedDetermines whether a window is maximized (zoomed).System.Windows.Forms.Form.WindowState
MoveWindowChanges the position and dimensions of the specified window.System.Windows.Forms.Form.SetBounds
OpenIconRestores a minimized (iconic) window to its previous size and position.System.Windows.Forms.Form.WindowState = System.Windows.Forms.FormWindowState.Normal
SetForegroundWindowPuts the thread that created the specified window into the foreground and activates the window.System.Windows.Forms.Form.Activate
SetLayeredWindowAttributesSets the opacity and transparency color key of a layered window.System.Windows.Forms.Form.Opacity
System.Windows.Forms.Form.TransparencyKey
SetParentChanges the parent window of the specified child window.System.Windows.Forms.Form.Parent
SetWindowPlacementSets the show state and the restored, minimized, and maximized positions of the specified window.System.Windows.Forms.Form.Bounds
System.Windows.Forms.Form.MaximizedBounds
System.Windows.Forms.Form.SetBounds
System.Windows.Forms.Form.Visible
System.Windows.Forms.Form.WindowState
SetWindowPosChanges the size, position, and Z order of a window.System.Windows.Forms.Form.BringToFront
System.Windows.Forms.Form.Enabled
System.Windows.Forms.Form.SendToBack
System.Windows.Forms.Form.SetBounds
System.Windows.Forms.Form.TopMost
System.Windows.Forms.Form.Visible
SetWindowTextChanges the text of the title bar for the specified window.System.Windows.Forms.Form.Text
ShowWindowSets the show state of the specified window.System.Windows.Forms.Form.Show
System.Windows.Forms.Form.Visible
System.Windows.Forms.Form.WindowState
TileWindowsTiles the specified child windows of the specified parent window.System.Windows.Forms.Form.LayoutMdi(MdiLayout.TileHorizontal)
System.Windows.Forms.Form.LayoutMdi(MdiLayout.TileVertical)
WindowFromPointRetrieves a handle to the window that contains the specified point.System.Windows.Forms.Form.GetChildAtPoint

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Window Class Functions

Win32 functionDescription.NET Framework API
GetClassInfoRetrieves information about a window class.System.ComponentModel.Component.Events
System.Windows.Forms.Control.Cursor
System.Windows.Forms.Control.Name
System.Windows.Forms.Form.BackColor
System.Windows.Forms.Form.Icon
System.Windows.Forms.Form.Menu
System.Windows.Forms.Form.CreateParams.ClassStyle
GetClassLongRetrieves the specified 32-bit value from the WNDCLASSEX structure associated with the specified window.System.ComponentModel.Component.Events
System.Windows.Forms.Control.Cursor
System.Windows.Forms.Control.Name
System.Windows.Forms.Form.BackColor
System.Windows.Forms.Form.Icon
System.Windows.Forms.Form.Menu
System.Windows.Forms.Form.CreateParams.ClassStyle
GetClassLongPtrRetrieves the specified value from the WNDCLASSEX structure associated with the specified window.System.ComponentModel.Component.Events
System.Windows.Forms.Control.Cursor
System.Windows.Forms.Control.Name
System.Windows.Forms.Form.BackColor
System.Windows.Forms.Form.Icon
System.Windows.Forms.Form.Menu
System.Windows.Forms.Form.CreateParams.ClassStyle
GetClassNameRetrieves the name of the class to which the specified window belongs.System.Windows.Forms.Control.Name
GetWindowLongRetrieves information about the specified window.System.ComponentModel.Component.Events
System.Windows.Forms.Control.Parent
System.Windows.Forms.Form.CreateParams.ExStyle
System.Windows.Forms.Form.CreateParams.Style
System.Windows.Forms.Form
properties
GetWindowLongPtrRetrieves information about the specified window.System.ComponentModel.Component.Events
System.Windows.Forms.Control.Parent
System.Windows.Forms.Form.CreateParams.ExStyle
System.Windows.Forms.Form.CreateParams.Style
System.Windows.Forms.Form
properties
RegisterClassRegisters a window class.System.Windows.Forms.Control.Cursor
System.Windows.Forms.Control.Name
System.Windows.Forms.Form.BackColor
System.Windows.Forms.Form.Icon
System.Windows.Forms.Form.Menu
System.Windows.Forms.Form.CreateParams.ClassStyle
System.Windows.Forms.Form
events
SetClassLongReplaces the specified 32-bit value at the specified offset into the extra class memory or the WNDCLASSEX structure.System.Windows.Forms.Control.Cursor
System.Windows.Forms.Control.Name
System.Windows.Forms.Form.BackColor
System.Windows.Forms.Form.Icon
System.Windows.Forms.Form.Menu
System.Windows.Forms.Form.CreateParams.ClassStyle
System.Windows.Forms.Form
events
SetClassLongPtrReplaces the specified value at the specified offset into the extra class memory or the WNDCLASSEX structure.System.Windows.Forms.Control.Cursor
System.Windows.Forms.Control.Name
System.Windows.Forms.Form.BackColor
System.Windows.Forms.Form.Icon
System.Windows.Forms.Form.Menu
System.Windows.Forms.Form.CreateParams.ClassStyle
System.Windows.Forms.Form
events
SetWindowLongChanges an attribute of the specified window.System.Windows.Forms.Control.Parent
System.Windows.Forms.Form.CreateParams.ExStyle
System.Windows.Forms.Form.CreateParams.Style
System.Windows.Forms.Form
properties
System.Windows.Forms.Form
events
SetWindowLongPtrChanges an attribute of the specified window.System.Windows.Forms.Control.Parent
System.Windows.Forms.Form.CreateParams.ExStyle
System.Windows.Forms.Form.CreateParams.Style
System.Windows.Forms.Form
properties
System.Windows.Forms.Form
events

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Window Procedure Functions

Win32 functionDescription.NET Framework API
DefWindowProcCalls the default window procedure to provide default processing for any window messages that an application does not process.Any of the following:
System.Windows.Forms.Form.DefWndProc
System.Windows.Forms.Control.DefWndProc
System.Windows.Forms.NativeWindow.DefWndProc
WindowProcAn application-defined function that processes messages sent to a window.Any of the following:
System.Windows.Forms.Form.WndProc
System.Windows.Forms.Control.WndProc
System.Windows.Forms.NativeWindow.WndProc

Alphabetical Win32 Category List
Hierarchical Win32 Category List

Window Property Functions

Win32 functionDescription.NET Framework API
GetPropRetrieves a data handle from the property list of the specified window.System.Windows.Forms.Control.Tag
RemovePropRemoves an entry from the property list of the specified window.System.Windows.Forms.Control.Tag
SetPropAdds a new entry or changes an existing entry in the property list of the specified window.System.Windows.Forms.Control.Tag

Alphabetical Win32 Category List
Hierarchical Win32 Category List

 

Manage Your Profile | Legal | Contact Us | MSDN Flash Newsletter
©2007 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
 
 

Microsoft Win32 to Microsoft .NET Framework API Map