Windows API functions (1)

Source: Internet
Author: User
Tags drawtext filetime

1. network functions of Apis
WNetAddConnection creates a permanent connection to the same network resource
WNetAddConnection2 create a connection to the same network resource
WNetAddConnection3 create a connection to the same network resource
WNetCancelConnection ends a network connection
WNetCancelConnection2 ends a network connection
WNetCloseEnum ends an enumeration operation
WNetConnectionDialog
Start a standard dialog box to establish a connection to resources in the same network.
WNetDisconnectDialog
Start a standard dialog box to disconnect resources from the same network.
WNetEnumResource enumeration Network Resources
WNetGetConnection gets the network name of a local or connected Resource
WNetGetLastError: Get the extended error message of network errors
WNetGetUniversalName
Obtain the remote name and/or UNC (Unified naming convention) Name of a file in the network.
WNetGetUser obtains the name of a network resource used for connection.
WNetOpenEnum starts the network resource enumeration process

2. Message functions of Apis
BroadcastSystemMessage
Broadcasts a system message to all top-level windows in the system.
GetMessagePos
Obtains the mouse pointer screen position when the previous message in the message queue is processed.
GetMessageTime: the time when the previous message in the message queue is processed.
PostMessage delivers a message to the message queue in the specified window.
PostThreadMessage delivers a message to the application
RegisterWindowMessage gets the message number assigned to a string identifier
ReplyMessage
SendMessage calls the window function of a window and sends a message to that window.
SendMessageCallback sends a message to the window
SendMessageTimeout sends a message to the window
Sendpolicymessage sends a message to the window
3. API-based file processing functions
CloseHandle
Closes a kernel object. This includes file, file ing, process, thread, security, and synchronization objects.

CompareFileTime: Compare the time of two files
CopyFile
CreateDirectory create a new directory
CreateFile
Open and create files, pipelines, mail tanks, communication services, devices, and the Console
CreateFileMapping creates a new file ing object
DeleteFile: delete a specified file
DeviceIoControl
DosDateTimeToFileTime converts the DOS Date and Time Value into a win32 FILETIME
Value
FileTimeToDosDateTime returns a win32 FILETIME
The value is converted to the DOS Date and Time Value.
FileTimeToLocalFileTime converts a FILETIME structure to the local time
FileTimeToSystemTime
Load a SYSTEMTIME structure according to the content of a FILETIME Structure
FindClose closes a search handle created by the FindFirstFile function.
FindFirstFile
FindNextFile
Find the next file based on the file name specified when the FindFirstFile function is called.
FlushFileBuffers refreshes the internal file buffer for the specified file handle
FlushViewOfFile refreshes all data written into the file ing buffer to the disk.
GetBinaryType determines whether the file can be executed
GetCompressedFileSize
Determine the actual number of bytes occupied by a compressed file on the disk
GetCurrentDirectory loads the current directory in a buffer
GetDiskFreeSpace
Obtains information about the organization of a disk and the capacity of the remaining space.
GetDiskFreeSpaceEx
Obtains information about the organization of a disk and the remaining space.
GetDriveType determines the type of a disk drive
GetExpandedName: Get the full name of a compressed file
GetFileAttributes determines the attributes of a specified file
GetFileInformationByHandle
This function provides a mechanism for obtaining file information.
GetFileSize determines the file length
GetFileTime: Get the time information of the specified object
GetFileType: determines the file type while giving the file handle.
GetFileVersionInfo obtains the file version information from a module that supports version tagging.
GetFileVersionInfoSize
Determine the size of the buffer zone required for a file containing version Resources

GetFullPathName: Get the complete path name of the specified file
GetLogicalDrives
GetLogicalDriveStrings
Obtains a string containing the root drive paths of all current logical drives.
GetOverlappedResult determines the current status of an overlapping operation
GetPrivateProfileInt
Obtains an integer for the entry specified in the initialization file (. ini file ).
GetPrivateProfileSection
Obtains a list Of all item names and values in a specified section (in the. ini file ).
GetPrivateProfileString is the string obtained for the specified entry in the initialization file
GetProfileInt gets an integer of the specified entry in the win. ini initialization file.
GetProfileSection
Obtains a list Of all item names and values in a specified section (in the win. ini file ).
GetProfileString is the string specified in the win. ini initialization file.
GetShortPathName: Get the short path name of the specified file
GetSystemDirectory
Obtain the complete path name of the Windows System directory (that is, the System directory)
GetTempFileName
This function contains the name of a temporary file, which can be used by applications.
GetTempPath: Get the path specified for the temporary file
GetVolumeInformation obtains information about a disk volume.
GetWindowsDirectory: Obtain the complete path name of the Windows directory
Hread reference lread
Hwrite reference lwrite Function
Lclose closes the specified file
Lcreat creates a file
Llseek sets the current location for reading and writing in the file
LockFile locks a part of the file so that it is not shared with other applications.
LockFileEx is similar to LockFile, but it provides more functions.
Lopen opens the specified file in binary mode.
Lread reads data from files into the memory buffer.
Lwrite writes data from the memory buffer to a file
LZClose closes a file opened by the LZOpenFile or LZInit function.
Copy an object through LZCopy
LZInit: This function is used to initialize the internal buffer.
LZOpenFile: this function can process a large number of different files and is compatible with compressed files.
LZRead reads data from files into the memory buffer
LZSeek sets the current position for reading and writing a file.
MapViewOfFile maps a file ing object to the address space of the current application.
MoveFile
The OpenFile function can perform a large number of different file operations.
OpenFileMapping open a ready-made file ing object
QueryDosDevice in Windows
In NT, the DOS device name is mapped to the NT System device name. This function can be used to determine the current device ing status.

ReadFile reads data from a file
ReadFileEx
Similar to ReadFile, it can only be used for asynchronous read operations and contains a complete callback.

RegCloseKey disables an entry (or key) in the system registry)
RegConnectRegistry accessing some registries of the remote system
RegCreateKey creates or opens an item under the specified item
RegCreateKeyEx
Creating a new project under a specified item is more complex. We recommend that you use this function in the Win32 environment.

RegDeleteKey: delete a specified subitem under an existing item.
RegDeleteValue deletes a value under a specified item
RegEnumKey refers to the subitem of a specified item. Use RegEnumKeyEx in Win32
RegEnumKeyEx enumeration subitem under a specified item
RegEnumValue enumeration value of a specified item
RegFlushKey writes the changes made to the item and its sub-item to the disk.
RegGetKeySecurity obtains the security information related to a registry key.
RegLoadKey
Load registry information from a file previously created using the RegSaveKey Function
Regpolicychangekeyvalue
This function provides a notification mechanism when the registry key or any of its subkeys change.

RegOpenKey open an existing registry key
RegOpenKeyEx opens an existing item. This function is recommended in win32.
RegQueryInfoKey obtains information related to an item.
RegQueryValue gets the default (untitled) value of a specified item or subitem
RegQueryValueEx obtains the setting value of an item.
RegReplaceKey
Replace the registry information with the information saved in a disk file, and create a backup that contains the current registry information.

RegRestoreKey restores registry information from a disk file
RegSaveKey saves an item and all its sub-items to a disk file.
RegSetKeySecurity: sets the security features of a specified item.
RegSetValue: sets the default value of a specified item or subitem.
RegSetValueEx
RegUnLoadKey uninstalls the specified item and all its sub-items.
RemoveDirectory: delete a specified directory
SearchPath
SetCurrentDirectory
SetEndOfFile sets the current file location to the end of the file for an opened file
SetFileAttributes
SetFilePointer sets the current read/write location in a file
SetFileTime: Set the file creation, access, and last modification time.
SetHandleCount
This function does not have to be used in win32; even if it is used, it will not have any effect.
SetVolumeLabel sets the Label of a disk)
SystemTimeToFileTime
Load a SYSTEMTIME structure according to the content of a FILETIME Structure
UnlockFile unlocks a file
UnlockFileEx unlocks a file
UnmapViewOfFile
Unmaps a file ing object from the memory address space of the current application.
VerFindFile uses this function to determine where a file should be installed.
VerInstallFile uses this function to install a file
Verrentagename: this function can obtain the name of a language based on 16-bit language code.
VerQueryValue: This function is used to obtain information from version resources.
WriteFile writes data to a file
WriteFileEx
Similar to WriteFile, it can only be used for asynchronous write operations and includes a complete callback.

WritePrivateProfileSection
Set all item names and values for the section specified in an initialization file (. ini ).
WritePrivateProfileString
WriteProfileSection
Set all item names and values for a specified section in the Win. ini initialization file
WriteProfileString: Set a string in the specified section of the Win. ini initialization file.
4. Printing functions of Apis
AbortDoc cancels printing of a document
AbortPrinter deletes the buffer file associated with a printer.
AddForm adds a new form to the printer form List
AddJob
Obtain a valid path name to create a background print file for the job. It also assigns a job number to the job.

AddMonitor adds a printer monitor to the System
AddPort
Start the "add Port" dialog box to allow users to add a new port to the list of available system ports.

AddPrinter adds a new printer to the System
AddPrinterConnection connects to the specified printer
AddPrinterDriver adds a print driver for the specified system
AddPrintProcessor adds a print processor to the specified system
AddPrintProvidor adds a printing vendor to the System
AdvancedDocumentProperties Enable Printer document Settings dialog box
ClosePrinter closes an opened printer object
ConfigurePort starts a port configuration dialog box for the specified port.
ConnectToPrinterDlg
Start the printer connection dialog box and use it to connect to a printer that accesses the network
DeleteForm: delete a form from the list of available printer forms
DeleteMonitor deletes the specified print monitor.
DeletePort
Start the "delete port" dialog box to allow users to delete a port from the current system.
DeletePrinter marks the specified printer as deleted from the system
DeletePrinterConnection Delete the connection to the specified printer
DeletePrinterDriver: delete a printer driver from the system.
DeletePrintProcessor deletes a print processor from the specified system
DeletePrintProvidor deletes a printing vendor from the system
DeviceCapabilities
This function can be used to obtain information related to the capabilities of a device.
DocumentProperties printer configuration control function
EndDocAPI ends a successful print job
EndDocPrinter specifies the end of a document at the program level in the background
EndPage
Use this function to print a page and prepare a device scenario to print the next page.

EndPagePrinter specifies the end of a page in the print job
EnumForms enumerate the forms available for a printer
EnumJobs enumeration print jobs in the queue
EnumMonitors enumeration available print monitors
EnumPorts
EnumPrinterDrivers enumeration specifies the printer driver installed in the system
Printer installed in EnumPrinters enumeration system
EnumPrintProcessorDatatypes
Enumerative data types supported by a print processor
EnumPrintProcessors enumeration of available print processors in the system
Escape device Control Function
FindClosePrinterChangeNotification
Disable a printer notification object obtained using the FindFirstPrinterChangeNotification Function

FindFirstPrinterChangeNotification
Create a new change notification object so that we can pay attention to the changes in the printer status.
FindNextPrinterChangeNotification
Use this function to determine the cause for triggering a printer to change the notification signal.
Freeprinterpolicyinfo
Releases a buffer allocated by the FindNextPrinterChangeNotification function.
GetForm obtains information related to the specified form.
GetJob obtains information related to a specified job.
GetPrinter obtains information related to the specified printer.
GetPrinterData sets registry configuration information for the printer
GetPrinterDriver
Obtains information about the printer driver for the specified printer.
GetPrinterDriverDirectory
Determines what directory the specified system contains the printer driver.
GetPrintProcessorDirectory
Determines the directory where the specified system contains the printer processor driver and files
Open the specified printer and obtain the printer handle.
PrinterMessageBox
Display a printer error message box on the system with the specified print job
PrinterProperties launch printer Properties dialog box to configure the printer
ReadPrinter reads data from the printer
ResetDC resetting a device scenario
ResetPrinter changes the default data type and document settings of the specified printer
ScheduleJob submit a job to print
SetAbortProc specifies the address for canceling the function for Windows.
SetForm: sets the information for the specified form.
SetJob controls the status of a print job
SetPrinter controls the status of a printer
SetPrinterData: Set the Registry configuration of the printer
StartDoc starts a print job
StartDocPrinter starts a new document at the background printing level
Call this function before you print a new page on StartPage.
StartPagePrinter specifies the start of a new page in the print job.
WritePrinter writes data in the sending directory to the printer
5. Text and font functions of Apis
AddFontResource adds a Font Resource in Windows
CreateFont creates a logical font with the specified attribute
CreateFontIndirect creates a logical font with the specified attribute
CreateScalableFontResource
Creates a resource file for a TureType font so that you can use the API function AddFontResource to add it to Windows.

DrawText depicts the text in the specified rectangle.
DrawTextEx is similar to DrawText, but more functions are added.
EnumFontFamilies lists available fonts of a specified device
EnumFontFamiliesEx lists available fonts for a specified device
EnumFonts lists available fonts for a specified device
Extended text descriptor function of ExtTextOut. For more information, see SetTextAlign.
GetAspectRatioFilterEx
When you use SetMapperFlags to require Windows to select only the grating font that matches the current aspect ratio of the device, this function can determine the aspect ratio.

GetCharABCWidths determines the A-B-C size of one or more characters in the TureType font
GetCharABCWidthsFloat queries the size of the A-B-C for one or more characters in a font
GetCharacterPlacement
This function is used to understand how to display a string with a given character.
GetCharWidth investigates the width of one or more characters in the font.
GetFontData receives data from a scalable font file.
GetFontLanguageInfo returns the font information of the specified device scenario.
GetGlyphOutline: obtains the curve information of a character in the TureType font.
GetKerningPairs
GetOutlineTextMetrics
Receive detailed information related to the internal features of the TureType font
GetRasterizerCaps: Check whether the system supports scalable fonts.
GetTabbedTextExtent
Determine the range occupied by a string and consider the factors of tabulation station expansion.
GetTextAlign receives the current text alignment mark for a device scenario
GetTextCharacterExtra determines the current value of the extra Character Spacing
GetTextCharset receives the character set identifier of the font selected for the specified device scenario
GetTextCharsetInfo gets detailed information about the character set of the selected font
GetTextColor determines the current font color. It is also known as "foreground"
GetTextExtentExPoint
Determines the number of characters in the specified region. It also uses an array to load the range information of each character.

GetTextExtentPoint determines the size (range) of a string)
GetTextFace obtains the name of a font.
GetTextMetrics obtains information related to the physical font selected for a device scenario.
GrayString
Depicts a gray string. Windows is usually used to identify the prohibited status.
PolyTextOut depicts a series of strings
RemoveFontResource deletes a font resource from Windows.
SetMapperFlags
When you map fonts in Windows, you can use this function to select a grating font that matches the aspect ratio of the target device.

SetTextAlign
Sets the text alignment mode and specifies the current location of the device scenario during text output.

SetTextCharacterExtra
Specify the extra spacing to insert between characters when describing text
SetTextColor sets the color of the current text. This color is also called "foreground color"
SetTextJustification
You can use this function to align the two ends of the text by specifying the extra space occupied by a text line.

TabbedTextOut supports a text plotting function of tabulation sites.
TextOut text plotting function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.