VC + + Windows API

Source: Internet
Author: User
Tags drawtext filetime local time message queue naming convention readfile win32
WindowsAPI Function List    WindowsAPI Introduction:The English full name of the API (application programming Interface), WIN32 API is the MicrosoftWindows 32-bit Platform application programming interface. The understanding of this definition needs to be traced back to the development history of the operating system, when the Windows operating system began to dominate, the development of applications under the Windows platform became a requirement. And in the early days of the development of Windows programming, the only programming tools that Windows programmers can use are API functions, which Windows provides to applications and operating systems, and they are like "building blocks," which can be used to build a variety of interface-rich, A flexible, functional application. So you can think of API functions as the cornerstone of the entire Windows framework, below which is the OS core of Windows, and it's all gorgeous Windows applications. List of API functions:   1. API network Functions wnetaddconnection Create 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 end a network connection WNetCancelConnection2 end a network connection Wnetcloseenum end an enumeration operation WNetConnectionDialog start a label Quasi-dialog box to establish a connection to a network resource Wnetdisconnectdialog start a standard dialog box to disconnect from network resources WNetEnumResource Enumerate network resources wnetgetconnection get local or connected The network name of a resource Wnetgetlasterror an extended error message to get a network error wnetgetuniversalname get the remote name of a file in the network and/or UNC (uniform naming convention) name Wnetgetuser get a network The name that the resource is used to connect wnetopenenum the process of starting an enumeration of network resources 2. API Message function Broadcastsystemmessage A system message to all top-level windows in the system Getmessagepos the mouse pointer screen position when the last message in the message queue has been processed getmessagetime get the message The time that the last message in the queue was processed PostMessage a message to the specified window for Message Queuing PostThreadMessage post a message to the application RegisterWindowMessage get assigned to a string identifier. Message number Replymessage reply a message SendMessage call a window function, send a message to that window Sendmessagecallback send a message to the window SendMessageTimeout Send a message to the window SendNotifyMessage send a message to the window 3. The API's file handler function CloseHandle closes a kernel object. These include files, file mappings, processes, threads, Annsynchronization objects and other Comparefiletime compare the time of two files copyfile copy files createdirectory create a new directory CreateFile open and create files, pipelines, slots, communications services, devices, and consoles CreateFileMapping creates a new file mapping object DeleteFile deletes the specified file DeviceIoControl performs the specified operation on the device Dosdatetimetofiletime converts DOS date and time values into a Win32 FILETIME value FILETIMETODOSDATETIME converts a Win32 FILETIME value to a DOS date and time value FileTimeToLocalFileTime converts a FILETIME structure to a local time FileTimeToSystemTime loads a SYSTEMTIME structure based on the contents of a FILETIME structure FindClose closes a search handle created by the FindFirstFile function FindFirstFile Find a file based on the filename findnextfile the next file flushfilebuffers for the specified file handle, depending on the file name specified when the FindFirstFile function is called, the internal file buffer is refreshed Flushviewoffile All data written to the file mapping buffer is flushed to disk Getbinarytype determine if the file can be executed getcompressedfilesize determine the number of bytes actually occupied by a compressed file on disk GetCurrentDirectory in a slow Mount the current directory in the GetDiskFreeSpace to obtain information about the organization of a disk, and to understand the capacity of the remaining space GetDiskFreeSpaceEx obtain information about the organization of a disk and the capacity of the remaining space GetDriveType judgment    The type of a disk drive Getexpandedname gets the full name of a compressed file GetFileAttributes determine the properties of the specified file GetFileInformationByHandle This function provides a mechanism for obtaining file information   GetFileSize determine file length Getfiletime Gets the time information of the specified file Getfiletype, on the premise of giving a file handle, determines the file type GetFileVersionInfo Obtain the file version information from a module that supports the version tag Getfileversionin Fosize for a file containing a version resource, it is necessary to determine how large a buffer is needed to hold the file version information Getfullpathname get the full pathname of the specified file getlogicaldrives determine which logical drive letters exist in the system Getlogi Caldrivestrings gets a string that contains the root drive path of all current logical drives GetOverlappedResult the current state of an overlapping operation Getprivateprofileint as an initialization file (. ini file) The specified entry gets an integer value getprivateprofilesection gets a list of all the item names and values in the specified subsection (in an. ini file) getprivateprofilestring A string for the entry specified in the initialization file Getpro Fileint obtains an integer value for the specified entry in the Win.ini initialization file getprofilesection gets a list of all item names and values in the specified subsection (in Win.ini file) GetProfileString is the Win.ini initialization file middle finger The specified entry takes a string getshortpathname gets the short path name of the designated file GetSystemDirectory obtains the full pathname of the Windows system directory (that is, the system directory) GetTempFileName This function contains a The name of the temporary file that the application uses GetTempPath to get the path specified for the temporary file GetVolumeInformation get information about a disk volume getwindowsdirectory get the complete path to the Windows directory Path name Hread reference lread hwrite reference lwrite function Lclose Close the specified file lcreat create a file Llseek the current location of read/write in the settings file Lockfile lock a part of the file So that it is not shared with other applications LockfileeX is similar to Lockfile, except that it provides more functionality Lopen open the specified file in binary mode Lread read the data in the file into the memory buffer Lwrite write the data from the memory buffer to a file Lzclose close by Lzopenfil E or Lzinit function to open a file lzcopy copy a file lzinit This function is used to initialize the internal buffer lzopenfile the function can perform a large number of different file processing and is compatible with compressed files Lzread read data from a file into memory Buffer Lzseek Sets the current location for reading and writing in a file MapViewOfFile mapping a file map object to the address space of the current application MoveFile moving files OpenFile This function can perform a number of different file operations O Penfilemapping opens a ready-made file mapping object Querydosdevice in Windows NT, the DOS device name is mapped to the NT system device name.    This function can be used to determine the current device mapping situation ReadFile reads data from a file ReadFileEx similar to ReadFile, except that it is only for asynchronous read operations and contains a complete callback RegCloseKey close an entry (or key) in the system registry RegConnectRegistry access to a partial registry of a remote system RegCreateKey create or open an item under the specified key RegCreateKeyEx a more complex way to create a new item under a specified item. This function is recommended in WIN32 environments Regdeletekey Delete a specified subkey below an existing item Regdeletevalue delete a value below the specified item Regenumkey enumerate the subkeys of the specified item. In a WIN32 environment, you should use the RegEnumKeyEx RegEnumKeyEx enumeration to specify the subkeys under the specified item RegEnumValue enumerate the values of the specified items RegFlushKey actually write the changes to the item and its subkeys to disk Reggetke Ysecurity Get security information about a registry key RegLoadKey load registry information from a file previously created with the Regsavekey function regnotifychangekeyvalue a registry key or any of itsWhen a subkey changes, use this function to provide a notification mechanism RegOpenKey open an existing registry key RegOpenKeyEx open an existing item. This function is recommended under Win32 RegQueryInfoKey get information about an item RegQueryValue get the default (unnamed) value of a specified item or subkey RegQueryValueEx get the set value of an item REGREPLA Cekey replaces registry information with information saved by a disk file, and creates a backup containing the current registry information Regrestorekey Restore registry information from a disk file Regsavekey save an item and all its subkeys to a disk file Reg Setkeysecurity sets the security attributes for the specified item RegSetValue setting the default value of the specified item or subkey RegSetValueEx setting the value of the specified item Regunloadkey unload the specified item and all its subkeys RemoveDir Ectory Delete the specified directory SearchPath find the specified file SetCurrentDirectory set the current directory SetEndOfFile for an open file, set the current file location to the end of the file Setfileattribu TES settings file Properties SetFilePointer Set the current read-write location in a file Setfiletime settings file creation, access, and last modified time sethandlecount This function does not have to be used under Win32;    What effect Setvolumelabel set a disk's volume label (label) systemtimetofiletime load a SYSTEMTIME structure based on the contents of a FILETIME structure unlockfile unlock a file Unlockfileex unlocks a file unmapviewoffile a mapping of a file mapping object in the current application's memory address space Verfindfile Use this function to determine where a file should be installed Verinstall File uses this function to install a verlanguagename this function can obtain the name of a language according to the 16-bit language code VerqueryvaLue This function is used to get information from a version resource WriteFile write data to a file WriteFileEx similar to WriteFile, except that it can be used only for asynchronous writes and includes a complete callback writeprivateprofilesec tion sets all item names and values for the subsections specified in an initialization file (. ini) writeprivateprofilestring set a string within the specified subsection of the initialization file writeprofilesection a reference to the Win.ini initialization file Set the subsection sets all item names and values WriteProfileString set a string of 4 in the Win.ini initialization file specified section. API Print function AbortDoc cancels a document's print Abortprinter deletes a buffer file associated with a printer addform adds a new form for the printer's form list addjob used to get a valid pathname so that it can be used as a Industry to create a spool file. It also assigns a job number to the job Addmonitor add a printer monitor to the system AddPort launch the Add Port dialog box, allowing users to add a new port to the list of available ports in the system AddPrinter adding a new printer to the system ADDPR Interconnection connection to the specified printer addprinterdriver add a print driver for the specified system Addprintprocessor add a print processor to the specified system Addprintprovidor as System    Add a print vendor Advanceddocumentproperties Start Printer Document setup dialog box ClosePrinter close an open Printer object configureport A Port Configuration dialog box for the specified port Connecttoprinterdlg Start the Connect Printer dialog box and use it to connect to a printer connected to the network Deleteform remove a form from the list of available forms in the printer deletemonitor delete the specified print monitor Deleteport start Delete Port dialog box, which allows a user to remove a port from the current system deleteprinter the specified printer flag for deletion from the system DeleteprInterconnection Delete a connection to a specified printer deleteprinterdriver remove a printer driver from the system Deleteprintprocessor remove a print processor from the specified system Deleteprintpro    Vidor Remove a print vendor from the system devicecapabilities use this function to obtain information about the capabilities of a device DocumentProperties printer configuration control function Enddocapi end a successful print job Enddocprinter Specifies the end of a document at the level of the spooler endpage use this function to print a page and prepare the device scene to print the next page endpageprinter specify the end of a page in the print job ENUMFO RMS enumerates the forms available for a printer EnumJobs enumerate the jobs in the print queue Enummonitors enumeration of available print monitors enumports enumerate the available ports Enumprinterdrivers enumeration specifies that the system has Installed printer driver EnumPrinters Enumerate the printers installed in the system Enumprintprocessordatatypes enumerate the data types supported by a print processor Enumprintprocessors enumerate the available print places in the system Manager Escape Device control function findcloseprinterchangenotification closes a printer advertisement object obtained with the Findfirstprinterchangenotification function FindFirst    Printerchangenotification Create a new Change notification object so that we pay attention to various changes in printer status Findnextprinterchangenotification Use this function to determine the reason for triggering a printer change notification signal Freeprinternotifyinfo frees a buffer getform allocated by the Findnextprinterchangenotification function to obtain information about the specified form getjob get information about the specified job Printer get information about the specified printer GEtprinterdata Set registry configuration information for the printer getprinterdriver for the specified printer, obtain information about the printer driver getprinterdriverdirectory determine the order in which the printer driver is included in the specified system What's the record? Getprintprocessordirectory the specified system contains the printer processor driver and file directory OpenPrinter open the specified printer and obtain the printer handle Printermessagebox the specified A Printer error message box appears on the system of the print job Printerproperties the Start Printer Properties dialog box to configure the printer Readprinter read data from the printer RESETDC reset a device scene ResetPrinter Change the default data type and document settings for the specified printer Schedulejob commits a job to be printed setabortproc the address of the specified cancellation function for Windows Setform to set information for the specified form setjob the shape of a print job    State control SetPrinter The state of a printer Setprinterdata set the registry configuration information for the printer StartDoc start a print job StartDocPrinter start a new document at the print spooler level StartPage Call this function before printing a new page Startpageprinter specify the start of a new page in a print job WritePrinter write data from the sending directory to printer 5. API text and Font functions addfontresource add a font resource to a Windows system CreateFont create a logical font with the specified property CreateFontIndirect create a logical font with the specified property Cr    Eatescalablefontresource creates a resource file for a turetype font so that it can be added to the Windows system with API functions AddFontResource DrawText text to the specified rectangle Drawtextex is similar to DrawText, just adding more features enumfontfamilies columnsTo specify the fonts available for the specified device Enumfontfamiliesex enumerates the fonts available for the specified device enumfonts enumerates the fonts available for the specified device ExtTextOut the expanded text-mapping function.    Also refer to the SetTextAlign function Getaspectratiofilterex use SetMapperFlags to require Windows to select only raster fonts that match the current aspect ratio of the device, this function can determine the aspect ratio size Getcharabcwidths to determine the a-b-c size of one or more characters in a Turetype font getcharabcwidthsfloat query the a-b-c dimensions of one or more characters in a font getcharacterplacement the letter Number is used to learn how to display a string with a given character Getcharwidth survey the width of one or more characters in a font getfontdata receive a data that is a scalable font file GetFontLanguageInfo Returns the word currently selected in the specified device scene The information of the getglyphoutline gets the curve information of the Turetype font which makes up a character getkerningpairs gets the character information of the specified font getoutlinetextmetrics receive and Turetype font internal characteristics have The details of the Getrasterizercaps understand whether the system has the ability to support scalable fonts Gettabbedtextextent determine the range of a string occupy, and consider the factors that allow the tab station to expand Gettextalign receive a device scene the current text This alignment flag Gettextcharacterextra the current value of the extra character spacing Gettextcharset receive the character set identifier of the font currently selected for the specified device scene gettextcharsetinfo Get details about the character set of the currently selected font Fine information GetTextColor determines the current font color. Usually also called the "foreground color" Gettextextentexpoint determines the number of characters to fill in the specified range.    The range information of each character is also loaded with an array gettextextentpoint judge the size (range) of a string gettextface get the typeface name of a font
Related Article

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.