Answered by:
API Programming and functions. - Part III

Question
-
Hey guys, the Part-II Grew too much. So we have this Part-III
This thread is the continuation of
API Programming and functions. - Part IIThursday, June 14, 2007 6:42 AM
Answers
-
ileTimeToSystemTime
The FileTimeToSystemTime function converts a 64-bit file time to system time format.
VB4-32,5,6
Declare Function FileTimeToSystemTime Lib "kernel32" Alias "FileTimeToSystemTime" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · lpFileTime
Pointer to a FILETIME structure containing the file time to convert to system date and time format.
The FileTimeToSystemTime function only works with FILETIME values that are less than 0x8000000000000000. The function fails with values equal to or greater than that.
· lpSystemTime
Pointer to a SYSTEMTIME structure to receive the converted file time.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 6:46 AM
All replies
-
ileTimeToSystemTime
The FileTimeToSystemTime function converts a 64-bit file time to system time format.
VB4-32,5,6
Declare Function FileTimeToSystemTime Lib "kernel32" Alias "FileTimeToSystemTime" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · lpFileTime
Pointer to a FILETIME structure containing the file time to convert to system date and time format.
The FileTimeToSystemTime function only works with FILETIME values that are less than 0x8000000000000000. The function fails with values equal to or greater than that.
· lpSystemTime
Pointer to a SYSTEMTIME structure to receive the converted file time.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 6:46 AM -
FileTimeToLocalFileTime
The FileTimeToLocalFileTime function converts a file time based on the Coordinated Universal Time (UTC) to a local file time.
VB4-32,5,6
Declare Function FileTimeToLocalFileTime Lib "kernel32" Alias "FileTimeToLocalFileTime" (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · lpFileTime
Points to a FILETIME structure containing the UTC-based file time to be converted into a local file time.
· lpLocalFileTime
Points to a FILETIME structure to receive the converted local file time. This parameter cannot be the same as the lpFileTime parameter.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 6:46 AM -
fCreateShellLink
The fCreateShellLink creates a shell link
VB4-32,5,6
Declare Function fCreateShellLink Lib "VB5STKIT.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
Operating Systems Supported Visual Basic Runtimes
Library Vb5stkit
Parameter Information · lpstrFolderName
folder where to create the link
· lpstrLinkName
text caption for the link
· lpstrLinkPath
full path to the target of the link
· lpstrLinkArguments
command-line arguments for the link
Return Values Thursday, June 14, 2007 6:47 AM -
FatalExit
The FatalExit function transfers execution control to the debugger. The behavior of the debugger thereafter is specific to the type of debugger used.
VB4-32,5,6
Declare Sub FatalExit Lib "kernel32" Alias "FatalExit" (ByVal code As Long)
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · ExitCode
Specifies the error code associated with the exit.
Return Values Thursday, June 14, 2007 6:47 AM -
FatalAppExit
The FatalAppExit function displays a message box and terminates the application when the message box is closed.
VB4-32,5,6
Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (ByVal uAction As Long, ByVal lpMessageText As String)
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · uAction
Reserved; must be zero.
· lpMessageText
Points to a null-terminated string that is displayed in the message box. The message is displayed on a single line. To accommodate low-resolution screens, the string should be no more than 35 characters in length.
Return Values Thursday, June 14, 2007 6:47 AM -
FillMemory
The FillMemory function fills a block of memory with a specified value.
VB4-32,5,6
Declare Sub FillMemory Lib "kernel32.dll" Alias "RtlFillMemory" (Destination As Any, ByVal Length As Long, ByVal Fill As Byte)
VB.NET
N/A
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · Destination
Points to the starting address of the block of memory to fill.
· Length
Specifies the size, in bytes, of the block of memory to fill.
· Fill
Specifies the byte value with which to fill the memory block.
Return Values Thursday, June 14, 2007 4:12 PM -
FillPath
The FillPath function closes any open figures in the current path and fills the path’s interior by using the current brush and polygon-filling mode.
VB4-32,5,6
Declare Function FillPath Lib "gdi32" Alias "FillPath" (ByVal hdc As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies a device context (DC) that contains a valid path.
Return Values Thursday, June 14, 2007 4:13 PM -
FillRect
The FillRect function fills a rectangle by using the specified brush. This function includes the left and top borders, but excludes the right and bottom borders of the rectangle.
VB4-32,5,6
Declare Function FillRect Lib "user32" Alias "FillRect" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
VB.NET
System.Drawing.Graphics.FillRectangle
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · hDC
Identifies the device context.
· lprc
Points to a RECT structure that contains the logical coordinates of the rectangle to be filled.
· hbr
Identifies the brush used to fill the rectangle.
Return Values
If the function fails, the return value is FALSE. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:13 PM -
FillRgn
The FillRgn function fills a region by using the specified brush.
VB4-32,5,6
Declare Function FillRgn Lib "gdi32" Alias "FillRgn" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
VB.NET
System.Drawing.Region
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· hrgn
Identifies the region to be filled. The region’s coordinates are presumed to be in logical units.
· hbr
Identifies the brush to be used to fill the region.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:13 PM -
FindCloseChangeNotification
The FindCloseChangeNotification function stops change notification handle monitoring.
VB4-32,5,6
Declare Function FindCloseChangeNotification Lib "kernel32" (ByVal hChangeHandle As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hChangeHandle
[in] Handle to a change notification handle created by the FindFirstChangeNotification function.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:13 PM -
FindCloseUrlCache
Closes the specified cache enumeration handle.
VB4-32,5,6
Declare Sub FindCloseUrlCache Lib "wininet.dll" (ByVal hEnumHandle As Long)
Operating Systems Supported Requires Internet Explorer 3.0
Library Wininet
Parameter Information · hEnumHandle
[in] Handle returned by a previous call to the FindFirstUrlCacheEntry function.
Return Values Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError. Thursday, June 14, 2007 4:14 PM -
FindExecutable
The FindExecutable function retrieves the name and handle to the executable (.EXE) file associated with the specified filename.
VB4-32,5,6
Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Shell32
Parameter Information · lpFile
Pointer to a null-terminated string specifying a filename. This can be a document or executable file.
· lpDirectory
Pointer to a null-terminated string specifying the default directory.
· lpResult
Pointer to a buffer to receive the filename when the function returns. This filename is a null-terminated string specifying the executable file started when an “open” association is run on the file specified in the lpFile parameter.
Return Values Thursday, June 14, 2007 4:14 PM -
FindFirstChangeNotification
The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree.
VB4-32,5,6
Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (ByVal lpPathName As String, ByVal bWatchSubtree As Long, ByVal dwNotifyFilter As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · lpPathName
[in] Pointer to a null-terminated string that specifies the path of the directory to watch.
Windows NT/2000: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see File Name Conventions.
Windows 95/98: This string must not exceed MAX_PATH characters.
· bWatchSubtree
[in] Specifies whether the function will monitor the directory or the directory tree. If this parameter is TRUE, the function monitors the directory tree rooted at the specified directory; if it is FALSE, it monitors only the specified directory.
· dwNotifyFilter
[in] Specifies the filter conditions that satisfy a change notification wait. This parameter can be one or more of the following values. Value Meaning
FILE_NOTIFY_CHANGE_FILE_NAME Any file name change in the watched directory or subtree causes a change notification wait operation to return. Changes include renaming, creating, or deleting a file name.
FILE_NOTIFY_CHANGE_DIR_NAME Any directory-name change in the watched directory or subtree causes a change notification wait operation to return. Changes include creating or deleting a directory.
FILE_NOTIFY_CHANGE_ATTRIBUTES Any attribute change in the watched directory or subtree causes a change notification wait operation to return.
FILE_NOTIFY_CHANGE_SIZE Any file-size change in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change in file size only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.
FILE_NOTIFY_CHANGE_LAST_WRITE Any change to the last write-time of files in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change to the last write-time only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.
FILE_NOTIFY_CHANGE_SECURITY Any security-descriptor change in the watched directory or subtree causes a change notification wait operation to return.
Return Values
If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:14 PM -
FindFirstFile
The FindFirstFile function searches a directory for a file whose name matches the specified filename. FindFirstFile examines subdirectory names as well as filenames.
VB4-32,5,6
Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
VB.NET
System.IO.DirectoryInfo.GetFiles
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · lpFileName
Windows 95: Points to a null-terminated string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?). This string must not exceed MAX_PATH characters.
Windows NT: Points to a null-terminated string that specifies a valid directory or path and filename, which can contain wildcard characters (* and ?).
There is a default string size limit for paths of MAX_PATH characters. This limit is related to how the FindFirstFile function parses paths. An application can transcend this limit and send in paths longer than MAX_PATH characters by calling the wide (W) version of FindFirstFile and prepending “\\?\” to the path. The “\\?\” tells the function to turn off path parsing; it lets paths longer than MAX_PATH be used with FindFirstFileW. This also works with UNC names. The “\\?\” is ignored as part of the path. For example, “\\?\C:\myworld\private” is seen as “C:\myworld\private”, and “\\?\UNC\bill_g_1\hotstuff\coolapps” is seen as “\\bill_g_1\hotstuff\coolapps”.
· lpFindFileData
Points to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory. The structure can be used in subsequent calls to the FindNextFile or FindClose function to refer to the file or subdirectory.
Return Values The FindFirstFile function opens a search handle and returns information about the first file whose name matches the specified pattern. Once the search handle is established, you can use the FindNextFile function to search for other files that match the same pattern. When the search handle is no longer needed, close it by using the FindClose function.
This function searches for files by name only; it cannot be used for attribute-based searches.Thursday, June 14, 2007 4:14 PM -
FlashWindowEx
The FlashWindowEx function flashes the specified window. Using this function, you can specify the number of times the system will flash the window, whereas the FlashWindow function flashes the window only once.
VB4-32,5,6
Declare Function FlashWindowEx Lib "user32" (pfwi As FLASHWINFO) As Boolean
Operating Systems Supported Requires Windows 2000 or later; Requires Windows 98 or later
Library User32
Parameter Information · pfwi
[in] Pointer to the FLASHWINFO structure.
Return Values The return value specifies the window's state before the call to the FlashWindowEx function. If the window caption was drawn as active before the call, the return value is nonzero. Otherwise, the return value is zero. Thursday, June 14, 2007 4:16 PM -
FlashWindow
The FlashWindow function flashes the specified window once.
VB4-32,5,6
Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · hWnd
Identifies the window to be flashed. The window can be either open or minimized (iconic).
· bInvert
Specifies whether the window is to be flashed or returned to its original state. The window is flashed from one state to the other if this parameter is TRUE. If it is FALSE, the window is returned to its original state (either active or inactive). When an application is iconic, if this parameter is TRUE, the taskbar window button flashes active/inactive. If it is FALSE, the taskbar window button flashes inactive, meaning that it does not change colors. It flashes, as if it were being redraw, but it does not provide the visual invert clue to the user.
Return Values
If the window was not active before the call, the return value is zero.Thursday, June 14, 2007 4:16 PM -
FindWindowEx
The FindWindowEx function retrieves the handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the given child window.
VB4-32,5,6
Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library User32
Parameter Information · hwndParent
Identifies the parent window whose child windows are to be searched.
If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop.
· hwndChildAfter
Identifies a child window. The search begins with the next child window in the Z order. hwndChildAfter must be a direct child window of hwndParent, not just a descendant window.
If hwndChildAfter is NULL, the search begins with the first child window of hwndParent.
Note that if both hwndParent and hwndChildAfter are NULL, the function searches all top-level windows.
· lpszClass
Points to a null-terminated string that specifies the class name or is an atom that identifies the class-name string. If this parameter is an atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpszClass; the high-order word must be zero.
· lpszWindow
Points to a null-terminated string that specifies the window name (the window’s title). If this parameter is NULL, all window names match.
Return Values
If the function fails, the return value is NULL. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:17 PM -
FindWindow
The FindWindow function retrieves the handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows.
VB4-32,5,6
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · lpClassName
Points to a null-terminated string that specifies the class name or is an atom that identifies the class-name string. If this parameter is an atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpClassName; the high-order word must be zero.
· lpWindowName
Points to a null-terminated string that specifies the window name (the window’s title). If this parameter is NULL, all window names match.
Return Values
If the function fails, the return value is NULL. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:17 PM -
FindNextUrlCacheEntry
Retrieves the next entry in the Internet cache.
VB4-32,5,6
Declare Function FindNextUrlCacheEntry Lib "wininet.dll" Alias "FindNextUrlCacheEntryA" (ByVal hEnumHandle As Long, ByVal lpNextCacheEntryInfo As Long, ByRef lpdwNextCacheEntryInfoBufferSize As Long) As Long
Operating Systems Supported Requires Internet Explorer 3.0
Library Wininet
Parameter Information · hEnumHandle
[in] Enumeration handle obtained from a previous call to FindFirstUrlCacheEntry.
· lpNextCacheEntryInfo
[out] Pointer to an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.
· lpdwNextCacheEntryInfoBufferSize
[in, out] Pointer to an unsigned long integer variable that specifies the size of the lpNextCacheEntryInfo buffer, in TCHARs. When the function returns, the variable contains the number of TCHARs copied to the buffer, or the size of the buffer (in bytes) required to retrieve the cache entry.
Return Values
ERROR_INSUFFICIENT_BUFFER
The size of lpNextCacheEntryInfo as specified by lpdwNextCacheEntryInfoBufferSize is not sufficient to contain all the information. The value returned in lpdwNextCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.
ERROR_NO_MORE_ITEMS
The enumeration completed.Thursday, June 14, 2007 4:17 PM -
FindNextFile
The FindNextFile function continues a file search from a previous call to the FindFirstFile function.
VB4-32,5,6
Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
VB.NET
System.IO.DirectoryInfo.GetFiles
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hFindFile
Identifies a search handle returned by a previous call to the FindFirstFile function.
· lpFindFileData
Points to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory. The structure can be used in subsequent calls to FindNextFile to refer to the found file or directory.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError. If no matching files can be found, the GetLastError function returns ERROR_NO_MORE_FILES.Thursday, June 14, 2007 4:17 PM -
FindNextChangeNotification
The FindNextChangeNotification function requests that the operating system signal a change notification handle the next time it detects an appropriate change.
VB4-32,5,6
Declare Function FindNextChangeNotification Lib "kernel32" (ByVal hChangeHandle As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hChangeHandle
[in] Handle to a change notification handle created by the FindFirstChangeNotification function.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:17 PM -
FindFirstUrlCacheEntry
Begins the enumeration of the Internet cache.
VB4-32,5,6
Declare Function FindFirstUrlCacheEntry Lib "wininet.dll" Alias "FindFirstUrlCacheEntryA" (ByVal lpszUrlSearchPattern As String, ByVal lpFirstCacheEntryInfo As Long, ByRef lpdwFirstCacheEntryInfoBufferSize As Long) As Long
Operating Systems Supported Requires Internet Explorer 3.0
Library Wininet
Parameter Information · lpszUrlSearchPattern
[in] Pointer to a string that contains the source name pattern to search for. This can be set to "cookie:" or "visited:" to enumerate the cookies and URL History entries in the cache. If this parameter is NULL, the function uses *.*.
· lpFirstCacheEntryInfo
[out] Pointer to an INTERNET_CACHE_ENTRY_INFO structure.
· lpdwFirstCacheEntryInfoBufferSize
[in, out] Pointer to an unsigned long integer variable that specifies the size of the lpFirstCacheEntryInfo buffer, in TCHARs. When the function returns, the variable contains the number of TCHARs copied to the buffer, or the required size, in bytes, needed to retrieve the cache entry.
Return Values
ERROR_INSUFFICIENT_BUFFER indicates that the size of lpFirstCacheEntryInfo as specified by lpdwFirstCacheEntryInfoBufferSize is not sufficient to contain all the information. The value returned in lpdwFirstCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.Thursday, June 14, 2007 4:17 PM -
FlatSB_ShowScrollBar
Shows or hides a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard ShowScrollBar API.
VB4-32,5,6
Declare Function FlatSB_ShowScrollBar Lib "comctl32" (ByVal hWnd As Long, ByVal code As Long, ByVal fShow As Boolean) As Boolean
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· code
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_BOTH
Shows or hides the horizontal and vertical scroll bars.
SB_HORZ
Shows or hides the horizontal scroll bar.
SB_VERT
Shows or hides the vertical scroll bar.
· fShow
Parameter that specifies whether the scroll bar should be shown or hidden. If this parameter is nonzero, the scroll bar will be shown; if it is zero, the scroll bar will be hidden.Thursday, June 14, 2007 4:18 PM -
FlatSB_SetScrollRange
Sets the scroll range of a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard SetScrollRange API.
VB4-32,5,6
Declare Function FlatSB_SetScrollRange Lib "comctl32" (ByVal hWnd As Long, ByVal code As Long, ByVal nMinPos As Long, ByVal nMaxPos As Long, ByVal fRedraw As Boolean) As Long
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· code
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_HORZ
Sets the scroll range of the horizontal scroll bar.
SB_VERT
Sets the scroll range of the vertical scroll bar.
· nMinPos
Parameter that specifies the new minimum scroll range value.
· nMaxPos
Parameter that specifies the new maximum scroll range value.
· fRedraw
Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is not redrawn.
Return Values Thursday, June 14, 2007 4:19 PM -
FlatSB_SetScrollProp
Sets the properties for a flat scroll bar.
VB4-32,5,6
Declare Function FlatSB_SetScrollProp Lib "comctl32" (ByVal hWnd As Long, ByVal index As Long, ByVal newValue As Long, ByVal fRedraw As Boolean) As Boolean
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· index
Parameter that determines what newValue represents and which property is being set. This parameter can be one of the following values: WSB_PROP_CXHSCROLL newValue is an INT value that represents the width, in pixels, of the direction buttons in a horizontal scroll bar.
WSB_PROP_CXHTHUMB
newValue is an INT value that represents the width, in pixels, of the thumb in a horizontal scroll bar.
WSB_PROP_CXVSCROLL
newValue is an INT value that represents the width, in pixels, of the vertical scroll bar.
WSB_PROP_CYHSCROLL
newValue is an INT value that represents the height, in pixels, of the horizontal scroll bar.
WSB_PROP_CYVSCROLL
newValue is an INT value that represents the height, in pixels, of the direction buttons in a vertical scroll bar.
WSB_PROP_CYVTHUMB
newValue is an INT value that represents the height, in pixels, of the thumb in a vertical scroll bar.
WSB_PROP_HBKGCOLOR
newValue is a COLORREF value that represents the background color in a horizontal scroll bar.
WSB_PROP_HSTYLE
newValue is one of the following values that changes the visual effects for the horizontal scroll bar.
FSB_ENCARTA_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in 3-D.
FSB_FLAT_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in inverted colors.
FSB_REGULAR_MODE
A normal, nonflat scroll bar is displayed. No special visual effects will be applied.
WSB_PROP_PALETTE
newValue is an HPALETTE value that represents the new palette that the scroll bar should use when drawing.
WSB_PROP_VBKGCOLOR
newValue is a COLORREF value that represents the background color in a vertical scroll bar.
WSB_PROP_VSTYLE
newValue is one of the following values that changes the visual effects for the vertical scroll bar:
FSB_ENCARTA_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in 3-D.
FSB_FLAT_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in inverted colors.
FSB_REGULAR_MODE
A normal, nonflat scroll bar is displayed. No special visual effects will be applied.
· newValue
New value to set. This parameter depends on the flag passed in index.
· fRedraw
Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is not redrawn.
Return Values Thursday, June 14, 2007 4:19 PM -
FlatSB_SetScrollPos
Sets the current position of the thumb in a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard SetScrollPos API.
VB4-32,5,6
Declare Function FlatSB_SetScrollPos Lib "comctl32" (ByVal hWnd As Long, ByVal code As Long, ByVal nPos As Long, ByVal fRedraw As Boolean) As Long
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· code
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_HORZ
Sets the thumb position of the horizontal scroll bar.
SB_VERT
Sets the thumb position of the vertical scroll bar.
· nPos
Parameter that specifies the new thumb position.
· fRedraw
Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is not redrawn.
Return Values Thursday, June 14, 2007 4:19 PM -
FlatSB_SetScrollInfo
Sets the information for a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard SetScrollInfo API.
VB4-32,5,6
Declare Function FlatSB_SetScrollInfo Lib "comctl32" (ByVal hWnd As Long, ByVal fnBar As Long, lpsi As SCROLLINFO, ByVal fRedraw As Boolean) As Long
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· fnBar
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_HORZ
Sets the information for the horizontal scroll bar.
SB_VERT
Sets the information for the vertical scroll bar.
· lpsi
Address of a SCROLLINFO structure that contains the new information for the specified scroll bar. The cbSize and fMask members of the structure must be filled in prior to calling FlatSB_SetScrollInfo. The fMask member specifies which members of the structure contain valid information and can be any combination of the following values: SIF_DISABLENOSCROLL Disables the scroll bar if the new information would cause the scroll bar to be removed.
SIF_PAGE
Sets the page information for the flat scroll bar. The nPage member of the SCROLLINFO structure must contain the new page value.
SIF_POS
Sets the position information for the flat scroll bar. The nPos member of the SCROLLINFO structure must contain the new position value.
SIF_RANGE
Sets the range information for the flat scroll bar. The nMin and nMax members of the SCROLLINFO structure must contain the new range values.
SIF_ALL
A combination of SIF_PAGE, SIF_POS, and SIF_RANGE.
· fRedraw
Parameter that specifies whether the scroll bar should be redrawn immediately to reflect the change. If this parameter is TRUE, the scroll bar is redrawn; if it is FALSE, the scroll bar is not redrawn.
Return Values Thursday, June 14, 2007 4:19 PM -
FlatSB_GetScrollRange
Retrieves the scroll range for a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard GetScrollRange API.
VB4-32,5,6
Declare Function FlatSB_GetScrollRange Lib "comctl32" (ByVal hWnd As Long, ByVal code As Long, lpMinPos As Long, lpMaxPos As Long) As Boolean
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· code
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_HORZ
Retrieves the scroll range of the horizontal scroll bar.
SB_VERT
Retrieves the scroll range of the vertical scroll bar.
· lpMinPos
Address of an INT value that receives the minimum scroll range value.
· lpMaxPos
Address of an INT value that receives the maximum scroll range value.
Return Values Thursday, June 14, 2007 4:19 PM -
FlatSB_GetScrollProp
Retrieves the properties for a flat scroll bar. This function can also be used to determine if InitializeFlatSB has been called for this window.
VB4-32,5,6
Declare Function FlatSB_GetScrollProp Lib "comctl32" (ByVal hWnd As Long, ByVal index As Long, pValue As Long) As Boolean
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· index
Parameter that determines what pValue represents and which property is being retrieved. It can be one of the following values: WSB_PROP_CXHSCROLL pValue is an address of an INT value that receives the width, in pixels, of the direction buttons in a horizontal scroll bar.
WSB_PROP_CXHTHUMB
pValue is an address of an INT value that receives the width, in pixels, of the thumb in a horizontal scroll bar.
WSB_PROP_CXVSCROLL
pValue is an address of an INT value that receives the width, in pixels, of a vertical scroll bar.
WSB_PROP_CYHSCROLL
pValue is an address of an INT value that receives the height, in pixels, of a horizontal scroll bar.
WSB_PROP_CYVSCROLL
pValue is an address of an INT value that receives the height, in pixels, of the direction buttons in a vertical scroll bar.
WSB_PROP_CYVTHUMB
pValue is an address of an INT value that receives the height, in pixels, of the thumb in a vertical scroll bar.
WSB_PROP_HBKGCOLOR
pValue is an address of a COLORREF value that receives the background color in a horizontal scroll bar.
WSB_PROP_HSTYLE
pValue is an address of an INT value that receives one of the following visual effects for the horizontal scroll bar.
FSB_ENCARTA_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in 3-D.
FSB_FLAT_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in inverted colors.
FSB_REGULAR_MODE
A normal, nonflat scroll bar is displayed. No special visual effects are applied.
WSB_PROP_PALETTE
pValue is an address of an HPALETTE value that receives the palette that a scroll bar uses when drawing.
WSB_PROP_VBKGCOLOR
pValue is an address of a COLORREF value that receives the background color in a vertical scroll bar.
WSB_PROP_VSTYLE
pValue is an address of an INT value that receives one of the following visual effects for the vertical scroll bar.
FSB_ENCARTA_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in 3-D.
FSB_FLAT_MODE
A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar is displayed in inverted colors.
FSB_REGULAR_MODE
A normal, nonflat scroll bar is displayed. No special visual effects are applied.
WSB_PROP_WINSTYLE
pValue is an address of an INT value that receives the WS_HSCROLL and WS_VSCROLL style bits contained by the current window.
· pValue
Address that receives the requested data. This parameter depends on the flag passed in index.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:19 PM -
FlatSB_GetScrollPos
Retrieves the thumb position in a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard GetScrollPos API.
VB4-32,5,6
Declare Function FlatSB_GetScrollPos Lib "comctl32" (ByVal hWnd As Long, ByVal code As Long) As Long
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· code
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_HORZ
Retrieves the thumb position of the horizontal scroll bar.
SB_VERT
Retrieves the thumb position of the vertical scroll bar.
*** END ***GetNumberFormat
· Locale
Specifies the locale for which the number string is to be formatted. If lpFormat is NULL, the function formats the string according to the number format for this locale. If lpFormat is not NULL, the function uses the locale only for formatting information not specified in the NUMBERFMT structure (for example, the locale’s string value for the negative sign).
This parameter can be a locale identifier created by the MAKELCID macro, or one of the following predefined values: LOCALE_SYSTEM_DEFAULT
Default system locale.
LOCALE_USER_DEFAULT
Default user locale.
· dwFlags
Contains a bit flag that controls the operation of the function. If lpFormat is non-NULL, this parameter must be zero.
If lpFormat is NULL, you can specify the LOCALE_NOUSEROVERRIDE flag to format the string using the system default number format for the specified locale; or you can specify zero to format the string using any user overrides to the locale’s default number format
· lpValue
Points to a null-terminated string containing the number string to format.
This string can only contain the following characters:
· Characters ‘0’ through ‘9’
· One decimal point (dot) if the number is a floating-point value
· A minus sign in the first character position if the number is a negative value
All other characters are invalid. The function returns an error if the string pointed to by lpValue deviates from these rules.
· lpFormat
Pointer to a NUMBERFMT structure that contains number formatting information. All members in the structure pointed to by lpFormat must contain appropriate values.
If lpFormat is NULL, the function uses the number format of the specified locale.
· lpNumberStr
Points to a buffer to receive the formatted number string.
· cchNumber
Specifies the size, in bytes (ANSI version) or characters (Unicode version), of the lpNumberStr buffer. If cchNumber is zero, the function returns the number of bytes or characters required to hold the formatted number string, and the buffer pointed to by lpNumberStr is not used.
Return Values Thursday, June 14, 2007 4:20 PM -
FlatSB_GetScrollInfo
Retrieves the information for a flat scroll bar. If flat scroll bars are not initialized for the window, this function calls the standard GetScrollInfo API.
VB4-32,5,6
Declare Function FlatSB_GetScrollInfo Lib "comctl32" (ByVal hWnd As Long, ByVal fnBar As Long, lpsi As SCROLLINFO) As Boolean
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· fnBar
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_HORZ
Retrieves the information for the horizontal scroll bar.
SB_VERT
Retrieves the information for the vertical scroll bar.
· lpsi
Address of a SCROLLINFO structure that will receive the information for the specified scroll bar. The cbSize and fMask members of the structure must be filled out prior to calling FlatSB_GetScrollInfo. The fMask member specifies which properties should be retrieved and can be any combination of the following values: SIF_PAGE Retrieves the page information for the flat scroll bar. This will be placed in the nPage member of the SCROLLINFO structure.
SIF_POS
Retrieves the position information for the flat scroll bar. This will be placed in the nPos member of the SCROLLINFO structure.
SIF_RANGE
Retrieves the range information for the flat scroll bar. This will be placed in the nMin and nMax members of the SCROLLINFO structure.
SIF_ALL
A combination of SIF_PAGE, SIF_POS, and SIF_RANGE.
Return Values Returns nonzero if successful, or zero otherwise. Thursday, June 14, 2007 4:20 PM -
FlatSB_EnableScrollBar
Enables or disables one or both flat scroll bar direction buttons. If flat scroll bars are not initialized for the window, this function calls the standard EnableScrollBar API.
VB4-32,5,6
Declare Function FlatSB_EnableScrollBar Lib "comctl32" (ByVal hWnd As Long, ByVal wSBflags As Long, ByVal wArrows As Long) As Long
Operating Systems Supported Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Comctl32
Parameter Information · hwnd
Handle to the window that contains the flat scroll bar. This window handle must have been passed previously in a call to InitializeFlatSB.
· wSBflags
Parameter that specifies the scroll bar type. It can be one of the following values:
SB_BOTH
Enables or disables the direction buttons on the horizontal and vertical scroll bars.
SB_HORZ
Enables or disables the direction buttons on the horizontal scroll bar.
SB_VERT
Enables or disables the direction buttons on the vertical scroll bar.
· wArrows
Parameter that specifies whether the scroll bar arrows are enabled or disabled and indicates which arrows are enabled or disabled. It can be one of the following values: ESB_DISABLE_BOTH Disables both direction buttons on the specified scroll bar.
ESB_DISABLE_DOWN
Disables the down direction button on the vertical scroll bar.
ESB_DISABLE_LEFT
Disables the left direction button on the horizontal scroll bar.
ESB_DISABLE_LTUP
Disables the left direction button on the horizontal scroll bar or the up direction button on the vertical scroll bar.
ESB_DISABLE_RIGHT
Disables the right direction button on the horizontal scroll bar.
ESB_DISABLE_RTDN
Disables the right direction button on the horizontal scroll bar or the down direction button on the vertical scroll bar.
ESB_DISABLE_UP
Disables the up direction button on the vertical scroll bar.
ESB_ENABLE_BOTH
Enables both direction buttons on the specified scroll bar.
Return Values Thursday, June 14, 2007 4:20 PM -
FtpSetCurrentDirectory
Changes to a different working directory on the FTP server.
VB4-32,5,6
Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid HINTERNET handle to an FTP session.
· lpszDirectory
[in] Address of a null-terminated string that contains the name of the directory to change to on the remote system. This can be either a fully qualified path or a name relative to the current directory.
Return Values Thursday, June 14, 2007 4:21 PM -
FtpRenameFile
Renames a file stored on the FTP server.
VB4-32,5,6
Declare Function FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA" (ByVal hFtpSession As Long, ByVal lpszExisting As String, ByVal lpszNew As String) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid HINTERNET handle to an FTP session.
· lpszExisting
[in] Address of a null-terminated string that contains the name of the file that will have its name changed on the remote FTP server.
· lpszNew
[in] Address of a null-terminated string that contains the new name for the remote file.
Return Values Thursday, June 14, 2007 4:22 PM -
FtpRemoveDirectory
Removes the specified directory on the FTP server.
VB4-32,5,6
Declare Function FtpRemoveDirectory Lib "wininet.dll" Alias "FtpRemoveDirectoryA" (ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid HINTERNET handle to an FTP session.
· lpszDirectory
[in] Address of a null-terminated string that contains the name of the directory to remove on the remote system. This can be either a fully qualified path or a name relative to the current directory.
Return Values Thursday, June 14, 2007 4:22 PM -
FtpPutFile
Stores a file on the FTP server.
VB4-32,5,6
Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hConnect As Long, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid HINTERNET handle to an FTP session.
· lpszLocalFile
[in] Address of a null-terminated string that contains the name of the file to send from the local system.
· lpszNewRemoteFile
[in] Address of a null-terminated string that contains the name of the file to create on the remote system.
· dwFlags
[in] Unsigned long integer value that contains the conditions under which the transfers occur. The application should select one transfer type and any of the flags that control how the caching of the file will be controlled.
The transfer type can be any one of the following values:
FTP_TRANSFER_TYPE_ASCII
Transfers the file using FTP's ASCII (Type A) transfer method. Control and formatting information is converted to local equivalents.
FTP_TRANSFER_TYPE_BINARY
Transfers the file using FTP's Image (Type I) transfer method. The file is transferred exactly as it exists with no changes. This is the default transfer method.
FTP_TRANSFER_TYPE_UNKNOWN
Defaults to FTP_TRANSFER_TYPE_BINARY.
INTERNET_FLAG_TRANSFER_ASCII
Transfers the file as ASCII.
INTERNET_FLAG_TRANSFER_BINARY
Transfers the file as binary.
The following values are used to control the caching of the file. The application can use one or more of the following values:
INTERNET_FLAG_HYPERLINK
Forces a reload if there was no Expires time and no LastModified time returned from the server when determining whether to reload the item from the network.
INTERNET_FLAG_NEED_FILE
Causes a temporary file to be created if the file cannot be cached.
INTERNET_FLAG_RELOAD
Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
INTERNET_FLAG_RESYNCHRONIZE
Reloads HTTP resources if the resource has been modified since the last time it was downloaded. All FTP and Gopher resources are reloaded.
· dwContext
[in] Address of an unsigned long integer value that contains the application-defined value that associates this search with any application data. This parameter is used only if the application has already called InternetSetStatusCallback to set up a status callback.
Return Values Thursday, June 14, 2007 4:22 PM -
FtpGetFile
Retrieves a file from the FTP server and stores it under the specified file name, creating a new local file in the process.
VB4-32,5,6
Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (ByVal hConnect As Long, ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal fFailIfExists As Long, ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, ByRef dwContext As Long) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid handle to an FTP session.
· lpszRemoteFile
[in] Address of a null-terminated string that contains the name of the file to retrieve from the remote system.
· lpszNewFile
[in] Address of a null-terminated string that contains the name of the file to create on the local system.
· fFailIfExists
[in] BOOL that indicates whether the function should proceed if a local file of the specified name already exists. If fFailIfExists is TRUE and the local file exists, FtpGetFile fails.
· dwFlagsAndAttributes
[in] Unsigned long integer value that contains the file attributes for the new file. This can be any combination of the FILE_ATTRIBUTE_* flags used by the CreateFile function. For more information on FILE_ATTRIBUTE_* attributes, see CreateFile in the Platform SDK.
· dwFlags
[in] Unsigned long integer value that contains the flags that control how the function will handle the file download. The first set of flag values indicates the conditions under which the transfer occurs. These transfer type flags can be used in combination with the second set of flags that control caching.
The application can select one of these transfer type values:
FTP_TRANSFER_TYPE_ASCII
Transfers the file using FTP's ASCII (Type A) transfer method. Control and formatting information is converted to local equivalents.
FTP_TRANSFER_TYPE_BINARY
Transfers the file using FTP's Image (Type I) transfer method. The file is transferred exactly as it exists with no changes. This is the default transfer method.
FTP_TRANSFER_TYPE_UNKNOWN
Defaults to FTP_TRANSFER_TYPE_BINARY.
INTERNET_FLAG_TRANSFER_ASCII
Transfers the file as ASCII.
INTERNET_FLAG_TRANSFER_BINARY
Transfers the file as binary.
The following flags determine how the caching of this file will be done. Any combination of the following flags can be used with the transfer type flag. The possible values are:
INTERNET_FLAG_HYPERLINK
Forces a reload if there was no Expires time and no LastModified time returned from the server when determining whether to reload the item from the network.
INTERNET_FLAG_NEED_FILE
Causes a temporary file to be created if the file cannot be cached.
INTERNET_FLAG_RELOAD
Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
INTERNET_FLAG_RESYNCHRONIZE
Reloads HTTP resources if the resource has been modified since the last time it was downloaded. All FTP and Gopher resources are reloaded.
· dwContext
[in] Address of an unsigned long integer value that contains the application-defined value that associates this search with any application data. This is used only if the application has already called InternetSetStatusCallback to set up a status callback function.
Return Values Thursday, June 14, 2007 4:22 PM -
FtpGetCurrentDirectory
Retrieves the current directory for the specified FTP session.
VB4-32,5,6
Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias "FtpGetCurrentDirectoryA" (ByVal hFtpSession As Long, ByVal lpszCurrentDirectory As String, lpdwCurrentDirectory As Long) As Long
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid handle to an FTP session.
· lpszCurrentDirectory
[out] Address of a buffer that receives the current directory string, which specifies the absolute path to the current directory. The string is null-terminated.
· lpdwCurrentDirectory
[in, out] Address of a variable that specifies the length, in characters, of the buffer for the current directory string. The buffer length must include room for a terminating NULL character. Using a length of MAX_PATH is sufficient for all paths. When the function returns, the variable receives the number of characters copied into the buffer.
Return Values Returns TRUE if successful, or FALSE otherwise. To get the specific error code, call GetLastError. If the error code indicates that the FTP server denied the request to change to a directory, use InternetGetLastResponseInfo to determine why. Thursday, June 14, 2007 4:22 PM -
FtpFindFirstFile
Searches the specified directory of the given FTP session. File and directory entries are returned to the application in the WIN32_FIND_DATA structure.
VB4-32,5,6
Declare Function FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA" (ByVal hFtpSession As Long, ByVal lpszSearchFile As String, lpFindFileData As WIN32_FIND_DATA, ByVal dwFlags As Long, ByVal dwContent As Long) As Long
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid handle to an FTP session returned from InternetConnect.
· lpszSearchFile
[in] Address of a null-terminated string that specifies a valid directory path or file name for the FTP server's file system. The string can contain wildcards, but no blank spaces are allowed. If the value of lpszSearchFile is NULL or if it is an empty string, it will find the first file in the current directory on the server.
· lpFindFileData
[out] Address of a WIN32_FIND_DATA structure that receives information about the found file or directory.
· dwFlags
[in] Unsigned long integer value that contains the flags that control the behavior of this function. This can be a combination of the following values:
INTERNET_FLAG_HYPERLINK
INTERNET_FLAG_NEED_FILE
INTERNET_FLAG_NO_CACHE_WRITE
INTERNET_FLAG_RELOAD
INTERNET_FLAG_RESYNCHRONIZE
· dwContext
[in] Address of an unsigned long integer value that contains the application-defined value that associates this search with any application data. This parameter is used only if the application has already called InternetSetStatusCallback to set up a status callback function.
Return Values Returns a valid handle for the request if the directory enumeration was started successfully; otherwise, returns NULL. To get a specific error code, call GetLastError. If the function finds no matching files, GetLastError returns ERROR_NO_MORE_FILES. Thursday, June 14, 2007 4:22 PM -
FtpDeleteFile
Deletes a file stored on the FTP server.
VB4-32,5,6
Declare Function FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA" (ByVal hFtpSession As Long, ByVal lpszFileName As String) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid HINTERNET handle returned by a previous call to InternetConnect using INTERNET_SERVICE_FTP.
· lpszFileName
[in] Address of a null-terminated string that contains the name of the file to delete on the remote system.
Return Values Thursday, June 14, 2007 4:23 PM -
FtpCreateDirectory
Creates a new directory on the FTP server.
VB4-32,5,6
Declare Function FtpCreateDirectory Lib "wininet.dll" Alias "FtpCreateDirectoryA" (ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean
VB.NET
Not implemented
Operating Systems Supported Requires Windows NT 4.0 or later; Requires Windows 95 or later
Library Wininet
Parameter Information · hConnect
[in] Valid HINTERNET handle returned by a previous call to InternetConnect using INTERNET_SERVICE_FTP.
· lpszDirectory
[in] Address of a null-terminated string that contains the name of the directory to create on the remote system. This can be either a fully qualified path or a name relative to the current directory.
Return Values Returns TRUE if successful, or FALSE otherwise. To get a specific error code, call GetLastError. If the error code indicates that the FTP server denied the request to create a directory, use InternetGetLastResponseInfo to determine why. Thursday, June 14, 2007 4:23 PM -
FreeSid
The FreeSid function frees a security identifier (SID) previously allocated by using the AllocateAndInitializeSid function.
VB4-32,5,6
Declare Sub FreeSid Lib "Advapi32" (pSid As Any)
VB.NET
N/A
Operating Systems Supported Requires Windows NT 3.1 or later; Win9x/ME: Not supported
Library Advapi32
Parameter Information · pSid
[in] Pointer to the SID structure to free.
Return Values Thursday, June 14, 2007 4:23 PM -
FreeLibrary
The FreeLibrary function decrements the reference count of the loaded dynamic-link library (DLL) module.
VB4-32,5,6
Declare Function FreeLibrary Lib "kernel32" Alias "FreeLibrary" (ByVal hLibModule As Long) As Long
VB.NET
N/A
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hLibModule
Identifies the loaded library module. The LoadLibrary or GetModuleHandle function returns this handle.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:23 PM -
FreeEnvironmentStrings
The FreeEnvironmentStrings function frees a block of environment strings.
VB4-32,5,6
Declare Function FreeEnvironmentStrings Lib "kernel32" Alias "FreeEnvironmentStringsA" (ByVal lpsz As String) As Long
VB.NET
N/A
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · lpszEnvironmentBlock
Pointer to a block of environment strings. The pointer to the block must be obtained by calling the GetEnvironmentStrings function.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:24 PM -
FreeConsole
The FreeConsole function detaches the calling process from its console.
VB4-32,5,6
Declare Function FreeConsole Lib "kernel32" () As Long
VB.NET
N/A
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:24 PM -
FrameRgn
The FrameRgn function draws a border around the specified region by using the specified brush.
VB4-32,5,6
Declare Function FrameRgn Lib "gdi32" Alias "FrameRgn" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
VB.NET
System.Drawing.Region
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· hrgn
Identifies the region to be enclosed in a border. The region’s coordinates are presumed to be in logical units.
· hbr
Identifies the brush to be used to draw the border.
· nWidth
Specifies the width, in logical units, of vertical brush strokes.
· nHeight
Specifies the height, in logical units, of horizontal brush strokes.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:24 PM -
FrameRect
The FrameRect function draws a border around the specified rectangle by using the specified brush. The width and height of the border are always one logical unit.
VB4-32,5,6
Declare Function FrameRect Lib "user32" Alias "FrameRect" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hDC
Identifies the device context in which the border is drawn.
· lprc
Points to a RECT structure that contains the logical coordinates of the upper-left and lower-right corners of the rectangle.
· hbr
Identifies the brush used to draw the border.
Return Values
If the function fails, the return value is FALSE. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:24 PM -
FormatMessage
The FormatMessage function formats a message string. The function requires a message definition as input.
VB4-32,5,6
Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · dwFlags
Contains a set of bit flags that specify aspects of the formatting process and how to interpret the lpSource parameter. The low-order byte of dwFlags specifies how the function handles line breaks in the output buffer. The low-order byte can also specify the maximum width of a formatted output line.
You can specify a combination of the following bit flags:
FORMAT_MESSAGE_ALLOCATE_BUFFER
Specifies that the lpBuffer parameter is a pointer to a PVOID pointer, and that the nSize parameter specifies the minimum number of bytes (ANSI version) or characters (Unicode version) to allocate for an output message buffer. The function allocates a buffer large enough to hold the formatted message, and places a pointer to the allocated buffer at the address specified by lpBuffer. The caller should use the LocalFree function to free the buffer when it is no longer needed.
FORMAT_MESSAGE_IGNORE_INSERTS
Specifies that insert sequences in the message definition are to be ignored and passed through to the output buffer unchanged. This flag is useful for fetching a message for later formatting. If this flag is set, the Arguments parameter is ignored.
FORMAT_MESSAGE_FROM_STRING
Specifies that lpSource is a pointer to a null-terminated message definition. The message definition may contain insert sequences, just as the message text in a message table resource may. Cannot be used with FORMAT_MESSAGE_FROM_HMODULE or FORMAT_MESSAGE_FROM_SYSTEM.
FORMAT_MESSAGE_FROM_HMODULE
Specifies that lpSource is a module handle containing the message-table resource(s) to search. If this lpSource handle is NULL, the current process’s application image file will be searched. Cannot be used with FORMAT_MESSAGE_FROM_STRING.
FORMAT_MESSAGE_FROM_SYSTEM
Specifies that the function should search the system message-table resource(s) for the requested message. If this flag is specified with FORMAT_MESSAGE_FROM_HMODULE, the function searches the system message table if the message is not found in the module specified by lpSource. Cannot be used with FORMAT_MESSAGE_FROM_STRING.
If this flag is specified, an application can pass the result of the GetLastError function to retrieve the message text for a system-defined error.
FORMAT_MESSAGE_ARGUMENT_ARRAY
Specifies that the Arguments parameter is not a va_list structure, but instead is just a pointer to an array of 32-bit values that represent the arguments.
The low-order byte of dwFlags can specify the maximum width of a formatted output line. Use the FORMAT_MESSAGE_MAX_WIDTH_MASK constant and bitwise Boolean operations to set and retrieve this maximum width value.
The following table shows how FormatMessage interprets the value of the low-order byte.
0
There are no output line width restrictions. The function stores line breaks that are in the message definition text into the output buffer.
A nonzero value other than FORMAT_MESSAGE_MAX_WIDTH_MASK
The nonzero value is the maximum number of characters in an output line. The function ignores regular line breaks in the message definition text. The function never splits a string delimited by white space across a line break. The function stores hard-coded line breaks in the message definition text into the output buffer. Hard-coded line breaks are coded with the %n escape sequence.
FORMAT_MESSAGE_MAX_WIDTH_MASK
The function ignores regular line breaks in the message definition text. The function stores hard-coded line breaks in the message definition text into the output buffer. The function generates no new line breaks.
· lpSource
Specifies the location of the message definition. The type of this parameter depends upon the settings in the dwFlags parameter.
FORMAT_MESSAGE_FROM_HMODULE
lpSource is an hModule of the module that contains the message table to search.
FORMAT_MESSAGE_FROM_STRING
lpSource is an LPTSTR that points to unformatted message text. It will be scanned for inserts and formatted accordingly.
If neither of these flags is set in dwFlags, then lpSource is ignored.
· dwMessageId
Specifies the 32-bit message identifier for the requested message. This parameter is ignored if dwFlags includes FORMAT_MESSAGE_FROM_STRING.
· dwLanguageId
Specifies the 32-bit language identifier for the requested message. This parameter is ignored if dwFlags includes FORMAT_MESSAGE_FROM_STRING.
If you pass a specific LANGID in this parameter, FormatMessage will return a message for that LANGID only. If the function cannot find a message for that LANGID, it returns ERROR_RESOURCE_LANG_NOT_FOUND. If you pass in zero, FormatMessage looks for a message for LANGIDs in the following order:
1. Language neutral
2. Thread LANGID, based on the thread's locale value
3. User default LANGID, based on the user's default locale value
4. System default LANGID, based on the system default locale value
5. US English
If FormatMessage doesn't find a message for any of the preceding LANGIDs, it returns any language message string that is present. If that fails, it returns ERROR_RESOURCE_LANG_NOT_FOUND.
· lpBuffer
Points to a buffer for the formatted (and null-terminated) message. If dwFlags includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the address of the buffer at the address specified in lpBuffer.
· nSize
If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of bytes (ANSI version) or characters (Unicode version) that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of bytes or characters to allocate for an output buffer.
· Arguments
Points to an array of 32-bit values that are used as insert values in the formatted message. %1 in the format string indicates the first value in the Arguments array; %2 indicates the second argument; and so on.
The interpretation of each 32-bit value depends on the formatting information associated with the insert in the message definition. The default is to treat each value as a pointer to a null-terminated string.
By default, the Arguments parameter is of type va_list*, which is a language- and implementation-specific data type for describing a variable number of arguments. If you do not have a pointer of type va_list*, then specify the FORMAT_MESSAGE_ARGUMENT_ARRAY flag and pass a pointer to an array of 32-bit values; those values are input to the message formatted as the insert values. Each insert must have a corresponding element in the array.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:24 PM -
FloodFill
The FloodFill function fills an area of the display surface with the current brush. The area is assumed to be bounded as specified by the crFill parameter.
VB4-32,5,6
Declare Function FloodFill Lib "gdi32" Alias "FloodFill" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies a device context.
· nXStart
Specifies the logical x-coordinate of the point where filling is to begin.
· nYStart
Specifies the logical y-coordinate of the point where filling is to begin.
· crFill
Specifies the color of the boundary or of the area to be filled.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:25 PM -
PathStripPath
Removes the path portion of a fully qualified path and file.
VB4-32,5,6
Declare Sub PathStripPath Lib "shlwapi.dll" Alias "PathStripPathA" (ByVal pszPath As String)
VB.NET
System.IO.FileInfo.Name
Operating Systems Supported Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)
Library Shlwapi
Parameter Information · pszPath
Address of a string that contains the path and file name that will have the path portion removed.
Return Values No return value. Thursday, June 14, 2007 4:54 PM -
Pie
The Pie function draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. The pie is outlined by using the current pen and filled by using the current brush.
VB4-32,5,6
Declare Function Pie Lib "gdi32" Alias "Pie" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long, ByVal X4 As Long, ByVal Y4 As Long) As Long
VB.NET
System.Drawing.Graphics.DrawPie
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· nLeftRect
Specifies the x-coordinate of the upper-left corner of the bounding rectangle.
· nTopRect
Specifies the y-coordinate of the upper-left corner of the bounding rectangle.
· nRightRect
Specifies the x-coordinate of the lower-right corner of the bounding rectangle.
· nBottomRect
Specifies the y-coordinate of the lower-right corner of the bounding rectangle.
· nXRadial1
Specifies the x-coordinate of the endpoint of the first radial.
· nYRadial1
Specifies the y-coordinate of the endpoint of the first radial.
· nXRadial2
Specifies the x-coordinate of the endpoint of the second radial.
· nYRadial2
Specifies the y-coordinate of the endpoint of the second radial.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:55 PM -
PolyBezier
The PolyBezier function draws one or more Bézier curves.
VB4-32,5,6
Declare Function PolyBezier Lib "gdi32" Alias "PolyBezier" (ByVal hdc As Long, lppt As POINTAPI, ByVal cPoints As Long) As Long
VB.NET
System.Drawing.Grpahics.DrawBezier
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies a device context.
· lppt
Points to an array of POINT structures that contain the endpoints and control points of the curve(s).
· cPoints
Specifies the number of points in the lppt array. This value must be one more than three times the number of curves to be drawn, because each Bézier curve requires two control points and an endpoint, and the initial curve requires an additional starting point.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:55 PM -
PolyBezierTo
The PolyBezierTo function draws one or more Bézier curves.
VB4-32,5,6
Declare Function PolyBezierTo Lib "gdi32" Alias "PolyBezierTo" (ByVal hdc As Long, lppt As POINTAPI, ByVal cCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawBezier
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies a device context.
· lppt
Points to an array of POINT structures that contains the endpoints and control points.
· cCount
Specifies the number of points in the lppt array. This value must be three times the number of curves to be drawn, because each Bézier curve requires two control points and an ending point.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastErrorThursday, June 14, 2007 4:55 PM -
PolyDraw
The PolyDraw function draws a set of line segments and Bézier curves.
VB4-32,5,6
Declare Function PolyDraw Lib "gdi32" Alias "PolyDraw" (ByVal hdc As Long, lppt As POINTAPI, lpbTypes As Byte, ByVal cCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawLines
Operating Systems Supported Requires Windows NT 3.1 or later; Win9x/ME: Not supported
Library Gdi32
Parameter Information · hdc
Identifies a device context.
· lppt
Points to an array of POINT structures that contains the endpoints for each line segment and the endpoints and control points for each Bézier curve.
· flpbTypes
Points to an array that specifies how each point in the lppt array is used. Types can be one of the following:
PT_MOVETO
Specifies that this point starts a disjoint figure. This point becomes the new current position.
PT_LINETO
Specifies that a line is to be drawn from the current position to this point, which then becomes the new current position.
PT_BEZIERTO
Specifies that this point is a control point or ending point for a Bézier curve.
PT_BEZIERTO types always occur in sets of three. The current position defines the starting point for the Bézier curve. The first two PT_BEZIERTO points are the control points, and the third PT_BEZIERTO point is the ending point. The ending point becomes the new current position. If there are not three consecutive PT_BEZIERTO points, an error results.
A PT_LINETO or PT_BEZIERTO type can be combined with the following value by using the bitwise operator OR to indicate that the corresponding point is the last point in a figure and the figure is closed:
PT_CLOSEFIGURE
Specifies that the figure is automatically closed after the PT_LINETO or PT_BEZIERTO type for this point is done. A line is drawn from this point to the most recent PT_MOVETO or MoveToEx point.
This value is combined with the PT_LINETO type for a line, or with the PT_BEZIERTO type of the ending point for a Bézier curve, by using the bitwise operator OR.
The current position is set to the ending point of the closing line.
· cCount
Specifies the total number of points in the lppt array, the same as the number of bytes in the lpbTypes array.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:56 PM -
Polygon
The Polygon function draws a polygon consisting of two or more vertices connected by straight lines. The polygon is outlined by using the current pen and filled by using the current brush and polygon fill mode.
VB4-32,5,6
Declare Function Polygon Lib "gdi32" Alias "Polygon" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawPolygon
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· lpPoints
Points to an array of POINT structures that specify the vertices of the polygon.
· nCount
Specifies the number of vertices in the array. This value must be greater than or equal to 2.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:56 PM -
Polyline
The Polyline function draws a series of line segments by connecting the points in the specified array.
VB4-32,5,6
Declare Function Polyline Lib "gdi32" Alias "Polyline" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawLines
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies a device context.
· lppt
Points to an array of POINT structures. Each structure in the array identifies a point in logical space.
· cPoints
Specifies the number of points in the array. This number must be greater than or equal to two.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:57 PM -
PolylineTo
The PolylineTo function draws one or more straight lines.
VB4-32,5,6
Declare Function PolylineTo Lib "gdi32" Alias "PolylineTo" (ByVal hdc As Long, lppt As POINTAPI, ByVal cCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawLines
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· lppt
Points to an array of POINT structures that contains the vertices of the line.
· cCount
Specifies the number of points in the array.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:57 PM -
PolyPolygon
The PolyPolygon function draws a series of closed polygons. Each polygon is outlined by using the current pen and filled by using the current brush and polygon fill mode. The polygons drawn by this function can overlap.
VB4-32,5,6
Declare Function PolyPolygon Lib "gdi32" Alias "PolyPolygon" (ByVal hdc As Long, lpPoint As POINTAPI, lpPolyCounts As Long, ByVal nCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawPolygon
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· lpPoints
Points to an array of POINT structures that define the vertices of the polygons. The polygons are specified consecutively. Each polygon is closed automatically by drawing a line from the last vertex to the first. Each vertex should be specified once.
· lpPolyCounts
Points to an array of integers, each of which specifies the number of points in the corresponding polygon. Each integer must be greater than or equal to 2.
· nCount
Specifies the total number of polygons.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:58 PM -
PolyPolyline
The PolyPolyline function draws multiple series of connected line segments.
VB4-32,5,6
Declare Function PolyPolyline Lib "gdi32" Alias "PolyPolyline" (ByVal hdc As Long, lppt As POINTAPI, lpdwPolyPoints As Long, ByVal cCount As Long) As Long
VB.NET
System.Drawing.Graphics.DrawLines
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· lppt
Points to an array of POINT structures that contains the vertices of the polylines. The polylines are specified consecutively.
· lpdwPolyPoints
Points to an array of variables specifying the number of points in the lppt array for the corresponding polyline. Each entry must be greater than or equal to two.
· cCount
Specifies the total number of counts in the lpdwPolyPoints array.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:58 PM -
PolyTextOut
The PolyTextOut function draws several strings using the font and text colors currently selected in the specified device context.
VB4-32,5,6
Declare Function PolyTextOut Lib "gdi32" Alias "PolyTextOutA" (ByVal hdc As Long, pptxt As POLYTEXT, cStrings As Long) As Long
VB.NET
System.Drawing.Graphics.DrawString
Operating Systems Supported Requires Windows NT 3.1 or later; Win9x/ME: Not supported
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· pptxt
Points to an array of POLYTEXT structures describing the strings to be drawn. The array contains one structure for each string to be drawn.
· cStrings
Specifies the number of POLYTEXT structures in the pptxt array.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Thursday, June 14, 2007 4:59 PM -
PrintDialog
The PrintDialog function displays a Print dialog box or a Print Setup dialog box. The Print dialog box enables the user to specify the properties of a particular print job.
VB4-32,5,6
Declare Function PrintDialog Lib "comdlg32.dll" Alias "PrintDlgA" (pPrintdlg As PRINTDLG_TYPE) As Long
VB.NET
System.Windows.Forms.PrintDialog
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Comdlg32
Parameter Information · lppd
Pointer to a PRINTDLG structure that contains information used to initialize the dialog box. When PrintDlg returns, this structure contains information about the user’s selections.
Return Values If the user clicks the OK button, the return value is nonzero. The members of the PRINTDLGstructure pointed to by the lppd parameter indicate the user’s selections.
If the user cancels or closes the Print or Printer Setup dialog box or an error occurs, the return value is zero. To get extended error information, use the CommDlgExtendedError function, which can return one of the following values:
CDERR_FINDRESFAILURE, PDERR_CREATEICFAILURE, CDERR_INITIALIZATION, PDERR_DEFAULTDIFFERENT, CDERR_LOADRESFAILURE, PDERR_DNDMMISMATCH, CDERR_LOADSTRFAILURE, PDERR_GETDEVMODEFAIL, CDERR_LOCKRESFAILURE, PDERR_INITFAILURE, CDERR_MEMALLOCFAILURE, PDERR_LOADDRVFAILURE, CDERR_MEMLOCKFAILURE, CDERR_NODEFAULTPRN, CDERR_NOHINSTANCE, PDERR_NODEVICES, CDERR_NOHOOK, PDERR_PARSEFAILURE, CDERR_NOTEMPLATE, PDERR_PRINTERNOTFOUND, CDERR_STRUCTSIZE, PDERR_RETDEFFAILUREThursday, June 14, 2007 4:59 PM -
Process32First
Retrieves information about the first process encountered in a system snapshot.
VB4-32,5,6
Declare Function Process32First Lib "Kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
VB.NET
System.Diagnostics.Process
Operating Systems Supported Requires Windows 2000 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hSnapshot
Handle of the snapshot returned from a previous call to the CreateToolhelp32Snapshot function.
· lppe
Address of a PROCESSENTRY32 structure.
Return Values Returns TRUE if the first entry of the process list has been copied to the buffer or FALSE otherwise. The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no processes exist or the snapshot does not contain process information. Thursday, June 14, 2007 4:59 PM -
Process32Next
Retrieves information about the next process recorded in a system snapshot.
VB4-32,5,6
Declare Function Process32Next Lib "Kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
VB.NET
System.Diagnostics.Process
Operating Systems Supported Requires Windows 2000 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hSnapshot
Handle of the snapshot returned from a previous call to the CreateToolhelp32Snapshot function.
· lppe
Address of a PROCESSENTRY32 structure.
Return Values Returns TRUE if the next entry of the process list has been copied to the buffer or FALSE otherwise. The ERROR_NO_MORE_FILES error value is returned by the GetLastError function if no processes exist or the snapshot does not contain process information. Thursday, June 14, 2007 5:03 PM -
PtInRegion
The PtInRegion function determines whether the specified point is inside the specified region.
VB4-32,5,6
Declare Function PtInRegion Lib "gdi32" Alias "PtInRegion" (ByVal hRgn As Long, ByVal x As Long, ByVal y As Long) As Long
VB.NET
System.Drawing.Region
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hrgn
Identifies the region to be examined.
· X
Specifies the x-coordinate of the point.
· Y
Specifies the y-coordinate of the point.
Return Values If the specified point is in the region, the return value is nonzero.
If the specified point is not in the region, the return value is zero.Thursday, June 14, 2007 5:04 PM -
PwdChangePassword
This function is used to change the user's Windows password or a password provider's password. The MPR displays a dialog box for this purpose. If the Windows password is changed, the MPR re-encrypts the user's password cache with the new password. Password providers are notified through the PPChangePassword SPI.
VB4-32,5,6
Declare Function PwdChangePassword Lib "mpr" Alias "PwdChangePasswordA" (ByVal lpcRegkeyname As String, ByVal hwnd As Long, ByVal uiReserved1 As Long, ByVal uiReserved2 As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Mpr
Parameter Information · lpcRegkeyname
Registry key name.
· hwnd
Handle of the parent window.
· uiReserved1
Reserved. Should be set to 0.
· uiReserved2
Reserved. Should be set to 0.
Return Values WN_SUCCESS if the call is successful. Otherwise, an error, which includes:
WN_CANCEL The user canceled the operation.Thursday, June 14, 2007 5:06 PM -
ReadConsole
The ReadConsole function reads character input from the console input buffer and removes it from the buffer.
VB4-32,5,6
Declare Function ReadConsole Lib "kernel32" Alias "ReadConsoleA" (ByVal hConsoleInput As Long, ByVal lpBuffer As String, ByVal nNumberOfCharsToRead As Long, lpNumberOfCharsRead As Long, lpReserved As Any) As Long
VB.NET
System.Console.Read
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hConsoleInput
[in] Handle to the console input buffer. The handle must have GENERIC_READ access.
· lpBuffer
[out] Pointer to a buffer that receives the data read from the console input buffer.
· nNumberOfCharsToRead
[in] Specifies the number of TCHARs to read. Because the function can read either Unicode or ANSI characters, the size of the buffer pointed to by the lpBuffer parameter should be at least nNumberOfCharsToRead * sizeof(TCHAR) bytes.
· lpNumberOfCharsRead
[out] Pointer to a variable that receives the number of TCHARs actually read.
· lpReserved
[in] Reserved; must be NULL.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastErrorFriday, June 15, 2007 3:52 PM -
ReadFile
The ReadFile function reads data from a file, starting at the position indicated by the file pointer.
VB4-32,5,6
Declare Function ReadFile Lib "kernel32" Alias "ReadFile" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As OVERLAPPED) As Long
VB.NET
System.IO.Stream
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Kernel32
Parameter Information · hFile
Identifies the file to be read. The file handle must have been created with GENERIC_READ access to the file.
Windows NT
For asynchronous read operations, hFile can be any handle opened with the FILE_FLAG_OVERLAPPED flag by the CreateFile function, or a socket handle returned by the socket or accept functions.
Windows 95
For asynchronous read operations, hFile can be a communications resource, mailslot, or named pipe handle opened with the FILE_FLAG_OVERLAPPED flag by CreateFile, or a socket handle returned by the socket or accept functions. Windows 95 does not support asynchronous read operations on disk files.
· lpBuffer
Points to the buffer that receives the data read from the file.
· nNumberOfBytesToRead
Specifies the number of bytes to be read from the file.
· lpNumberOfBytesRead
Points to the number of bytes read. ReadFile sets this value to zero before doing any work or error checking. If this parameter is zero when ReadFile returns TRUE on a named pipe, the other end of the message-mode pipe called the WriteFile function with nNumberOfBytesToWrite set to zero.
If lpOverlapped is NULL, lpNumberOfBytesRead cannot be NULL.
If lpOverlapped is not NULL, lpNumberOfBytesRead can be NULL. If this is an overlapped read operation, you can get the number of bytes read by calling GetOverlappedResult. If hFile is associated with an I/O completion port, you can get the number of bytes read by calling GetQueuedCompletionStatus.
· lpOverlapped
Points to an OVERLAPPED structure. This structure is required if hFile was created with FILE_FLAG_OVERLAPPED.
If hFile was opened with FILE_FLAG_OVERLAPPED, the lpOverlapped parameter must not be NULL. It must point to a valid OVERLAPPED structure. If hFile was created with FILE_FLAG_OVERLAPPED and lpOverlapped is NULL, the function can incorrectly report that the read operation is complete.
If hFile was opened with FILE_FLAG_OVERLAPPED and lpOverlapped is not NULL, the read operation starts at the offset specified in the OVERLAPPED structure and ReadFile may return before the read operation has been completed. In this case, ReadFile returns FALSE and the GetLastError function returns ERROR_IO_PENDING. This allows the calling process to continue while the read operation finishes. The event specified in the OVERLAPPED structure is set to the signaled state upon completion of the read operation.
If hFile was not opened with FILE_FLAG_OVERLAPPED and lpOverlapped is NULL, the read operation starts at the current file position and ReadFile does not return until the operation has been completed.
If hFile is not opened with FILE_FLAG_OVERLAPPED and lpOverlapped is not NULL, the read operation starts at the offset specified in the OVERLAPPED structure. ReadFile does not return until the read operation has been completed.
Return Values If the function succeeds, the return value is nonzero.
If the return value is nonzero and the number of bytes read is zero, the file pointer was beyond the current end of the file at the time of the read operation. However, if the file was opened with FILE_FLAG_OVERLAPPED and lpOverlapped is not NULL, the return value is FALSE and GetLastError returns ERROR_HANDLE_EOF when the file pointer goes beyond the current end of file.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 3:53 PM -
Rectangle
The Rectangle function draws a rectangle. The rectangle is outlined by using the current pen and filled by using the current brush.
VB4-32,5,6
Declare Function Rectangle Lib "gdi32" Alias "Rectangle" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
VB.NET
System.Drawing.Graphics.DrawRectangle
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
· nLeftRect
Specifies the logical x-coordinate of the upper-left corner of the rectangle.
· nTopRect
Specifies the logical y-coordinate of the upper-left corner of the rectangle.
· nRightRect
Specifies the logical x-coordinate of the lower-right corner of the rectangle.
· nBottomRect
Specifies the logical y-coordinate of the lower-right corner of the rectangle.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 3:53 PM -
recv
The Windows Sockets recv function receives data on a socket.
VB4-32,5,6
Declare Function recv Lib "wsock32.dll" (ByVal s As Long, buf As Any, ByVal buflen As Long, ByVal flags As Long) As Long
VB.NET
System.Net.Sockets.Socket.Receive
Operating Systems Supported Requires Windows Sockets 1.1
Library Wsock32.dll
Parameter Information · s
[in] A descriptor identifying a connected socket.
· buf
[out] A buffer for the incoming data.
· len
[in] The length of buf.
· flags
[in] A flag specifying the way in which the call is made.
Return Values If no error occurs, recv returns the number of bytes received. If the connection has been gracefully closed, the return value is zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError. Friday, June 15, 2007 3:54 PM -
RegCloseKey
The RegCloseKey function releases the handle of the specified key.
VB4-32,5,6
Declare Function RegCloseKey Lib "advapi32.dll" Alias "RegCloseKey" (ByVal hKey As Long) As Long
VB.NET
Microsoft.Win32.RegistryKey.Close
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies the open key to close.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:54 PM -
RegCreateKey
The RegCreateKey function creates the specified key. If the key already exists in the registry, the function opens it. This function is provided for compatibility with Windows version 3.1. Win32-based applications should use the RegCreateKeyEx function.
VB4-32,5,6
Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
VB.NET
Microsoft.Win32.RegistryKey.CreateSubKey
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The key opened or created by this function is a subkey of the key identified by hKey.
· lpSubKey
Points to a null-terminated string specifying the name of a key that this function opens or creates. This key must be a subkey of the key identified by the hKey parameter.
If hKey is one of the predefined keys, lpSubKey may be NULL. In that case, the handle returned by using phkResult is the same hKey handle passed in to the function.
· phkResult
Points to a variable that receives the handle of the opened or created key.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:55 PM -
RegCreateKeyEx
The RegCreateKeyEx function creates the specified key. If the key already exists in the registry, the function opens it.
VB4-32,5,6
Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long
VB.NET
Microsoft.Win32.RegistryKey.CreateSubKey
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The key opened or created by the RegCreateKeyEx function is a subkey of the key identified by the hKey parameter.
· lpSubKey
Points to a null-terminated string specifying the name of a subkey that this function opens or creates. The subkey specified must be a subkey of the key identified by the hKey parameter. This subkey must not begin with the backslash character (‘\’). This parameter cannot be NULL.
· Reserved
Reserved; must be zero.
· lpClass
Points to a null-terminated string that specifies the class (object type) of this key. This parameter is ignored if the key already exists.
· dwOptions
Specifies special options for the key. This parameter can be one of the following values.
REG_OPTION_NON_VOLATILE
This key is not volatile; this is the default. The information is stored in a file and is preserved when the system is restarted. The RegSaveKey function saves keys that are not volatile.
REG_OPTION_VOLATILE
Windows NT: This key is volatile; the information is stored in memory and is not preserved when the system is restarted. The RegSaveKey function does not save volatile keys. This flag is ignored if the key already exists.
Windows 95: This value is ignored in Windows 95. If REG_OPTION_VOLATILE is specified, the RegCreateKeyEx function creates a nonvolatile key and returns ERROR_SUCCESS.
REG_OPTION_BACKUP_RESTORE
Windows NT: If this flag is set, the function ignores the samDesired parameter and attempts to open the key with the access required to backup or restore the key. If the calling thread has the SE_BACKUP_NAME privilege enabled, the key is opened with ACCESS_SYSTEM_SECURITY and KEY_READ access. If the calling thread has the SE_RESTORE_NAME privilege enabled, the key is opened with ACCESS_SYSTEM_SECURITY and KEY_WRITE access. If both privileges are enabled, the key has the combined accesses for both privileges.
Windows 95: This flag is ignored. Windows 95 does not support security in its registry.
· samDesired
Specifies an access mask that specifies the desired security access for the new key. This parameter can be a combination of the following values:
KEY_ALL_ACCESS
Combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY, KEY_CREATE_SUB_KEY, KEY_CREATE_LINK, and KEY_SET_VALUE access.
KEY_CREATE_LINK
Permission to create a symbolic link.
KEY_CREATE_SUB_KEY
Permission to create subkeys.
KEY_ENUMERATE_SUB_KEYS
Permission to enumerate subkeys.
KEY_EXECUTE
Permission for read access.
KEY_NOTIFY
Permission for change notification.
KEY_QUERY_VALUE
Permission to query subkey data.
KEY_READ
Combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY access.
KEY_SET_VALUE
Permission to set subkey data.
KEY_WRITE
Combination of KEY_SET_VALUE and KEY_CREATE_SUB_KEY access.
· lpSecurityAttributes
Pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpSecurityAttributes is NULL, the handle cannot be inherited.
Windows NT: The lpSecurityDescriptor member of the structure specifies a security descriptor for the new key. If lpSecurityAttributes is NULL, the key gets a default security descriptor.
Windows 95: The lpSecurityDescriptor member of the structure is ignored.
· phkResult
Points to a variable that receives the handle of the opened or created key.
· lpdwDisposition
Points to a variable that receives one of the following disposition values:
REG_CREATED_NEW_KEY
The key did not exist and was created.
REG_OPENED_EXISTING_KEY
The key existed and was simply opened without being changed.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:55 PM -
RegDeleteKey
Windows 95: The RegDeleteKey function deletes a key and all its descendents.Windows NT: The RegDeleteKey function deletes the specified key. This function cannot delete a key that has subkeys.
VB4-32,5,6
Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
VB.NET
Microsoft.Win32.RegistryKey.DeleteSubKey
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The key specified by the lpSubKey parameter must be a subkey of the key identified by hKey.
· lpSubKey
Points to a null-terminated string specifying the name of the key to delete. This parameter cannot be NULL, and the specified key must not have subkeys.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:55 PM -
RegDeleteValue
The RegDeleteValue function removes a named value from the specified registry key.
VB4-32,5,6
Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
VB.NET
Microsoft.Win32.RegistryKey.DeleteValue
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
· lpValueName
Points to a null-terminated string that names the value to remove. If this parameter is NULL or points to an empty string, the value set by the RegSetValue function is removed.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:56 PM -
RegEnumKeyEx
The RegEnumKeyEx function enumerates subkeys of the specified open registry key. The function retrieves information about one subkey each time it is called.
VB4-32,5,6
Declare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, lpcbName As Long, lpReserved As Long, ByVal lpClass As String, lpcbClass As Long, lpftLastWriteTime As FILETIME) As Long
VB.NET
Microsoft.Win32.RegistryKey.GetSubKeyNames
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The enumerated keys are subkeys of the key identified by hKey.
· dwIndex
Specifies the index of the subkey to retrieve. This parameter should be zero for the first call to the RegEnumKeyEx function and then incremented for subsequent calls.
Because subkeys are not ordered, any new subkey will have an arbitrary index. This means that the function may return subkeys in any order.
· lpName
Points to a buffer that receives the name of the subkey, including the terminating null character. The function copies only the name of the subkey, not the full key hierarchy, to the buffer.
· lpcbName
Points to a variable that specifies the size, in characters, of the buffer specified by the lpName parameter. This size should include the terminating null character. When the function returns, the variable pointed to by lpcbName contains the number of characters stored in the buffer. The count returned does not include the terminating null character.
· lpReserved
Reserved; must be NULL.
· lpClass
Points to a buffer that contains the class of the enumerated subkey when the function returns. This parameter can be NULL if the class is not required.
· lpcbClass
Points to a variable that specifies the size, in characters, of the buffer specified by the lpClass parameter. The size should include the terminating null character. When the function returns, lpcbClass contains the number of characters stored in the buffer. The count returned does not include the terminating null character. This parameter can be NULL only if lpClass is NULL.
· lpftLastWriteTime
Points to a variable that receives the time the enumerated subkey was last written to.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:56 PM -
RegEnumValue
The RegEnumValue function enumerates the values for the specified open registry key. The function copies one indexed value name and data block for the key each time it is called.
VB4-32,5,6
Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Byte, lpcbData As Long) As Long
VB.NET
Microsoft.Win32.RegistryKey.GetValueNames
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The enumerated values are associated with the key identified by hKey.
· dwIndex
Specifies the index of the value to retrieve. This parameter should be zero for the first call to the RegEnumValue function and then be incremented for subsequent calls.
Because values are not ordered, any new value will have an arbitrary index. This means that the function may return values in any order.
· lpValueName
Points to a buffer that receives the name of the value, including the terminating null character.
· lpcbValueName
Points to a variable that specifies the size, in characters, of the buffer pointed to by the lpValueName parameter. This size should include the terminating null character. When the function returns, the variable pointed to by lpcbValueName contains the number of characters stored in the buffer. The count returned does not include the terminating null character.
· lpReserved
Reserved; must be NULL.
· lpType
Points to a variable that receives the type code for the value entry. The type code can be one of the following values:
REG_BINARY
Binary data in any form.
REG_DWORD
A 32-bit number.
REG_DWORD_LITTLE_ENDIAN
A 32-bit number in little-endian format (same as REG_DWORD). In little-endian format, the most significant byte of a word is the high-order byte. This is the most common format for computers running Windows NT and Windows 95.
REG_DWORD_BIG_ENDIAN
A 32-bit number in big-endian format. In big-endian format, the most significant byte of a word is the low-order byte.
REG_EXPAND_SZ
A null-terminated string that contains unexpanded references to environment variables (for example, “%PATH%”). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions.
REG_LINK
A Unicode symbolic link.
REG_MULTI_SZ
An array of null-terminated strings, terminated by two null characters.
REG_NONE
No defined value type.
REG_RESOURCE_LIST
A device-driver resource list.
REG_SZ
A null-terminated string. It will be a Unicode or ANSI string, depending on whether you use the Unicode or ANSI functions.
The lpType parameter can be NULL if the type code is not required.
· lpData
Points to a buffer that receives the data for the value entry. This parameter can be NULL if the data is not required.
· lpcbData
Points to a variable that specifies the size, in bytes, of the buffer pointed to by the lpData parameter. When the function returns, the variable pointed to by the lpcbData parameter contains the number of bytes stored in the buffer. This parameter can be NULL, only if lpData is NULL.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:57 PM -
RegOpenKey
The RegOpenKey function opens the specified key. This function is provided for compatibility with Windows version 3.1. Win32-based applications should use the RegOpenKeyEx function.
VB4-32,5,6
Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
VB.NET
Microsoft.Win32.RegistryKey.OpenSubKey
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The key opened by the RegOpenKey function is a subkey of the key identified by hKey.
· lpSubKey
Points to a null-terminated string containing the name of the key to open. This key must be a subkey of the key identified by the hKey parameter. If this parameter is NULL or a pointer to an empty string, the function returns the same handle that was passed in.
· phkResult
Points to a variable that receives the handle of the opened key.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:57 PM -
RegOpenKeyEx
The RegOpenKeyEx function opens the specified key.
VB4-32,5,6
Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
VB.NET
Microsoft.Win32.RegistryKey.OpenSubKey
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
· lpSubKey
Points to a null-terminated string containing the name of the subkey to open. If this parameter is NULL or a pointer to an empty string, the function will open a new handle of the key identified by the hKey parameter. In this case, the function will not close the handles previously opened.
· ulOptions
Reserved; must be zero.
· samDesired
Specifies an access mask that describes the desired security access for the new key. This parameter can be a combination of the following values:
KEY_ALL_ACCESS
Combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY, KEY_CREATE_SUB_KEY, KEY_CREATE_LINK, and KEY_SET_VALUE access.
KEY_CREATE_LINK
Permission to create a symbolic link.
KEY_CREATE_SUB_KEY
Permission to create subkeys.
KEY_ENUMERATE_SUB_KEYS
Permission to enumerate subkeys.
KEY_EXECUTE
Permission for read access.
KEY_NOTIFY
Permission for change notification.
KEY_QUERY_VALUE
Permission to query subkey data.
KEY_READ
Combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY access.
KEY_SET_VALUE
Permission to set subkey data.
KEY_WRITE
Combination of KEY_SET_VALUE and KEY_CREATE_SUB_KEY access.
· phkResult
Points to a variable that receives the handle of the opened key.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:57 PM -
RegQueryValueEx
The RegQueryValueEx function retrieves the type and data for a specified value name associated with an open registry key.
VB4-32,5,6
Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
VB.NET
Microsoft.Win32.RegistryKey.GetValue
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Advapi32
Parameter Information · hKey
Identifies a currently open key or any of the following predefined reserved handle values:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
· lpValueName
Points to a null-terminated string containing the name of the value to be queried.
· lpReserved
Reserved; must be NULL.
· lpType
Points to a variable that receives the key’s value type. The value returned through this parameter will be one of the following:
REG_BINARY
Binary data in any form.
REG_DWORD
A 32-bit number.
REG_DWORD_LITTLE_ENDIAN
A 32-bit number in little-endian format (same as REG_DWORD). In little-endian format, the most significant byte of a word is the high-order byte. This is the most common format for computers running Windows NT and Windows 95.
REG_DWORD_BIG_ENDIAN
A 32-bit number in big-endian format. In big-endian format, the most significant byte of a word is the low-order byte.
REG_EXPAND_SZ
A null-terminated string that contains unexpanded references to environment variables (for example, “%PATH%”). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions.
REG_LINK
A Unicode symbolic link.
REG_MULTI_SZ
An array of null-terminated strings, terminated by two null characters.
REG_NONE
No defined value type.
REG_RESOURCE_LIST
A device-driver resource list.
REG_SZ
A null-terminated string. It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions.
The lpType parameter can be NULL if the type is not required.
· lpData
Points to a buffer that receives the value’s data. This parameter can be NULL if the data is not required.
· lpcbData
Points to a variable that specifies the size, in bytes, of the buffer pointed to by the lpData parameter. When the function returns, this variable contains the size of the data copied to lpData.
If the buffer specified by lpData parameter is not large enough to hold the data, the function returns the value ERROR_MORE_DATA, and stores the required buffer size, in bytes, into the variable pointed to by lpcbData.
If lpData is NULL, and lpcbData is non-NULL, the function returns ERROR_SUCCESS, and stores the size of the data, in bytes, in the variable pointed to by lpcbData. This lets an application determine the best way to allocate a buffer for the value key’s data.
If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, then lpData will also include the size of the terminating null character.
The lpcbData parameter can be NULL only if lpData is NULL.
Return Values If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.Friday, June 15, 2007 3:58 PM -
GdiAlphaBlend
The GdiAlphaBlend function displays bitmaps that have transparent or semitransparent pixels.
VB4-32,5,6
Declare Function GdiAlphaBlend Lib "gdi32.dll" (ByVal hdc As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal hdc As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal lInt As Long, ByVal BLENDFUNCT As Long) As Long
Operating Systems Supported Requires Windows 2000 or later; Win9x/ME: Not supported
Library Gdi32
Parameter Information · hdcDest
[in] Handle to the destination device context.
· nXOriginDest
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
· nYOriginDest
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
· nWidthDest
[in] Specifies the width, in logical units, of the destination rectangle.
· nHeightDest
[in] Specifies the height, in logical units, of the destination rectangle.
· hdcSrc
[in] Handle to the source device context.
· nXOriginSrc
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the source rectangle.
· nYOriginSrc
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the source rectangle.
· nWidthSrc
[in] Specifies the width, in logical units, of the source rectangle.
· nHeightSrc
[in] Specifies the height, in logical units, of the source rectangle.
· blendFunction
[in] Specifies the alpha-blending function for source and destination bitmaps, a global alpha value to be applied to the entire source bitmap, and format information for the source bitmap. The source and destination blend functions are currently limited to AC_SRC_OVER. See the BLENDFUNCTION and EMRALPHABLEND structures.
Return Values
If the function fails, the return value is FALSE.
Windows NT/ 2000: To get extended error information, call GetLastError. This can return the following value.
ERROR_INVALID_PARAMETER One or more of the input parameters is invalid.Friday, June 15, 2007 4:04 PM -
GdiGradientFillRect
The GdiGradientFill function fills rectangle and triangle structures.
VB4-32,5,6
Declare Function GdiGradientFillRect Lib "gdi32" Alias "GdiGradientFill" (ByVal hdc As Long, pVertex As TRIVERTEX, ByVal dwNumVertex As Long, pMesh As GRADIENT_RECT, ByVal dwNumMesh As Long, ByVal dwMode As Long) As Long
VB.NET
System.Drawing.Drawing2D.LinearGradientBrush
Operating Systems Supported Requires Windows 2000 or later; Win9x/ME: Not supported
Library Gdi32
Parameter Information · hdc
[in] Handle to the destination device context.
· pVertex
[in] Pointer to an array of TRIVERTEX structures that each define a triangle vertex.
· dwNumVertex
[in] The number of vertices in pVertex.
· pMesh
[in] Array of GRADIENT_TRIANGLE structures in triangle mode, or an array of GRADIENT_RECT structures in rectangle mode.
· dwNumMesh
[in] The number of elements (triangles or rectangles) in pMesh.
· dwMode
[in] Specifies gradient fill mode. This parameter can be one of the following values.
GRADIENT_FILL_RECT_H
In this mode, two endpoints describe a rectangle. The rectangle is defined to have a constant color (specified by the TRIVERTEX structure) for the left and right edges. GDI interpolates the color from the top to bottom edge and fills the interior.
GRADIENT_FILL_RECT_V
In this mode, two endpoints describe a rectangle. The rectangle is defined to have a constant color (specified by the TRIVERTEX structure) for the top and bottom edges. GDI interpolates the color from the top to bottom edge and fills the interior.
GRADIENT_FILL_TRIANGLE
In this mode, an array of TRIVERTEX structures is passed to GDI along with a list of array indexes that describe separate triangles. GDI performs linear interpolation between triangle vertices and fills the interior. Drawing is done directly in 24- and 32-bpp modes. Dithering is performed in 16-, 8-, 4-, and 1-bpp mode.
Return Values If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
Windows NT/ 2000: To get extended error information, call GetLastError.Friday, June 15, 2007 4:05 PM -
GdiTransparentBlt
The GdiTransparentBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
VB4-32,5,6
Private Declare Function GdiTransparentBlt Lib "gdi32.dll" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal crTransparent As Long) As Boolean
VB.NET
System.Drawing.Bitmap.MakeTransparent
Operating Systems Supported Requires Windows 2000 or later; Win9x/ME: Not supported
Library Gdi32
Parameter Information · hdcDest
[in] Handle to the destination device context.
· nXOriginDest
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
· nYOriginDest
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
· nWidthDest
[in] Specifies the width, in logical units, of the destination rectangle.
· hHeightDest
[in] Handle to the height, in logical units, of the destination rectangle.
· hdcSrc
[in] Handle to the source device context.
· nXOriginSrc
[in] Specifies the x-coordinate, in logical units, of the source rectangle.
· nYOriginSrc
[in] Specifies the y-coordinate, in logical units, of the source rectangle.
· nWidthSrc
[in] Specifies the width, in logical units, of the source rectangle.
· nHeightSrc
[in] Specifies the height, in logical units, of the source rectangle.
· crTransparent
[in] The RGB color in the source bitmap to treat as transparent.
Return Values
If the function fails, the return value is FALSE.
Windows NT/ 2000: To get extended error information, call GetLastError.Friday, June 15, 2007 4:05 PM -
GetAce
The GetAce function obtains a pointer to an ACE in an ACL. An ACE is an access control entry. An ACL is an access control list.
VB4-32,5,6
Declare Function GetAce Lib "advapi32.dll" (ByVal pAcl As Long, ByVal dwAceIndex As Long, pace As Any) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Win9x/ME: Not supported
Library Advapi32
Parameter Information · pAcl
[in] Pointer to an ACL structure containing the ACE to be retrieved.
· dwAceIndex
[in] Specifies the ACE to which a pointer is retrieved. A value of 0 corresponds to the first ACE in the ACL, 1 to the second ACE, and so on.
· pAce
[out] Pointer to a pointer the function sets to the address of the ACE.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:05 PM -
GetAclInformation
The GetAclInformation function retrieves information about an access-control list (ACL).
VB4-32,5,6
Declare Function GetAclInformation Lib "advapi32.dll" (ByVal pAcl As Long, pAclInformation As Any, ByVal nAclInformationLength As Long, ByVal dwAclInformationClass As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Win9x/ME: Not supported
Library Advapi32
Parameter Information · pAcl
[in] Pointer to an ACL structure. The function retrieves information about this ACL. If a NULL ACL is passed, the function causes an access violation.
· pAclInformation
[out] Pointer to a buffer receiving the requested information. The structure put into the buffer depends on the information class requested in the dwAclInformationClass parameter.
· nAclInformationLength
[in] Specifies the size, in bytes, of the buffer pointed to by the pAclInformation parameter.
· dwAclInformationClass
[in] Specifies an ACL_INFORMATION_CLASS enumerated value that gives the class of information requested. This parameter can be one of two values from this enumerated type. If the value is AclRevisionInformation, the function fills the buffer pointed to by the pAclInformation parameter with an ACL_REVISION_INFORMATION structure.
If the value is AclSizeInformation, the function fills the buffer pointed to by the pAclInformation parameter with an ACL_SIZE_INFORMATION structure.
Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:05 PM -
GetActiveWindow
The GetActiveWindow function retrieves the window handle to the active window associated with the thread that calls the function.
VB4-32,5,6
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Long
VB.NET
System.Windows.Forms.Form.ActiveForm
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Return Values Friday, June 15, 2007 4:06 PM -
GetAdaptersInfo
The GetAdaptersInfo function retrieves adapter information for the local computer.
VB4-32,5,6
Declare Function GetAdaptersInfo Lib "IPHlpApi" (IpAdapterInfo As Any, pOutBufLen As Long) As Long
Operating Systems Supported Requires Windows 2000 or later; Requires Windows 98 or later
Library Iphlpapi
Parameter Information · pAdapterInfo
[out] Pointer to a buffer that, , receives a linked list of IP_ADAPTER_INFO structures.
· pOutBufLen
[in] Pointer to a ULONG variable that specifies the size of the buffer pointed to by the pAdapterInfo parameter. If this size is insufficient to hold the adapter information, GetAdaptersInfo fills in this variable with the required size, and returns an error code of ERROR_BUFFER_OVERFLOW.
Return Values
If the function fails, the return value is one of the following error codes.
ERROR_BUFFER_OVERFLOW
The buffer size indicated by the pOutBufLen parameter is too small to hold the adapter information. The pOutBufLen parameter points to the required size.
ERROR_INVALID_PARAMETER
The pOutBufLen parameter is NULL, or the calling process does not have read/write access to the memory pointed to by pOutBufLen, or the calling process does not have write access to the memory pointed to by the pAdapterInfo parameter.
ERROR_NO_DATA
No adapter information exists for the local computer.
ERROR_NOT_SUPPORTED
GetAdaptersInfo is not supported by the operating system running on the local computer.
Other
If the function fails, use FormatMessage to obtain the message string for the returned error.Friday, June 15, 2007 4:06 PM -
GetAllUsersProfileDirectory
The GetAllUsersProfileDirectory function retrieves the path to the root of the All Users profile.
VB4-32,5,6
Declare Function GetAllUsersProfileDirectory Lib "userenv.dll" Alias "GetAllUsersProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
Operating Systems Supported Requires Windows 2000 or later; Win9x/ME: Not supported
Library Userenv
Parameter Information · lpProfileDir
[out] Pointer to a buffer that receives the path to the All Users profile directory.
· lpcchSize
[in/out] Specifies the size of the lpProfileDir buffer, in TCHARs.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:06 PM -
GetAncestor
The GetAncestor function retrieves the handle to the ancestor of the specified window.
VB4-32,5,6
Declare Function GetAncestor Lib "user32.dll" (ByVal hwnd As Long, ByVal gaFlags As Long) As Long
VB.NET
System.Windows.Forms.Form.Owner
Operating Systems Supported Requires Windows NT 4.0 SP4 or later; Requires Windows 98
Library User32
Parameter Information · hwnd
[in] Handle to the window whose ancestor is to be retrieved. If this parameter is the desktop window, the function returns NULL.
· gaFlags
[in] Specifies the ancestor to be retrieved. This parameter can be one of the following values.
GA_PARENT
Retrieves the parent window. This does not include the owner, as it does with the GetParent function.
GA_ROOT
Retrieves the root window by walking the chain of parent windows.
GA_ROOTOWNER
Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.
Return Values Friday, June 15, 2007 4:06 PM -
GetArcDirection
The GetArcDirection function returns the current arc direction for the specified device context. Arc and rectangle functions use the arc direction.
VB4-32,5,6
Declare Function GetArcDirection Lib "gdi32" Alias "GetArcDirection" (ByVal hdc As Long) As Long
VB.NET
System.Drawing.Graphics.DrawArc
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context.
Return Values If the function succeeds, the return value specifies the current arc direction. Following are the valid return values:
AD_COUNTERCLOCKWISE
Arcs and rectangles are drawn counterclockwise.
AD_CLOCKWISE
Arcs and rectangles are drawn clockwise.
If an error occurs, the return value is zero.Friday, June 15, 2007 4:06 PM -
GetAsyncKeyState
The GetAsyncKeyState function determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState.
VB4-32,5,6
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · vKey
Specifies one of 256 possible virtual-key codes.
Windows NT: You can use left- and right-distinguishing constants to specify certain keys. See the Remarks section for further information.
Windows 95: Windows 95 does not support the left- and right-distinguishing constants available on Windows NT.
Return Values If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. The return value is zero if a window in another thread or process currently has the keyboard focus.
Windows 95: Windows 95 does not support the left- and right-distinguishing constants. If you call GetAsyncKeyState on the Windows 95 platform with these constants, the return value is zero.Friday, June 15, 2007 4:06 PM -
GetBinaryType
The GetBinaryType function determines whether a file is executable, and if so, what type of executable file it is. That last property determines which subsystem an executable file runs under.
VB4-32,5,6
Declare Function GetBinaryType Lib "kernel32" Alias "GetBinaryTypeA" (ByVal lpApplicationName As String, lpBinaryType As Long) As Long
Operating Systems Supported Requires Windows NT 3.5(1) or later; Win9x/ME: Not supported
Library Kernel32
Parameter Information · lpApplicationName
Points to a null-terminated string that contains the fully qualified path of the file whose binary type the function shall determine.
· lpBinaryType
Points to a variable to receive information about the executable type of the file specified by lpApplicationName. The function adjusts a set of bit flags in this variable. The following bit flag constants are defined:
SCS_32BIT_BINARY
A Win32-based application
SCS_DOS_BINARY
An MS-DOS - based application
SCS_OS216_BINARY
A 16-bit OS/2-based application
SCS_PIF_BINARY
A PIF file that executes an MS-DOS - based application
SCS_POSIX_BINARY
A POSIX - based application
SCS_WOW_BINARY
A 16-bit Windows-based application
Return Values
If the function is not executable, or if the function fails, the return value is zero.Friday, June 15, 2007 4:07 PM -
GetBitmapBits
The GetBitmapBits function copies the bitmap bits of a specified bitmap into a buffer.
VB4-32,5,6
Declare Function GetBitmapBits Lib "gdi32" Alias "GetBitmapBits" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long
VB.NET
System.Drawing.Bitmap.LockBits
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hBitmap
Identifies the bitmap.
· dwCount
Length of the buffer.
· lpBits
Points to a buffer to receive the bitmap data.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:07 PM -
GetBkColor
The GetBkColor function returns the current background color for the specified device context.
VB4-32,5,6
Declare Function GetBkColor Lib "gdi32" Alias "GetBkColor" (ByVal hdc As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library Gdi32
Parameter Information · hdc
Identifies the device context whose background color is to be returned.
Return Values
If the function fails, the return value is CLR_INVALID.Friday, June 15, 2007 4:07 PM -
GetCaretBlinkTime
The GetCaretBlinkTime function returns the elapsed time, in milliseconds, required to invert the caret's pixels. The user can set this value using the Control Panel.
VB4-32,5,6
Declare Function GetCaretBlinkTime Lib "user32" Alias "GetCaretBlinkTime" () As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Return Values If the function succeeds, the return value is the blink time, in milliseconds.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:08 PM -
GetCaretBlinkTime
The GetCaretBlinkTime function returns the elapsed time, in milliseconds, required to invert the caret's pixels. The user can set this value using the Control Panel.
VB4-32,5,6
Declare Function GetCaretBlinkTime Lib "user32" Alias "GetCaretBlinkTime" () As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:08 PM -
GetClassInfo
The GetClassInfo function retrieves information about a window class.
VB4-32,5,6
Declare Function GetClassInfo Lib "user32" Alias "GetClassInfoA" (ByVal hInstance As Long, ByVal lpClassName As String, lpWndClass As WNDCLASS) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · hInstance
Identifies the instance of the application that created the class. To retrieve information about classes defined by Windows (such as buttons or list boxes), set this parameter to NULL.
· lpClassName
Points to a null-terminated string containing the class name. The name must be that of a preregistered class or a class registered by a previous call to the RegisterClass function. Alternatively, this parameter can be an integer atom. If so, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value less than 0xC000, must be in the low-order word of lpClassName; the high-order word must be zero.
· lpWndClass
Points to a WNDCLASS structure that receives the information about the class.
Return Values If the function finds a matching class and successfully copies the data, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:08 PM -
GetClassInfoEx
The GetClassInfoEx function retrieves information about a window class, including the handle of the small icon associated with the window class.
VB4-32,5,6
Declare Function GetClassInfoEx Lib "user32" Alias "GetClassInfoExA" (ByVal hInstance As Long, ByVal lpClassName As String, lpWndClass As WNDCLASSEX) As Long
Operating Systems Supported Requires Windows NT 3.5(1) or later; Requires Windows 95 or later
Library User32
Parameter Information · hinst
Identifies the instance of the application that created the class. To retrieve information about classes defined by Windows (such as buttons or list boxes), set this parameter to NULL.
· lpszClass
Points to a null-terminated string containing the class name. The name must be that of a preregistered class or a class registered by a previous call to the RegisterClass function. Alternatively, this parameter can be an integer atom. If this parameter is an integer atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value less than 0xC000, must be in the low-order word of lpszClass; the high-order word must be zero.
· lpwcx
Points to a WNDCLASSEX structure that receives the information about the class.
Return Values
If the function does not find a matching class and successfully copy the data, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:08 PM -
GetClassName
The GetClassName function retrieves the name of the class to which the specified window belongs.
VB4-32,5,6
Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · hWnd
Identifies the window and, indirectly, the class to which the window belongs.
· lpClassName
Points to the buffer that is to receive the class name string.
· nMaxCount
Specifies the length, in characters, of the buffer pointed to by the lpClassName parameter. The class name string is truncated if it is longer than the buffer.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:08 PM -
GetClientRect
The GetClientRect function retrieves the coordinates of a window’s client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window’s client area, the coordinates of the upper-left corner are (0,0).
VB4-32,5,6
Declare Function GetClientRect Lib "user32" Alias "GetClientRect" (ByVal hwnd As Long, lpRect As RECT) As Long
VB.NET
System.Windows.Forms.Form.ClientSize
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · hWnd
Identifies the window whose client coordinates are to be retrieved.
· lpRect
Points to a RECT structure that receives the client coordinates. The left and top members are zero. The right and bottom members contain the width and height of the window.
Return Values
If the function fails, the return value is zero. To get extended error information, call GetLastError.Friday, June 15, 2007 4:09 PM -
GetClipboardData
The GetClipboardData function retrieves data from the clipboard in a specified format. The clipboard must have been opened previously.
VB4-32,5,6
Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As Long
VB.NET
System.Windows.Forms.Clipboard
Operating Systems Supported Requires Windows NT 3.1 or later; Requires Windows 95 or later
Library User32
Parameter Information · uFormat
Specifies a clipboard format. For a description of the clipboard formats, see the SetClipboardData function.
Return Values
If the function fails, the return value is NULL. To get extended error information, call GetLastError.Friday, June 15, 2007 4:09 PM