' ---------------------------------------------------------------------
'
'    WIN32API.TXT -- Win32 API Declarations for WordBasic
'
'              Copyright (C) 1995 Microsoft Corporation
'
'
'  This file contains only the Declare statements for Win32 APIs. Note 
'  that declaring external functions in Window NT is case-sensitive. The
'  Declare statements shown in this file indicate the correct case.
'
'  You have a royalty-free right to use, modify, reproduce and 
'  distribute this file (and/or any modified version) in any way you 
'  find useful, provided that you agree that Microsoft has no warranty, 
'  obligation or liability for its contents.  Refer to the Microsoft 
'  Windows Programmer's Reference for further information.
'
' ---------------------------------------------------------------------
'
'  Kernel Section
Declare Function InterlockedIncrement Lib "kernel32" Alias "InterlockedIncrement"(lpAddend As Long) As Long
Declare Function InterlockedDecrement Lib "kernel32" Alias "InterlockedDecrement"(lpAddend As Long) As Long
Declare Function InterlockedExchange Lib "kernel32" Alias "InterlockedExchange"(Target As Long, Value As Long) As Long
'
' Loader Routines
Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA"(hModule As Long, lpFilename As String, nSize As Long) As Long
Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA"(lpModuleName As String) As Long
Declare Function SetProcessShutdownParameters Lib "kernel32" Alias "SetProcessShutdownParameters"(dwLevel As Long, dwFlags As Long) As Long
Declare Function GetProcessShutdownParameters Lib "kernel32" Alias "GetProcessShutdownParameters"(lpdwLevel As Long, lpdwFlags As Long) As Long
Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA"(uAction As Long, lpMessageText As String)
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA"() As String
Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA"(lpName As String, lpBuffer As String, nSize As Long) As Long
Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA"(lpName As String, lpValue As String) As Long
Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias "ExpandEnvironmentStringsA"(lpSrc As String, lpDst As String, nSize As Long) As Long
Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA"(lpLibFileName As String) As Long
Declare Sub FreeLibrary Lib "kernel32" Alias "FreeLibrary"(hLibModule As Long)
Declare Function WinExec Lib "kernel32" Alias "WinExec"(lpCmdLine As String, nCmdShow As Long) As Long
Declare Sub DebugBreak Lib "kernel32" Alias "DebugBreak"()
Declare Function ContinueDebugEvent Lib "kernel32" Alias "ContinueDebugEvent"(dwProcessId As Long, dwThreadId As Long, dwContinueStatus As Long) As Long
Declare Function DebugActiveProcess Lib "kernel32" Alias "DebugActiveProcess"(dwProcessId As Long) As Long
Declare Function SetEvent Lib "kernel32" Alias "SetEvent"(hEvent As Long) As Long
Declare Function ResetEvent Lib "kernel32" Alias "ResetEvent"(hEvent As Long) As Long
Declare Function PulseEvent Lib "kernel32" Alias "PulseEvent"(hEvent As Long) As Long
Declare Function ReleaseSemaphore Lib "kernel32" Alias "ReleaseSemaphore"(hSemaphore As Long, lReleaseCount As Long, lpPreviousCount As Long) As Long
Declare Function ReleaseMutex Lib "kernel32" Alias "ReleaseMutex"(hMutex As Long) As Long
Declare Function WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject"(hHandle As Long, dwMilliseconds As Long) As Long
Declare Function WaitForMultipleObjects Lib "kernel32" Alias "WaitForMultipleObjects"(nCount As Long, lpHandles As Long, bWaitAll As Long, dwMilliseconds As Long) As Long
Declare Sub Sleep Lib "kernel32" Alias "Sleep"(dwMilliseconds As Long)
Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA"(lpOutputString As String)
Declare Function GetVersion Lib "kernel32" Alias "GetVersion"() As Long
Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA"(cDriveLetter As Long, lpPrefixString As String, wUnique As Long, lpTempFileName As String) As Long
Declare Function SetHandleCount Lib "kernel32" Alias "SetHandleCount"(wNumber As Long) As Long
Declare Function GetLogicalDrives Lib "kernel32" Alias "GetLogicalDrives"() As Long
Declare Function LockFile Lib "kernel32" Alias "LockFile"(hFile As Long, dwFileOffsetLow As Long, dwFileOffsetHigh As Long, nNumberOfBytesToLockLow As Long, nNumberOfBytesToLockHigh As Long) As Long
Declare Function UnlockFile Lib "kernel32" Alias "UnlockFile"(hFile As Long, dwFileOffsetLow As Long, dwFileOffsetHigh As Long, nNumberOfBytesToUnlockLow As Long, nNumberOfBytesToUnlockHigh As Long) As Long
Declare Function GetFileType Lib "kernel32" Alias "GetFileType"(hFile As Long) As Long
Declare Function GetFileSize Lib "kernel32" Alias "GetFileSize"(hFile As Long, lpFileSizeHigh As Long) As Long
Declare Function GetStdHandle Lib "kernel32" Alias "GetStdHandle"(nStdHandle As Long) As Long
Declare Function SetStdHandle Lib "kernel32" Alias "SetStdHandle"(nStdHandle As Long, nHandle As Long) As Long
Declare Function FlushFileBuffers Lib "kernel32" Alias "FlushFileBuffers"(hFile As Long) As Long
Declare Function SetEndOfFile Lib "kernel32" Alias "SetEndOfFile"(hFile As Long) As Long
Declare Function SetFilePointer Lib "kernel32" Alias "SetFilePointer"(hFile As Long, lDistanceToMove As Long, lpDistanceToMoveHigh As Long, dwMoveMethod As Long) As Long
Declare Function FindClose Lib "kernel32" Alias "FindClose"(hFindFile As Long) As Long
Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle"(hObject As Long) As Long
Declare Function DuplicateHandle Lib "kernel32" Alias "DuplicateHandle"(hSourceProcessHandle As Long, hSourceHandle As Long, hTargetProcessHandle As Long, lpTargetHandle As Long, dwDesiredAccess As Long, bInheritHandle As Long, dwOptions As Long) As Long
Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA"(nDrive As Long) As Long
Declare Function GlobalAlloc Lib "kernel32" Alias "GlobalAlloc"(wFlags As Long, dwBytes As Long) As Long
Declare Function GlobalCompact Lib "kernel32" Alias "GlobalCompact"(dwMinFree As Long) As Long
Declare Function GlobalFree Lib "kernel32" Alias "GlobalFree"(hMem As Long) As Long
Declare Function GlobalHandle Lib "kernel32" Alias "GlobalHandle"(wMem As Long) As Long
Declare Function GlobalLock Lib "kernel32" Alias "GlobalLock"(hMem As Long) As Long
Declare Function GlobalReAlloc Lib "kernel32" Alias "GlobalReAlloc"(hMem As Long, dwBytes As Long, wFlags As Long) As Long
Declare Function GlobalSize Lib "kernel32" Alias "GlobalSize"(hMem As Long) As Long
Declare Function GlobalUnlock Lib "kernel32" Alias "GlobalUnlock"(hMem As Long) As Long
Declare Function GlobalFlags Lib "kernel32" Alias "GlobalFlags"(hMem As Long) As Long
Declare Function GlobalWire Lib "kernel32" Alias "GlobalWire"(hMem As Long) As Long
Declare Function GlobalUnWire Lib "kernel32" Alias "GlobalUnWire"(hMem As Long) As Long
Declare Sub GlobalFix Lib "kernel32" Alias "GlobalFix"(hMem As Long)
Declare Function GlobalUnfix Lib "kernel32" Alias "GlobalUnfix"(hMem As Long) As Long
Declare Function LocalAlloc Lib "kernel32" Alias "LocalAlloc"(wFlags As Long, wBytes As Long) As Long
Declare Function LocalCompact Lib "kernel32" Alias "LocalCompact"(wMinFree As Long) As Long
Declare Function LocalFree Lib "kernel32" Alias "LocalFree"(hMem As Long) As Long
Declare Function LocalShrink Lib "kernel32" Alias "LocalShrink"(hMem As Long, cbNewSize As Long) As Long
Declare Function LocalHandle Lib "kernel32" Alias "LocalHandle"(wMem As Long) As Long
Declare Function LocalLock Lib "kernel32" Alias "LocalLock"(hMem As Long) As Long'(returns a near pointer)
Declare Function LocalReAlloc Lib "kernel32" Alias "LocalReAlloc"(hMem As Long, wBytes As Long, wFlags As Long) As Long
Declare Function LocalSize Lib "kernel32" Alias "LocalSize"(hMem As Long) As Long
Declare Function LocalUnlock Lib "kernel32" Alias "LocalUnlock"(hMem As Long) As Long
Declare Function LocalFlags Lib "kernel32" Alias "LocalFlags"(hMem As Long) As Long
Declare Function HeapCreate Lib "kernel32" Alias "HeapCreate"(flOptions As Long, dwInitialSize As Long, dwMaximumSize As Long) As Long
Declare Function HeapDestroy Lib "kernel32" Alias "HeapDestroy"(hHeap As Long) As Long
Declare Sub HeapAlloc Lib "kernel32" Alias "HeapAlloc"(hHeap As Long, dwFlags As Long, dwBytes As Long)
Declare Function HeapSize Lib "kernel32" Alias "HeapSize"(hHeap As Long, dwFlags As Long, lpMem As Long) As Long
Declare Function GetProcessHeap Lib "kernel32" Alias "GetProcessHeap"() As Long
Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess"(dwDesiredAccess As Long, bInheritHandle As Long, dwProcessId As Long) As Long
Declare Function GetCurrentProcess Lib "kernel32" Alias "GetCurrentProcess"() As Long
Declare Function GetCurrentProcessId Lib "kernel32" Alias "GetCurrentProcessId"() As Long
Declare Sub ExitProcess Lib "kernel32" Alias "ExitProcess"(uExitCode As Long)
Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess"(hProcess As Long, uExitCode As Long) As Long
Declare Function GetExitCodeProcess Lib "kernel32" Alias "GetExitCodeProcess"(hProcess As Long, lpExitCode As Long) As Long
Declare Function GetLastError Lib "kernel32" Alias "GetLastError"() As Long
Declare Sub SetLastError Lib "kernel32" Alias "SetLastError"(dwErrCode As Long)
Declare Sub SetLastErrorEx Lib "user32" Alias "SetLastErrorEx"(dwErrCode As Long, dwType As Long)
Declare Sub SetDebugErrorLevel Lib "user32" Alias "SetDebugErrorLevel"(dwLevel As Long)
Declare Function SetErrorMode Lib "kernel32" Alias "SetErrorMode"(wMode As Long) As Long
Declare Function SuspendThread Lib "kernel32" Alias "SuspendThread"(hThread As Long) As Long
Declare Function ResumeThread Lib "kernel32" Alias "ResumeThread"(hThread As Long) As Long
Declare Function FindResourceEx Lib "kernel32" Alias "FindResourceExA"(hModule As Long, lpType As String, lpName As String, wLanguage As Long) As Long
Declare Function BeginUpdateResource Lib "kernel32" Alias "BeginUpdateResourceA"(pFileName As String, bDeleteExistingResources As Long) As Long
Declare Function EndUpdateResource Lib "kernel32" Alias "EndUpdateResourceA"(hUpdate As Long, fDiscard As Long) As Long
Declare Function LoadResource Lib "kernel32" Alias "LoadResource"(hInstance As Long, hResInfo As Long) As Long
Declare Function FreeResource Lib "kernel32" Alias "FreeResource"(hResData As Long) As Long
Declare Function LockResource Lib "kernel32" Alias "LockResource"(hResData As Long) As Long
Declare Function SizeofResource Lib "kernel32" Alias "SizeofResource"(hInstance As Long, hResInfo As Long) As Long
Declare Function InitAtomTable Lib "kernel32" Alias "InitAtomTable"(nSize As Long) As Long
Declare Function AddAtom Lib "kernel32" Alias "AddAtomA"(lpString As String) As Long
Declare Function DeleteAtom Lib "kernel32" Alias "DeleteAtom"(nAtom As Long) As Long
Declare Function FindAtom Lib "kernel32" Alias "FindAtomA"(lpString As String) As Long
Declare Function GetAtomName Lib "kernel32" Alias "GetAtomNameA"(nAtom As Long, lpBuffer As String, nSize As Long) As Long
Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA"(lpString As String) As Long
Declare Function GlobalDeleteAtom Lib "kernel32" Alias "GlobalDeleteAtom"(nAtom As Long) As Long
Declare Function GlobalFindAtom Lib "kernel32" Alias "GlobalFindAtomA"(lpString As String) As Long
Declare Function GlobalGetAtomName Lib "kernel32" Alias "GlobalGetAtomNameA"(nAtom As Long, lpbuffer As String, nSize As Long) As Long
'
' User Profile Routines
Declare Function GetProfileInt Lib "kernel32" Alias "GetProfileIntA"(lpAppName As String, lpKeyName As String, nDefault As Long) As Long
Declare Function GetProfileSection Lib "kernel32" Alias "GetProfileSectionA"(lpAppName As String, lpReturnedString As String, nSize As Long) As Long
Declare Function WriteProfileSection Lib "kernel32" Alias "WriteProfileSectionA"(lpAppName As String, lpString As String) As Long
Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA"(lpApplicationName As String, lpKeyName As String, nDefault As Long, lpFileName As String) As Long
Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA"(lpAppName As String, lpReturnedString As String, nSize As Long, lpFileName As String) As Long
Declare Function WritePrivateProfileSection Lib "kernel32" Alias "WritePrivateProfileSectionA"(lpAppName As String, lpString As String, lpFileName As String) As Long
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA"(lpBuffer As String, nSize As Long) As Long
Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA"(lpBuffer As String, nSize As Long) As Long
Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA"(nBufferLength As Long, lpBuffer As String) As Long
Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA"(lpPathName As String) As Long
Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA"(lpRootPathname As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long
Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA"(lpPathName As String) As Long
Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA"(lpFilename As String, nBufferLength As Long, lpBuffer As String, lpFilePart As String) As Long
Declare Function DefineDosDevice Lib "kernel32" Alias "DefineDosDeviceA"(dwFlags As Long, lpDeviceName As String, lpTargetPath As String) As Long
Declare Function QueryDosDevice Lib "kernel32" Alias "QueryDosDeviceA"(lpDeviceName As String, lpTargetPath As String, ucchMax As Long) As Long
Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA"(lpFileName As String, dwFileAttributes As Long) As Long
Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA"(lpFileName As String) As Long
Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA"(lpFileName As String) As Long
Declare Function SearchPath Lib "kernel32" Alias "SearchPathA"(lpPath As String, lpFileName As String, lpExtension As String, nBufferLength As Long, lpBuffer As String, lpFilePart As String) As Long
Declare Function MoveFile Lib "kernel32" Alias "MoveFileA"(lpExistingFileName As String, lpNewFileName As String) As Long
Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA"(lpExistingFileName As String, lpNewFileName As String, dwFlags As Long) As Long
Declare Function GetNamedPipeHandleState Lib "kernel32" Alias "GetNamedPipeHandleStateA"(hNamedPipe As Long, lpState As Long, lpCurInstances As Long, lpMaxCollectionCount As Long, lpCollectDataTimeout As Long, lpUserName As String, nMaxUserNameSize As Long) As Long
Declare Function WaitNamedPipe Lib "kernel32" Alias "WaitNamedPipeA"(lpNamedPipeName As String, nTimeOut As Long) As Long
Declare Function SetVolumeLabel Lib "kernel32" Alias "SetVolumeLabelA"(lpRootPathName As String, lpVolumeName As String) As Long
Declare Sub SetFileApisToOEM Lib "kernel32" Alias "SetFileApisToOEM"()
Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA"(lpRootPathName As String, lpVolumeNameBuffer As String, nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, lpFileSystemNameBuffer As String, nFileSystemNameSize As Long) As Long
'
' Security APIs
Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA"(lpPathName As String, bWatchSubtree As Long, dwNotifyFilter As Long) As Long
Declare Function FindNextChangeNotification Lib "kernel32" Alias "FindNextChangeNotification"(hChangeHandle As Long) As Long
Declare Function FindCloseChangeNotification Lib "kernel32" Alias "FindCloseChangeNotification"(hChangeHandle As Long) As Long
Declare Function SetPriorityClass Lib "kernel32" Alias "SetPriorityClass"(hProcess As Long, dwPriorityClass As Long) As Long
Declare Function GetPriorityClass Lib "kernel32" Alias "GetPriorityClass"(hProcess As Long) As Long
Declare Sub FatalExit Lib "kernel32" Alias "FatalExit"(Code As Long)
Declare Sub GetEnvironmentStrings Lib "kernel32" Alias "GetEnvironmentStringsA"()
Declare Sub RaiseException Lib "kernel32" Alias "RaiseException"(dwExceptionCode As Long, dwExceptionFlags As Long, nNumberOfArguments As Long, lpArguments As Long)
Declare Function GetCurrentThread Lib "kernel32" Alias "GetCurrentThread"() As Long
Declare Function GetCurrentThreadId Lib "kernel32" Alias "GetCurrentThreadId"() As Long
Declare Function SetThreadPriority Lib "kernel32" Alias "SetThreadPriority"(hThread As Long, nPriority As Long) As Long
Declare Function GetThreadPriority Lib "kernel32" Alias "GetThreadPriority"(hThread As Long) As Long
Declare Sub ExitThread Lib "kernel32" Alias "ExitThread"(dwExitCode As Long)
Declare Function TerminateThread Lib "kernel32" Alias "TerminateThread"(hThread As Long, dwExitCode As Long) As Long
Declare Function GetExitCodeThread Lib "kernel32" Alias "GetExitCodeThread"(hThread As Long, lpExitCode As Long) As Long
Declare Function PurgeComm Lib "kernel32" Alias "PurgeComm"(hFile As Long, dwFlags As Long) As Long
Declare Function TransmitCommChar Lib "kernel32" Alias "TransmitCommChar"(nCid As Long, cChar As Long) As Long
Declare Function SetCommBreak Lib "kernel32" Alias "SetCommBreak"(nCid As Long) As Long
Declare Function SetCommMask Lib "kernel32" Alias "SetCommMask"(hFile As Long, dwEvtMask As Long) As Long
Declare Function ClearCommBreak Lib "kernel32" Alias "ClearCommBreak"(nCid As Long) As Long
Declare Function SetupComm Lib "kernel32" Alias "SetupComm"(hFile As Long, dwInQueue As Long, dwOutQueue As Long) As Long
Declare Function EscapeCommFunction Lib "kernel32" Alias "EscapeCommFunction"(nCid As Long, nFunc As Long) As Long
Declare Function GetCommMask Lib "kernel32" Alias "GetCommMask"(hFile As Long, lpEvtMask As Long) As Long
Declare Function GetCommModemStatus Lib "kernel32" Alias "GetCommModemStatus"(hFile As Long, lpModemStat As Long) As Long
Declare Function SetTapePosition Lib "kernel32" Alias "SetTapePosition"(hDevice As Long, dwPositionMethod As Long, dwPartition As Long, dwOffsetLow As Long, dwOffsetHigh As Long, bImmediate As Long) As Long
Declare Function GetTapePosition Lib "kernel32" Alias "GetTapePosition"(hDevice As Long, dwPositionType As Long, lpdwPartition As Long, lpdwOffsetLow As Long, lpdwOffsetHigh As Long) As Long
Declare Function PrepareTape Lib "kernel32" Alias "PrepareTape"(hDevice As Long, dwOperation As Long, bImmediate As Long) As Long
Declare Function EraseTape Lib "kernel32" Alias "EraseTape"(hDevice As Long, dwEraseType As Long, bImmediate As Long) As Long
Declare Function CreateTapePartition Lib "kernel32" Alias "CreateTapePartition"(hDevice As Long, dwPartitionMethod As Long, dwCount As Long, dwSize As Long) As Long
Declare Function WriteTapemark Lib "kernel32" Alias "WriteTapemark"(hDevice As Long, dwTapemarkType As Long, dwTapemarkCount As Long, bImmediate As Long) As Long
Declare Function GetTapeStatus Lib "kernel32" Alias "GetTapeStatus"(hDevice As Long) As Long
Declare Function MulDiv Lib "kernel32" Alias "MulDiv"(nNumber As Long, nNumerator As Long, nDenominator As Long) As Long
'
' Routines to convert back and forth between system time and file time
Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount"() As Long
Declare Function DisconnectNamedPipe Lib "kernel32" Alias "DisconnectNamedPipe"(hNamedPipe As Long) As Long
Declare Function SetNamedPipeHandleState Lib "kernel32" Alias "SetNamedPipeHandleState"(hNamedPipe As Long, lpMode As Long, lpMaxCollectionCount As Long, lpCollectDataTimeout As Long) As Long
Declare Function GetNamedPipeInfo Lib "kernel32" Alias "GetNamedPipeInfo"(hNamedPipe As Long, lpFlags As Long, lpOutBufferSize As Long, lpInBufferSize As Long, lpMaxInstances As Long) As Long
Declare Function GetMailslotInfo Lib "kernel32" Alias "GetMailslotInfo"(hMailslot As Long, lpMaxMessageSize As Long, lpNextSize As Long, lpMessageCount As Long, lpReadTimeout As Long) As Long
Declare Function SetMailslotInfo Lib "kernel32" Alias "SetMailslotInfo"(hMailslot As Long, lReadTimeout As Long) As Long
Declare Function TlsAlloc Lib "kernel32" Alias "TlsAlloc"() As Long
Declare Function TlsFree Lib "kernel32" Alias "TlsFree"(dwTlsIndex As Long) As Long
Declare Function SleepEx Lib "kernel32" Alias "SleepEx"(dwMilliseconds As Long, bAlertable As Long) As Long
Declare Function WaitForSingleObjectEx Lib "kernel32" Alias "WaitForSingleObjectEx"(hHandle As Long, dwMilliseconds As Long, bAlertable As Long) As Long
Declare Function WaitForMultipleObjectsEx Lib "kernel32" Alias "WaitForMultipleObjectsEx"(nCount As Long, lpHandles As Long, bWaitAll As Long, dwMilliseconds As Long, bAlertable As Long) As Long
'
'  Dual Mode API below this line
Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA"(dwDesiredAccess As Long, bInheritHandle As Long, lpName As String) As Long
Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA"(dwDesiredAccess As Long, bInheritHandle As Long, lpName As String) As Long
Declare Function OpenSemaphore Lib "kernel32" Alias "OpenSemaphoreA"(dwDesiredAccess As Long, bInheritHandle As Long, lpName As String) As Long
Declare Function OpenFileMapping Lib "kernel32" Alias "OpenFileMappingA"(dwDesiredAccess As Long, bInheritHandle As Long, lpName As String) As Long
Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA"(nBufferLength As Long, lpBuffer As String) As Long
Declare Function IsBadStringPtr Lib "kernel32" Alias "IsBadStringPtrA"(lpsz As String, ucchMax As Long) As Long
Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA"(lpBuffer As String, nSize As Long) As Long
Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA"(lpComputerName As String) As Long
'
' Code Page Dependent APIs
Declare Function IsValidCodePage Lib "kernel32" Alias "IsValidCodePage"(CodePage As Long) As Long
Declare Function GetACP Lib "kernel32" Alias "GetACP"() As Long
Declare Function GetOEMCP Lib "kernel32" Alias "GetOEMCP"() As Long
Declare Function IsDBCSLeadByte Lib "kernel32" Alias "IsDBCSLeadByte"(bTestChar As Integer) As Long
Declare Function MultiByteToWideChar Lib "kernel32" Alias "MultiByteToWideChar"(CodePage As Long, dwFlags As Long, lpMultiByteStr As String, cchMultiByte As Long, lpWideCharStr As String, cchWideChar As Long) As Long
Declare Function WideCharToMultiByte Lib "kernel32" Alias "WideCharToMultiByte"(CodePage As Long, dwFlags As Long, lpWideCharStr As String, cchWideChar As Long, lpMultiByteStr As String, cchMultiByte As Long, lpDefaultChar As String, lpUsedDefaultChar As Long) As Long
'
' Locale Dependent APIs
Declare Function CompareString Lib "kernel32" Alias "CompareStringA"(Locale As String, dwCmpFlags As Long, lpString1 As String, cchCount1 As Long, lpString2 As String, cchCount2 As Long) As Long
Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA"(Locale As String, dwMapFlags As Long, lpSrcStr As String, cchSrc As Long, lpDestStr As String, cchDest As Long) As Long
Declare Function GetThreadLocale Lib "kernel32" Alias "GetThreadLocale"() As String
Declare Function SetThreadLocale Lib "kernel32" Alias "SetThreadLocale"(Locale As String) As Long
Declare Function GetSystemDefaultLangID Lib "kernel32" Alias "GetSystemDefaultLangID"() As String
Declare Function GetUserDefaultLangID Lib "kernel32" Alias "GetUserDefaultLangID"() As String
Declare Function GetSystemDefaultLCID Lib "kernel32" Alias "GetSystemDefaultLCID"() As String
Declare Function GetUserDefaultLCID Lib "kernel32" Alias "GetUserDefaultLCID"() As String
'
' Locale Independent APIs
Declare Function GetStringType Lib "kernel32" Alias "GetStringTypeA"(dwInfoType As Long, lpSrcStr As String, cchSrc As Long, lpCharType As Long) As Long
Declare Function FoldString Lib "kernel32" Alias "FoldStringA"(dwMapFlags As Long, lpSrcStr As String, cchSrc As Long, lpDestStr As String, cchDest As Long) As Long
'
' The following section contains procedures exported by the NT console subsystem.
Declare Function GetConsoleMode Lib "kernel32" Alias "GetConsoleMode"(hConsoleHandle As Long, lpMode As Long) As Long
Declare Function GetNumberOfConsoleInputEvents Lib "kernel32" Alias "GetNumberOfConsoleInputEvents"(hConsoleInput As Long, lpNumberOfEvents As Long) As Long
Declare Function GetNumberOfConsoleMouseButtons Lib "kernel32" Alias "GetNumberOfConsoleMouseButtons"(lpNumberOfMouseButtons As Long) As Long
Declare Function SetConsoleMode Lib "kernel32" Alias "SetConsoleMode"(hConsoleHandle As Long, dwMode As Long) As Long
Declare Function SetConsoleActiveScreenBuffer Lib "kernel32" Alias "SetConsoleActiveScreenBuffer"(hConsoleOutput As Long) As Long
Declare Function FlushConsoleInputBuffer Lib "kernel32" Alias "FlushConsoleInputBuffer"(hConsoleInput As Long) As Long
Declare Function SetConsoleTextAttribute Lib "kernel32" Alias "SetConsoleTextAttribute"(hConsoleOutput As Long, wAttributes As Long) As Long
Declare Function GenerateConsoleCtrlEvent Lib "kernel32" Alias "GenerateConsoleCtrlEvent"(dwCtrlEvent As Long, dwProcessGroupId As Long) As Long
Declare Function AllocConsole Lib "kernel32" Alias "AllocConsole"() As Long
Declare Function FreeConsole Lib "kernel32" Alias "FreeConsole"() As Long
Declare Function GetConsoleTitle Lib "kernel32" Alias "GetConsoleTitleA"(lpConsoleTitle As String, nSize As Long) As Long
Declare Function SetConsoleTitle Lib "kernel32" Alias "SetConsoleTitleA"(lpConsoleTitle As String) As Long
Declare Function GetConsoleCP Lib "kernel32" Alias "GetConsoleCP"() As Long
Declare Function SetConsoleCP Lib "kernel32" Alias "SetConsoleCP"(wCodePageID As Long) As Long
Declare Function GetConsoleOutputCP Lib "kernel32" Alias "GetConsoleOutputCP"() As Long
Declare Function SetConsoleOutputCP Lib "kernel32" Alias "SetConsoleOutputCP"(wCodePageID As Long) As Long
'
' -------------
'  GDI Section
' -------------
Declare Function Arc Lib "gdi32" Alias "Arc"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long, X4 As Long, Y4 As Long) As Long
Declare Function BitBlt Lib "gdi32" Alias "BitBlt"(hDestDC As Long, X As Long, Y As Long, nWidth As Long, nHeight As Long, hSrcDC As Long, XSrc As Long, YSrc As Long, dwRop As Long) As Long
Declare Function CancelDC Lib "gdi32" Alias "CancelDC"(hdc As Long) As Long
Declare Function Chord Lib "gdi32" Alias "Chord"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long, X4 As Long, Y4 As Long) As Long
Declare Function CloseMetaFile Lib "gdi32" Alias "CloseMetaFile"(hMF As Long) As Long
Declare Function CombineRgn Lib "gdi32" Alias "CombineRgn"(hDestRgn As Long, hSrcRgn1 As Long, hSrcRgn2 As Long, nCombineMode As Long) As Long
Declare Function CopyMetaFile Lib "gdi32" Alias "CopyMetaFileA"(hMF As Long, lpFilename As String) As Long
Declare Function CreateCompatibleBitmap Lib "gdi32" Alias "CreateCompatibleBitmap"(hDC As Long, nWidth As Long, nHeight As Long) As Long
Declare Function CreateDiscardableBitmap Lib "gdi32" Alias "CreateDiscardableBitmap"(hDC As Long, nWidth As Long, nHeight As Long) As Long
Declare Function CreateCompatibleDC Lib "gdi32" Alias "CreateCompatibleDC"(hDC As Long) As Long
Declare Function CreateDC Lib "gdi32" Alias "CreateDCA"(lpDriverName As String, lpDeviceName As String, lpOutput As String, lpInitData As String) As Long
Declare Function CreateDIBPatternBrush Lib "gdi32" Alias "CreateDIBPatternBrush"(hPackedDIB As Long, wUsage As Long) As Long
Declare Function CreateEllipticRgn Lib "gdi32" Alias "CreateEllipticRgn"(X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Long
Declare Function CreateHatchBrush Lib "gdi32" Alias "CreateHatchBrush"(nIndex As Long, crColor As Long) As Long
Declare Function CreateIC Lib "gdi32" Alias "CreateICA"(lpDriverName As String, lpDeviceName As String, lpOutput As String, lpInitData As String) As Long
Declare Function CreatePen Lib "gdi32" Alias "CreatePen"(nPenStyle As Long, nWidth As Long, crColor As Long) As Long
Declare Function CreateRectRgn Lib "gdi32" Alias "CreateRectRgn"(X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Long
Declare Function CreatePatternBrush Lib "gdi32" Alias "CreatePatternBrush"(hBitmap As Long) As Long
Declare Function CreateRoundRectRgn Lib "gdi32" Alias "CreateRoundRectRgn"(X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long) As Long
Declare Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush"(crColor As Long) As Long
Declare Function DeleteDC Lib "gdi32" Alias "DeleteDC"(hDC As Long) As Long
Declare Function DeleteObject Lib "gdi32" Alias "DeleteObject"(hObject As Long) As Long
Declare Function DeleteMetaFile Lib "gdi32" Alias "DeleteMetaFile"(hMF As Long) As Long
Declare Function Ellipse Lib "gdi32" Alias "Ellipse"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Long
Declare Function EqualRgn Lib "gdi32" Alias "EqualRgn"(hSrcRgn1 As Long, hSrcRgn2 As Long) As Long
Declare Function ExtEscape Lib "gdi32" Alias "ExtEscape"(hdc As Long, nEscape As Long, cbInput As Long, lpszInData As String, cbOutput As Long, lpszOutData As String) As Long
Declare Function DrawEscape Lib "gdi32" Alias "DrawEscape"(hdc As Long, nEscape As Long, cbInput As Long, lpszInData As String) As Long
Declare Function ExcludeClipRect Lib "gdi32" Alias "ExcludeClipRect"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Long
Declare Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill"(hDC As Long, X As Long, Y As Long, crColor As Long, wFillType As Long) As Long
Declare Function FillRgn Lib "gdi32" Alias "FillRgn"(hDC As Long, hRgn As Long, hBrush As Long) As Long
Declare Function FrameRgn Lib "gdi32" Alias "FrameRgn"(hDC As Long, hRgn As Long, hBrush As Long, nWidth As Long, nHeight As Long) As Long
Declare Function FloodFill Lib "gdi32" Alias "FloodFill"(hDC As Long, X As Long, Y As Long, crColor As Long) As Long
Declare Function GetROP2 Lib "gdi32" Alias "GetROP2"(hDC As Long) As Long
Declare Function GetBkColor Lib "gdi32" Alias "GetBkColor"(hDC As Long) As Long
Declare Function GetBkMode Lib "gdi32" Alias "GetBkMode"(hDC As Long) As Long
Declare Function GetCharWidth Lib "gdi32" Alias "GetCharWidthA"(hDC As Long, wFirstChar As Long, wLastChar As Long, lpBuffer As Long) As Long
Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A"(hdc As Long, iFirstChar As Long, iLastChar As Long, lpBuffer As Long) As Long
Declare Function GetClipRgn Lib "gdi32" Alias "GetClipRgn"(hdc As Long, hrgn As Long) As Long
Declare Function GetMetaRgn Lib "gdi32" Alias "GetMetaRgn"(hdc As Long, hrgn As Long) As Long
Declare Function GetCurrentObject Lib "gdi32" Alias "GetCurrentObject"(hdc As Long, uObjectType As Long) As Long
Declare Function GetDeviceCaps Lib "gdi32" Alias "GetDeviceCaps"(hDC As Long, nIndex As Long) As Long
Declare Function GetGraphicsMode Lib "gdi32" Alias "GetGraphicsMode"(hdc As Long) As Long
Declare Function GetMapMode Lib "gdi32" Alias "GetMapMode"(hDC As Long) As Long
Declare Function GetMetaFile Lib "gdi32" Alias "GetMetaFileA"(lpFilename As String) As Long
Declare Function GetNearestColor Lib "gdi32" Alias "GetNearestColor"(hDC As Long, crColor As Long) As Long
Declare Function GetNearestPaletteIndex Lib "gdi32" Alias "GetNearestPaletteIndex"(hPalette As Long, crColor As Long) As Long
Declare Function GetObjectType Lib "gdi32" Alias "GetObjectType"(hgdiobj As Long) As Long
Declare Function GetPixel Lib "gdi32" Alias "GetPixel"(hDC As Long, X As Long, Y As Long) As Long
Declare Function GetPolyFillMode Lib "gdi32" Alias "GetPolyFillMode"(hDC As Long) As Long
Declare Function GetStockObject Lib "gdi32" Alias "GetStockObject"(nIndex As Long) As Long
Declare Function GetStretchBltMode Lib "gdi32" Alias "GetStretchBltMode"(hDC As Long) As Long
Declare Function GetSystemPaletteUse Lib "gdi32" Alias "GetSystemPaletteUse"(hDC As Long) As Long
Declare Function GetTextAlign Lib "gdi32" Alias "GetTextAlign"(hDC As Long) As Long
Declare Function GetTextColor Lib "gdi32" Alias "GetTextColor"(hDC As Long) As Long
Declare Function IntersectClipRect Lib "gdi32" Alias "IntersectClipRect"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Long
Declare Function InvertRgn Lib "gdi32" Alias "InvertRgn"(hDC As Long, hRgn As Long) As Long
Declare Function LineTo Lib "gdi32" Alias "LineTo"(hDC As Long, X As Long, Y As Long) As Long
Declare Function MaskBlt Lib "gdi32" Alias "MaskBlt"(hdcDest As Long, nXDest As Long, nYDest As Long, nWidth As Long, nHeight As Long, hdcSrc As Long, nXSrc As Long, nYSrc As Long, hbmMask As Long, xMask As Long, yMask As Long, dwRop As Long) As Long
Declare Function OffsetClipRgn Lib "gdi32" Alias "OffsetClipRgn"(hDC As Long, X As Long, Y As Long) As Long
Declare Function OffsetRgn Lib "gdi32" Alias "OffsetRgn"(hRgn As Long, X As Long, Y As Long) As Long
Declare Function PatBlt Lib "gdi32" Alias "PatBlt"(hDC As Long, X As Long, Y As Long, nWidth As Long, nHeight As Long, dwRop As Long) As Long
Declare Function Pie Lib "gdi32" Alias "Pie"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long, X4 As Long, Y4 As Long) As Long
Declare Function PlayMetaFile Lib "gdi32" Alias "PlayMetaFile"(hDC As Long, hMF As Long) As Long
Declare Function PaintRgn Lib "gdi32" Alias "PaintRgn"(hDC As Long, hRgn As Long) As Long
Declare Function PtInRegion Lib "gdi32" Alias "PtInRegion"(hRgn As Long, X As Long, Y As Long) As Long
Declare Function PtVisible Lib "gdi32" Alias "PtVisible"(hDC As Long, X As Long, Y As Long) As Long
Declare Function Rectangle Lib "gdi32" Alias "Rectangle"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long) As Long
Declare Function RestoreDC Lib "gdi32" Alias "RestoreDC"(hDC As Long, nSavedDC As Long) As Long
Declare Function RoundRect Lib "gdi32" Alias "RoundRect"(hDC As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long) As Long
Declare Function ResizePalette Lib "gdi32" Alias "ResizePalette"(hPalette As Long, nNumEntries As Long) As Long
Declare Function SaveDC Lib "gdi32" Alias "SaveDC"(hDC As Long) As Long
Declare Function SelectClipRgn Lib "gdi32" Alias "SelectClipRgn"(hDC As Long, hRgn As Long) As Long
Declare Function ExtSelectClipRgn Lib "gdi32" Alias "ExtSelectClipRgn"(hdc As Long, hrgn As Long, fnMode As Long) As Long
Declare Function SetMetaRgn Lib "gdi32" Alias "SetMetaRgn"(hdc As Long) As Long
Declare Function SelectObject Lib "gdi32" Alias "SelectObject"(hDC As Long, hObject As Long) As Long
Declare Function SetBkColor Lib "gdi32" Alias "SetBkColor"(hDC As Long, crColor As Long) As Long
Declare Function SetBkMode Lib "gdi32" Alias "SetBkMode"(hDC As Long, nBkMode As Long) As Long
Declare Function SetMapperFlags Lib "gdi32" Alias "SetMapperFlags"(hDC As Long, dwFlag As Long) As Long
Declare Function SetGraphicsMode Lib "gdi32" Alias "SetGraphicsMode"(hdc As Long, iMode As Long) As Long
Declare Function SetMapMode Lib "gdi32" Alias "SetMapMode"(hDC As Long, nMapMode As Long) As Long
Declare Function SetMetaFileBitsEx Lib "gdi32" Alias "SetMetaFileBitsEx"(nSize As Long, lpData As Integer) As Long
Declare Function SetPixel Lib "gdi32" Alias "SetPixel"(hDC As Long, X As Long, Y As Long, crColor As Long) As Long
Declare Function SetPolyFillMode Lib "gdi32" Alias "SetPolyFillMode"(hDC As Long, nPolyFillMode As Long) As Long
Declare Sub SetRectRgn Lib "gdi32" Alias "SetRectRgn"(hRgn As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long)
Declare Function SetROP2 Lib "gdi32" Alias "SetROP2"(hDC As Long, nDrawMode As Long) As Long
Declare Function SetStretchBltMode Lib "gdi32" Alias "SetStretchBltMode"(hDC As Long, nStretchMode As Long) As Long
Declare Function SetSystemPaletteUse Lib "gdi32" Alias "SetSystemPaletteUse"(hDC As Long, wUsage As Long) As Long
Declare Function SetTextColor Lib "gdi32" Alias "SetTextColor"(hDC As Long, crColor As Long) As Long
Declare Function SetTextAlign Lib "gdi32" Alias "SetTextAlign"(hDC As Long, wFlags As Long) As Long
Declare Function SetTextJustification Lib "gdi32" Alias "SetTextJustification"(hDC As Long, nBreakExtra As Long, nBreakCount As Long) As Long
Declare Function UpdateColors Lib "gdi32" Alias "UpdateColors"(hDC As Long) As Long
Declare Function CloseEnhMetaFile Lib "gdi32" Alias "CloseEnhMetaFile"(hdc As Long) As Long
Declare Function CopyEnhMetaFile Lib "gdi32" Alias "CopyEnhMetaFileA"(hemfSrc As Long, lpszFile As String) As Long
Declare Function DeleteEnhMetaFile Lib "gdi32" Alias "DeleteEnhMetaFile"(hemf As Long) As Long
Declare Function GetEnhMetaFile Lib "gdi32" Alias "GetEnhMetaFileA"(lpszMetaFile As String) As Long
Declare Function GetEnhMetaFileBits Lib "gdi32" Alias "GetEnhMetaFileBits"(hemf As Long, cbBuffer As Long, lpbBuffer As Integer) As Long
Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias "GetEnhMetaFileDescriptionA"(hemf As Long, cchBuffer As Long, lpszDescription As String) As Long
Declare Function GetWinMetaFileBits Lib "gdi32" Alias "GetWinMetaFileBits"(hemf As Long, cbBuffer As Long, lpbBuffer As Integer, fnMapMode As Long, hdcRef As Long) As Long
Declare Function SetEnhMetaFileBits Lib "gdi32" Alias "SetEnhMetaFileBits"(cbBuffer As Long, lpData As Integer) As Long
Declare Function GdiComment Lib "gdi32" Alias "GdiComment"(hdc As Long, cbSize As Long, lpData As Integer) As Long
Declare Function CreateHalftonePalette Lib "gdi32" Alias "CreateHalftonePalette"(hdc As Long) As Long
Declare Function StartPage Lib "gdi32" Alias "StartPage"(hdc As Long) As Long
Declare Function EndPage Lib "gdi32" Alias "EndPage"(hdc As Long) As Long
Declare Function EndDocAPI Lib "gdi32" Alias "EndDocAPI" Alias "EndDoc"(hdc As Long) As Long
Declare Function AbortDoc Lib "gdi32" Alias "AbortDoc"(hdc As Long) As Long
Declare Function AbortPath Lib "gdi32" Alias "AbortPath"(hdc As Long) As Long
Declare Function ArcTo Lib "gdi32" Alias "ArcTo"(hdc As Long, X1 As Long, Y1 As Long, X2 As Long, Y2 As Long, X3 As Long, Y3 As Long, X4 As Long, Y4 As Long) As Long
Declare Function BeginPath Lib "gdi32" Alias "BeginPath"(hdc As Long) As Long
Declare Function CloseFigure Lib "gdi32" Alias "CloseFigure"(hdc As Long) As Long
Declare Function EndPath Lib "gdi32" Alias "EndPath"(hdc As Long) As Long
Declare Function FillPath Lib "gdi32" Alias "FillPath"(hdc As Long) As Long
Declare Function FlattenPath Lib "gdi32" Alias "FlattenPath"(hdc As Long) As Long
Declare Function PathToRegion Lib "gdi32" Alias "PathToRegion"(hdc As Long) As Long
Declare Function SelectClipPath Lib "gdi32" Alias "SelectClipPath"(hdc As Long, iMode As Long) As Long
Declare Function SetArcDirection Lib "gdi32" Alias "SetArcDirection"(hdc As Long, ArcDirection As Long) As Long
Declare Function StrokeAndFillPath Lib "gdi32" Alias "StrokeAndFillPath"(hdc As Long) As Long
Declare Function StrokePath Lib "gdi32" Alias "StrokePath"(hdc As Long) As Long
Declare Function WidenPath Lib "gdi32" Alias "WidenPath"(hdc As Long) As Long
Declare Function GetArcDirection Lib "gdi32" Alias "GetArcDirection"(hdc As Long) As Long
Declare Function GetObject Lib "gdi32" Alias "GetObjectA"(hObject As Long, nCount As Long, lpObject As Long) As Long
Declare Function TextOut Lib "gdi32" Alias "TextOutA"(hDC As Long, X As Long, Y As Long, lpString As String, nCount As Long) As Long
Declare Function GetTextFace Lib "gdi32" Alias "GetTextFaceA"(hDC As Long, nCount As Long, lpFacename As String) As Long
Declare Function UnrealizeObject Lib "gdi32" Alias "UnrealizeObject"(hObject As Long) As Long
Declare Function GdiFlush Lib "gdi32" Alias "GdiFlush"() As Long
Declare Function GdiSetBatchLimit Lib "gdi32" Alias "GdiSetBatchLimit"(dwLimit As Long) As Long
Declare Function GdiGetBatchLimit Lib "gdi32" Alias "GdiGetBatchLimit"() As Long
'
' --------------
'  USER Section
' --------------
Declare Function wvsprintf Lib "user32" Alias "wvsprintfA"(lpOutput As String, lpFormat As String, lpArglist As Long) As Long
'
' Keyboard Layout API
Declare Function LoadKeyboardLayout Lib "user32" Alias "LoadKeyboardLayoutA"(pwszKLID As String, Flags As Long) As Long
Declare Function ActivateKeyboardLayout Lib "user32" Alias "ActivateKeyboardLayout"(hkl As Long, Flags As Long) As Long
Declare Function UnloadKeyboardLayout Lib "user32" Alias "UnloadKeyboardLayout"(hkl As Long) As Long
Declare Function GetKeyboardLayoutName Lib "user32" Alias "GetKeyboardLayoutNameA"(pwszKLID As String) As Long
Declare Function GetThreadDesktop Lib "user32" Alias "GetThreadDesktop"(dwThread As Long) As Long
Declare Function GetProcessWindowStation Lib "user32" Alias "GetProcessWindowStation"() As Long
Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA"(lpString As String) As Long
'
' Message Function Templates
Declare Function SetMessageQueue Lib "user32" Alias "SetMessageQueue"(cMsg As Long) As Long
Declare Function RegisterHotKey Lib "user32" Alias "RegisterHotKey"(hWnd As Long, id As Long, fsModifiers As Long, vk As Long) As Long
Declare Function UnregisterHotKey Lib "user32" Alias "UnregisterHotKey"(hWnd As Long, id As Long) As Long
Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx"(uFlags As Long, dwReserved As Long) As Long
Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton"(bSwap As Long) As Long
Declare Function GetMessagePos Lib "user32" Alias "GetMessagePos"() As Long
Declare Function GetMessageTime Lib "user32" Alias "GetMessageTime"() As Long
Declare Function GetMessageExtraInfo Lib "user32" Alias "GetMessageExtraInfo"() As Long
Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA"(hWnd As Long, Msg As Long, wParam As Long, lParam As Long, fuFlags As Long, uTimeout As Long, lpdwResult As Long) As Long
Declare Function SendNotifyMessage Lib "user32" Alias "SendNotifyMessageA"(hWnd As Long, Msg As Long, wParam As Long, lParam As Long) As Long
Declare Function PostThreadMessage Lib "user32" Alias "PostThreadMessageA"(idThread As Long, Msg As Long, wParam As Long, lParam As Long) As Long
Declare Function AttachThreadInput Lib "user32" Alias "AttachThreadInput"(idAttach As Long, idAttachTo As Long, fAttach As Long) As Long
Declare Sub ReplyMessage Lib "user32" Alias "ReplyMessage"(lReply As Long)
Declare Sub WaitMessage Lib "user32" Alias "WaitMessage"()
Declare Sub PostQuitMessage Lib "user32" Alias "PostQuitMessage"(nExitCode As Long)
Declare Function InSendMessage Lib "user32" Alias "InSendMessage"() As Long
Declare Function GetDoubleClickTime Lib "user32" Alias "GetDoubleClickTime"() As Long
Declare Sub SetDoubleClickTime Lib "user32" Alias "SetDoubleClickTime"(wCount As Long)
Declare Function UnregisterClass Lib "user32" Alias "UnregisterClassA"(lpClassName As String, hInstance As Long) As Long
Declare Function IsWindow Lib "user32" Alias "IsWindow"(hWnd As Long) As Long
Declare Function IsMenu Lib "user32" Alias "IsMenu"(hmenu As Long) As Long
Declare Function IsChild Lib "user32" Alias "IsChild"(hWndParent As Long, hWnd As Long) As Long
Declare Function DestroyWindow Lib "user32" Alias "DestroyWindow"(hWnd As Long) As Long
Declare Function ShowWindow Lib "user32" Alias "ShowWindow"(hWnd As Long, nCmdShow As Long) As Long
Declare Function FlashWindow Lib "user32" Alias "FlashWindow"(hWnd As Long, bInvert As Long) As Long
Declare Sub ShowOwnedPopups Lib "user32" Alias "ShowOwnedPopups"(hWnd As Long, fShow As Long)
Declare Function OpenIcon Lib "user32" Alias "OpenIcon"(hWnd As Long) As Long
Declare Sub CloseWindow Lib "user32" Alias "CloseWindow"(hWnd As Long)
Declare Sub MoveWindow Lib "user32" Alias "MoveWindow"(hWnd As Long, X As Long, Y As Long, nWidth As Long, nHeight As Long, bRepaint As Long)
Declare Sub SetWindowPos Lib "user32" Alias "SetWindowPos"(hWnd As Long, hWndInsertAfter As Long, X As Long, Y As Long, cx As Long, cy As Long, wFlags As Long)
Declare Sub BeginDeferWindowPos Lib "user32" Alias "BeginDeferWindowPos"(nNumWindows As Long)
Declare Sub DeferWindowPos Lib "user32" Alias "DeferWindowPos"(hWinPosInfo As Long, hWnd As Long, hWndInsertAfter As Long, x As Long, y As Long, cx As Long, cy As Long, wFlags As Long)
Declare Sub EndDeferWindowPos Lib "user32" Alias "EndDeferWindowPos"(hWinPosInfo As Long)
Declare Function IsWindowVisible Lib "user32" Alias "IsWindowVisible"(hWnd As Long) As Long
Declare Function IsIconic Lib "user32" Alias "IsIconic"(hWnd As Long) As Long
Declare Function AnyPopup Lib "user32" Alias "AnyPopup"() As Long
Declare Sub BringWindowToTop Lib "user32" Alias "BringWindowToTop"(hWnd As Long)
Declare Function IsZoomed Lib "user32" Alias "IsZoomed"(hWnd As Long) As Long
Declare Sub EndDialog Lib "user32" Alias "EndDialog"(hDlg As Long, nResult As Long)
Declare Function GetDlgItem Lib "user32" Alias "GetDlgItem"(hDlg As Long, nIDDlgItem As Long) As Long
Declare Sub SetDlgItemInt Lib "user32" Alias "SetDlgItemInt"(hDlg As Long, nIDDlgItem As Long, wValue As Long, bSigned As Long)
Declare Function GetDlgItemInt Lib "user32" Alias "GetDlgItemInt"(hDlg As Long, nIDDlgItem As Long, lpTranslated As Long, bSigned As Long) As Long
Declare Sub SetDlgItemText Lib "user32" Alias "SetDlgItemTextA"(hDlg As Long, nIDDlgItem As Long, lpString As String)
Declare Function GetDlgItemText Lib "user32" Alias "GetDlgItemTextA"(hDlg As Long, nIDDlgItem As Long, lpString As String, nMaxCount As Long) As Long
Declare Sub CheckDlgButton Lib "user32" Alias "CheckDlgButton"(hDlg As Long, nIDButton As Long, wCheck As Long)
Declare Sub CheckRadioButton Lib "user32" Alias "CheckRadioButton"(hDlg As Long, nIDFirstButton As Long, nIDLastButton As Long, nIDCheckButton As Long)
Declare Function IsDlgButtonChecked Lib "user32" Alias "IsDlgButtonChecked"(hDlg As Long, nIDButton As Long) As Long
Declare Function GetNextDlgGroupItem Lib "user32" Alias "GetNextDlgGroupItem"(hDlg As Long, hCtl As Long, bPrevious As Long) As Long
Declare Function GetNextDlgTabItem Lib "user32" Alias "GetNextDlgTabItem"(hDlg As Long, hCtl As Long, bPrevious As Long) As Long
Declare Function GetDlgCtrlID Lib "user32" Alias "GetDlgCtrlID"(hWnd As Long) As Long
Declare Function GetDialogBaseUnits Lib "user32" Alias "GetDialogBaseUnits"() As Long
'
' Clipboard Manager Functions
Declare Function OpenClipboard Lib "user32" Alias "OpenClipboard"(hWnd As Long) As Long
Declare Function CloseClipboard Lib "user32" Alias "CloseClipboard"() As Long
Declare Function GetClipboardOwner Lib "user32" Alias "GetClipboardOwner"() As Long
Declare Function SetClipboardViewer Lib "user32" Alias "SetClipboardViewer"(hWnd As Long) As Long
Declare Function GetClipboardViewer Lib "user32" Alias "GetClipboardViewer"() As Long
Declare Function ChangeClipboardChain Lib "user32" Alias "ChangeClipboardChain"(hWnd As Long, hWndNext As Long) As Long
Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA"(lpString As String) As Long
Declare Function CountClipboardFormats Lib "user32" Alias "CountClipboardFormats"() As Long
Declare Function EnumClipboardFormats Lib "user32" Alias "EnumClipboardFormats"(wFormat As Long) As Long
Declare Function GetClipboardFormatName Lib "user32" Alias "GetClipboardFormatNameA"(wFormat As Long, lpString As String, nMaxCount As Long) As Long
Declare Function EmptyClipboard Lib "user32" Alias "EmptyClipboard"() As Long
Declare Function IsClipboardFormatAvailable Lib "user32" Alias "IsClipboardFormatAvailable"(wFormat As Long) As Long
Declare Function GetPriorityClipboardFormat Lib "user32" Alias "GetPriorityClipboardFormat"(lpPriorityList As Long, nCount As Long) As Long
Declare Function GetOpenClipboardWindow Lib "user32" Alias "GetOpenClipboardWindow"() As Long
Declare Function CharToOem Lib "user32" Alias "CharToOemA"(lpszSrc As String, lpszDst As String) As Long
Declare Function OemToChar Lib "user32" Alias "OemToCharA"(lpszSrc As String, lpszDst As String) As Long
Declare Function CharToOemBuff Lib "user32" Alias "CharToOemBuffA"(lpszSrc As String, lpszDst As String, cchDstLength As Long) As Long
Declare Function OemToCharBuff Lib "user32" Alias "OemToCharBuffA"(lpszSrc As String, lpszDst As String, cchDstLength As Long) As Long
Declare Function CharUpper Lib "user32" Alias "CharUpperA"(lpsz As String) As String
Declare Function CharUpperBuff Lib "user32" Alias "CharUpperBuffA"(lpsz As String, cchLength As Long) As Long
Declare Function CharLower Lib "user32" Alias "CharLowerA"(lpsz  As String) As String
Declare Function CharLowerBuff Lib "user32" Alias "CharLowerBuffA"(lpsz As String, cchLength As Long) As Long
Declare Function CharNext Lib "user32" Alias "CharNextA"(lpsz As String) As String
Declare Function CharPrev Lib "user32" Alias "CharPrevA"(lpszStart As String, lpszCurrent As String) As String
'
' Language dependent Routines
Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA"(cChar As Long) As Long
Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA"(cChar As Long) As Long
Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA"(cChar As Long) As Long
Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA"(cChar As Long) As Long
Declare Function SetFocusAPI Lib "user32" Alias "SetFocusAPI" Alias "SetFocus"(hWnd As Long) As Long
Declare Function GetFocus Lib "user32" Alias "GetFocus"() As Long
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow"() As Long
'
' Keyboard Information Routines
Declare Sub GetKBCodePage Lib "user32" Alias "GetKBCodePage"()
Declare Function GetKeyState Lib "user32" Alias "GetKeyState"(nVirtKey As Long) As Long
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState"(vKey As Long) As Long
Declare Function GetKeyboardState Lib "user32" Alias "GetKeyboardState"(pbKeyState As Integer) As Long
Declare Function SetKeyboardState Lib "user32" Alias "SetKeyboardState"(lpbKeyState As Integer) As Long
Declare Function GetKeyboardType Lib "user32" Alias "GetKeyboardType"(nTypeFlag As Long) As Long
Declare Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextA"(lParam As Long, lpBuffer As String, nSize As Long) As Long
Declare Function ToAscii Lib "user32" Alias "ToAscii"(uVirtKey As Long, uScanCode As Long, lpbKeyState As Integer, lpwTransKey As Long, fuState As Long) As Long
Declare Function ToUnicode Lib "user32" Alias "ToUnicode"(wVirtKey As Long, wScanCode As Long, lpKeyState As Integer, pwszBuff As String, cchBuff As Long, wFlags As Long) As Long
Declare Function OemKeyScan Lib "user32" Alias "OemKeyScan"(wOemChar As Long) As Long
Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA"(cChar As Long) As Long
Declare Sub keybd_event Lib "user32" Alias "keybd_event"(bVk As Integer, bScan As Integer, dwFlags As Long, dwExtraInfo As Long)
Declare Sub mouse_event Lib "user32" Alias "mouse_event"(dwFlags As Long, dx As Long, dy As Long, cButtons As Long, dwExtraInfo As Long)
Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA"(wCode As Long, wMapType As Long) As Long
Declare Function GetInputState Lib "user32" Alias "GetInputState"() As Long
Declare Function GetQueueStatus Lib "user32" Alias "GetQueueStatus"(fuFlags As Long) As Long
Declare Function GetCapture Lib "user32" Alias "GetCapture"() As Long
Declare Function SetCapture Lib "user32" Alias "SetCapture"(hWnd As Long) As Long
Declare Sub ReleaseCapture Lib "user32" Alias "ReleaseCapture"()
Declare Function MsgWaitForMultipleObjects Lib "user32" Alias "MsgWaitForMultipleObjects"(nCount As Long, pHandles As Long, fWaitAll As Long, dwMilliseconds As Long, dwWakeMask As Long) As Long
'
' Windows Functions
Declare Function KillTimer Lib "user32" Alias "KillTimer"(hWnd As Long, nIDEvent As Long) As Long
Declare Function IsWindowUnicode Lib "user32" Alias "IsWindowUnicode"(hWnd As Long) As Long
Declare Function EnableWindow Lib "user32" Alias "EnableWindow"(hWnd As Long, aBOOL As Long) As Long
Declare Function IsWindowEnabled Lib "user32" Alias "IsWindowEnabled"(hWnd As Long) As Long
Declare Function LoadAccelerators Lib "user32" Alias "LoadAcceleratorsA"(hInstance As Long, lpTableName As String) As Long
Declare Function DestroyAcceleratorTable Lib "user32" Alias "DestroyAcceleratorTable"(hAccel As Long) As Long
Declare Function GetSystemMetrics Lib "user32" Alias "GetSystemMetrics"(nIndex As Long) As Long
Declare Function LoadMenu Lib "user32" Alias "LoadMenuA"(hInstance As Long, lpString As String) As Long
Declare Function GetMenu Lib "user32" Alias "GetMenu"(hWnd As Long) As Long
Declare Function SetMenu Lib "user32" Alias "SetMenu"(hWnd As Long, hMenu As Long) As Long
Declare Function ChangeMenu Lib "user32" Alias "ChangeMenuA"(hMenu As Long, wID As Long, lpszNew As String, wIDNew As Long, wChange As Long) As Long
Declare Function HiliteMenuItem Lib "user32" Alias "HiliteMenuItem"(hWnd As Long, hMenu As Long, wIDHiliteItem As Long, wHilite As Long) As Long
Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA"(hMenu As Long, wIDItem As Long, lpString As String, nMaxCount As Long, wFlag As Long) As Long
Declare Function GetMenuState Lib "user32" Alias "GetMenuState"(hMenu As Long, wId As Long, wFlags As Long) As Long
Declare Sub DrawMenuBar Lib "user32" Alias "DrawMenuBar"(hWnd As Long)
Declare Function GetSystemMenu Lib "user32" Alias "GetSystemMenu"(hWnd As Long, bRevert As Long) As Long
Declare Function CreateMenu Lib "user32" Alias "CreateMenu"() As Long
Declare Function CreatePopupMenu Lib "user32" Alias "CreatePopupMenu"() As Long
Declare Function DestroyMenu Lib "user32" Alias "DestroyMenu"(hMenu As Long) As Long
Declare Function CheckMenuItem Lib "user32" Alias "CheckMenuItem"(hMenu As Long, wIDCheckItem As Long, wCheck As Long) As Long
Declare Function EnableMenuItem Lib "user32" Alias "EnableMenuItem"(hMenu As Long, wIDEnableItem As Long, wEnable As Long) As Long
Declare Function GetSubMenu Lib "user32" Alias "GetSubMenu"(hMenu As Long, nPos As Long) As Long
Declare Function GetMenuItemID Lib "user32" Alias "GetMenuItemID"(hMenu As Long, nPos As Long) As Long
Declare Function GetMenuItemCount Lib "user32" Alias "GetMenuItemCount"(hMenu As Long) As Long
Declare Function RemoveMenu Lib "user32" Alias "RemoveMenu"(hMenu As Long, nPosition As Long, wFlags As Long) As Long
Declare Function DeleteMenu Lib "user32" Alias "DeleteMenu"(hMenu As Long, nPosition As Long, wFlags As Long) As Long
Declare Function SetMenuItemBitmaps Lib "user32" Alias "SetMenuItemBitmaps"(hMenu As Long, nPosition As Long, wFlags As Long, hBitmapUnchecked As Long, hBitmapChecked As Long) As Long
Declare Function GetMenuCheckMarkDimensions Lib "user32" Alias "GetMenuCheckMarkDimensions"() As Long
Declare Function DrawIcon Lib "user32" Alias "DrawIcon"(hDC As Long, X As Long, Y As Long, hIcon As Long) As Long
Declare Function TabbedTextOut Lib "user32" Alias "TabbedTextOutA"(hDC As Long, X As Long, Y As Long, lpString As String, nCount As Long, nTabPositions As Long, lpnTabStopPositions As Long, nTabOrigin As Long) As Long
Declare Function GetTabbedTextExtent Lib "user32" Alias "GetTabbedTextExtentA"(hDC As Long, lpString As String, nCount As Long, nTabPositions As Long, lpnTabStopPositions As Long) As Long
Declare Sub UpdateWindow Lib "user32" Alias "UpdateWindow"(hWnd As Long)
Declare Function SetActiveWindow Lib "user32" Alias "SetActiveWindow"(hWnd As Long) As Long
Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow"() As Long
Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow"(hWnd As Long) As Long
Declare Function WindowFromDC Lib "user32" Alias "WindowFromDC"(hDC As Long) As Long
Declare Function GetDC Lib "user32" Alias "GetDC"(hWnd As Long) As Long
Declare Function GetDCEx Lib "user32" Alias "GetDCEx"(hwnd As Long, hrgnclip As Long, fdwOptions As Long) As Long
Declare Function GetWindowDC Lib "user32" Alias "GetWindowDC"(hWnd As Long) As Long
Declare Function ReleaseDC Lib "user32" Alias "ReleaseDC"(hWnd As Long, hDC As Long) As Long
Declare Function GetUpdateRgn Lib "user32" Alias "GetUpdateRgn"(hWnd As Long, hRgn As Long, fErase As Long) As Long
Declare Function ExcludeUpdateRgn Lib "user32" Alias "ExcludeUpdateRgn"(hDC As Long, hWnd As Long) As Long
Declare Sub InvalidateRgn Lib "user32" Alias "InvalidateRgn"(hWnd As Long, hRgn As Long, bErase As Long)
Declare Sub ValidateRgn Lib "user32" Alias "ValidateRgn"(hWnd As Long, hRgn As Long)
Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate"(hwndLock As Long) As Long
Declare Function SetScrollPos Lib "user32" Alias "SetScrollPos"(hWnd As Long, nBar As Long, nPos As Long, bRedraw As Long) As Long
Declare Function GetScrollPos Lib "user32" Alias "GetScrollPos"(hWnd As Long, nBar As Long) As Long
Declare Sub SetScrollRange Lib "user32" Alias "SetScrollRange"(hWnd As Long, nBar As Long, nMinPos As Long, nMaxPos As Long, bRedraw As Long)
Declare Sub GetScrollRange Lib "user32" Alias "GetScrollRange"(hWnd As Long, nBar As Long, lpMinPos As Long, lpMaxPos As Long)
Declare Sub ShowScrollBar Lib "user32" Alias "ShowScrollBar"(hWnd As Long, wBar As Long, bShow As Long)
Declare Function EnableScrollBar Lib "user32" Alias "EnableScrollBar"(hWnd As Long, wSBflags As Long, wArrows As Long) As Long
Declare Function SetProp Lib "user32" Alias "SetPropA"(hWnd As Long, lpString As String, hData As Long) As Long
Declare Function RemoveProp Lib "user32" Alias "RemovePropA"(hWnd As Long, lpString As String) As Long
Declare Sub SetWindowText Lib "user32" Alias "SetWindowTextA"(hWnd As Long, lpString As String)
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA"(hWnd As Long, lpString As String, aint As Long) As Long
Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA"(hWnd As Long) As Long
Declare Function MessageBox Lib "user32" Alias "MessageBoxA"(hWnd As Long, lpText As String, lpCaption As String, wType As Long) As Long
Declare Function MessageBoxEx Lib "user32" Alias "MessageBoxExA"(hWnd As Long, lpText As String, lpCaption As String, uType As Long, wLanguageId As Long) As Long
Declare Sub MessageBeep Lib "user32" Alias "MessageBeep"(wType As Long)
Declare Function ShowCursor Lib "user32" Alias "ShowCursor"(bShow As Long) As Long
Declare Sub SetCursorPos Lib "user32" Alias "SetCursorPos"(X As Long, Y As Long)
Declare Function SetCursor Lib "user32" Alias "SetCursor"(hCursor As Long) As Long
Declare Function GetCursor Lib "user32" Alias "GetCursor"() As Long
Declare Function CreateCaret Lib "user32" Alias "CreateCaret"(hWnd As Long, hBitmap As Long, nWidth As Long, nHeight As Long) As Long
Declare Function GetCaretBlinkTime Lib "user32" Alias "GetCaretBlinkTime"() As Long
Declare Sub SetCaretBlinkTime Lib "user32" Alias "SetCaretBlinkTime"(wMSeconds As Long)
Declare Sub DestroyCaret Lib "user32" Alias "DestroyCaret"()
Declare Sub HideCaret Lib "user32" Alias "HideCaret"(hWnd As Long)
Declare Sub ShowCaret Lib "user32" Alias "ShowCaret"(hWnd As Long)
Declare Sub SetCaretPos Lib "user32" Alias "SetCaretPos"(X As Long, Y As Long)
Declare Function GetSysColor Lib "user32" Alias "GetSysColor"(nIndex As Long) As Long
Declare Sub SetSysColors Lib "user32" Alias "SetSysColors"(nChanges As Long, lpSysColor As Long, lpColorValues As Long)
Declare Function GetWindowWord Lib "user32" Alias "GetWindowWord"(hWnd As Long, nIndex As Long) As Long
Declare Function SetWindowWord Lib "user32" Alias "SetWindowWord"(hWnd As Long, nIndex As Long, wNewWord As Long) As Long
Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA"(hWnd As Long, nIndex As Long) As Long
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA"(hWnd As Long, nIndex As Long, dwNewLong As Long) As Long
Declare Function GetClassWord Lib "user32" Alias "GetClassWord"(hWnd As Long, nIndex As Long) As Long
Declare Function SetClassWord Lib "user32" Alias "SetClassWord"(hWnd As Long, nIndex As Long, wNewWord As Long) As Long
Declare Function GetClassLong Lib "user32" Alias "GetClassLongA"(hWnd As Long, nIndex As Long) As Long
Declare Function SetClassLong Lib "user32" Alias "SetClassLongA"(hWnd As Long, nIndex As Long, dwNewLong As Long) As Long
Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow"() As Long
Declare Function GetParent Lib "user32" Alias "GetParent"(hWnd As Long) As Long
Declare Function SetParent Lib "user32" Alias "SetParent"(hWndChild As Long, hWndNewParent As Long) As Long
Declare Function GetClassName Lib "user32" Alias "GetClassNameA"(hWnd As Long, lpClassName As String, nMaxCount As Long) As Long
Declare Function GetTopWindow Lib "user32" Alias "GetTopWindow"(hWnd As Long) As Long
Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId"(hWnd As Long, lpdwProcessId As Long) As Long
Declare Function GetLastActivePopup Lib "user32" Alias "GetLastActivePopup"(hwndOwnder As Long) As Long
Declare Function GetWindow Lib "user32" Alias "GetWindow"(hWnd As Long, wCmd As Long) As Long
Declare Function UnhookWindowsHookEx Lib "user32" Alias "UnhookWindowsHookEx"(hHook As Long) As Long
'
' Resource Loading Routines
Declare Function DestroyCursor Lib "user32" Alias "DestroyCursor"(hCursor As Long) As Long
Declare Function DestroyIcon Lib "user32" Alias "DestroyIcon"(hIcon As Long) As Long
Declare Function LookupIconIdFromDirectory Lib "user32" Alias "LookupIconIdFromDirectory"(presbits As Integer, fIcon As Long) As Long
Declare Function CreateIconFromResource Lib "user32" Alias "CreateIconFromResource"(presbits As Integer, dwResSize As Long, fIcon As Long, dwVer As Long) As Long
Declare Function CopyIcon Lib "user32" Alias "CopyIcon"(hinst As Long, hicon As Long) As Long
Declare Function DlgDirList Lib "user32" Alias "DlgDirListA"(hDlg As Long, lpPathSpec As String, nIDListBox As Long, nIDStaticPath As Long, wFiletype As Long) As Long
Declare Function DlgDirListComboBox Lib "user32" Alias "DlgDirListComboBoxA"(hDlg As Long, lpPathSpec As String, nIDComboBox As Long, nIDStaticPath As Long, wFileType As Long) As Long
Declare Function DefFrameProc Lib "user32" Alias "DefFrameProcA"(hWnd As Long, hWndMDIClient As Long, wMsg As Long, wParam As Long, lParam As Long) As Long
Declare Function DefMDIChildProc Lib "user32" Alias "DefMDIChildProcA"(hWnd As Long, wMsg As Long, wParam As Long, lParam As Long) As Long
Declare Function ArrangeIconicWindows Lib "user32" Alias "ArrangeIconicWindows"(hWnd As Long) As Long
Declare Function CreateMDIWindow Lib "user32" Alias "CreateMDIWindowA"(lpClassName As String, lpWindowName As String, dwStyle As Long, X As Long, Y As Long, nWidth As Long, nHeight As Long, hWndParent As Long, hInstance As Long, lParam As Long) As Long
'
' ----------------
' shell association database management functions
' -----------------
Declare Function DragQueryFile Lib "shell32" Alias "DragQueryFileA"(hDrop As Long, iFile As Long, lpszFile As String, cb As Long) As Long
Declare Sub DragFinish Lib "shell32" Alias "DragFinish"(hDrop As Long)
Declare Sub DragAcceptFiles Lib "shell32" Alias "DragAcceptFiles"(hWnd As Long, fAccept As Long)
Declare Function ExtractIcon Lib "shell32" Alias "ExtractIconA"(hInst As Long, lpszExeFileName As String, nIconIndex As Long) As Long
Declare Function ShellExecute Lib "shell32" Alias "ShellExecuteA"(hWnd As Long, lpOperation As String, lpFile As String, lpParameters As String, lpDirectory As String, nShowCmd As Long) As Long
Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA"(lpFile As String, lpDirectory As String, lpResult As String) As Long
Declare Function ShellAbout Lib "shell32" Alias "ShellAboutA"(hWnd As Long, szApp As String, szOtherStuff As String, hIcon As Long) As Long
Declare Function DuplicateIcon Lib "shell32" Alias "DuplicateIcon"(hInst As Long, hIcon As Long) As Long
Declare Function ExtractAssociatedIcon Lib "shell32" Alias "ExtractAssociatedIconA"(hInst As Long, lpIconPath As String, lpiIcon As Long) As Long
'
' ***** Windows Network support *****
Declare Function WNetAddConnection Lib "mpr" Alias "WNetAddConnectionA"(lpszNetPath As String, lpszPassword As String, lpszLocalName As String) As Long
Declare Function WNetCancelConnection Lib "mpr" Alias "WNetCancelConnectionA"(lpszName As String, bForce As Long) As Long
Declare Function WNetCancelConnection2 Lib "mpr" Alias "WNetCancelConnection2A"(lpName As String, dwFlags As Long, fForce As Long) As Long
Declare Function WNetGetConnection Lib "mpr" Alias "WNetGetConnectionA"(lpszLocalName As String, lpszRemoteName As String, cbRemoteName As Long) As Long
Declare Function WNetCloseEnum Lib "mpr" Alias "WNetCloseEnum"(hEnum As Long) As Long
Declare Function WNetGetUser Lib "mpr" Alias "WNetGetUserA"(lpName As String, lpUserName As String, lpnLength As Long) As Long
Declare Function WNetConnectionDialog Lib "mpr" Alias "WNetConnectionDialog"(hwnd As Long, dwType As Long) As Long
Declare Function WNetDisconnectDialog Lib "mpr" Alias "WNetDisconnectDialog"(hwnd As Long, dwType As Long) As Long
Declare Function WNetGetLastError Lib "mpr" Alias "WNetGetLastErrorA"(lpError As Long, lpErrorBuf As String, nErrorBufSize As Long, lpNameBuf As String, nNameBufSize As Long) As Long
'
' -----------------
' ADVAPI32
' -----------------
' function prototypes, constants, and type definitions for Windows 32-bit Registry API
' Registry API prototypes
Declare Function RegCloseKey Lib "advapi32" Alias "RegCloseKey"(hKey As Long) As Long
Declare Function RegConnectRegistry Lib "advapi32" Alias "RegConnectRegistryA"(lpMachineName As String, hKey As Long, phkResult As Long) As Long
Declare Function RegCreateKey Lib "advapi32" Alias "RegCreateKeyA"(hKey As Long, lpSubKey As String, phkResult As Long) As Long
Declare Function RegDeleteKey Lib "advapi32" Alias "RegDeleteKeyA"(hKey As Long, lpSubKey As String) As Long
Declare Function RegDeleteValue Lib "advapi32" Alias "RegDeleteValueA"(hKey As Long, lpValueName As String) As Long
Declare Function RegEnumKey Lib "advapi32" Alias "RegEnumKeyA"(hKey As Long, dwIndex As Long, lpName As String, cbName As Long) As Long
Declare Function RegEnumValue Lib "advapi32" Alias "RegEnumValueA"(hKey As Long, dwIndex As Long, lpValueName As String, lpcbValueName As Long, lpReserved As Long, lpType As Long, lpData As Integer, lpcbData As Long) As Long
Declare Function RegFlushKey Lib "advapi32" Alias "RegFlushKey"(hKey As Long) As Long
Declare Function RegLoadKey Lib "advapi32" Alias "RegLoadKeyA"(hKey As Long, lpSubKey As String, lpFile As String) As Long
Declare Function RegNotifyChangeKeyValue Lib "advapi32" Alias "RegNotifyChangeKeyValue"(hKey As Long, bWatchSubtree As Long, dwNotifyFilter As Long, hEvent As Long, fAsynchronus As Long) As Long
Declare Function RegOpenKey Lib "advapi32" Alias "RegOpenKeyA"(hKey As Long, lpSubKey As String, phkResult As Long) As Long
Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA"(hKey As Long, lpSubKey As String, ulOptions As Long, samDesired As Long, phkResult As Long) As Long
Declare Function RegQueryValue Lib "advapi32" Alias "RegQueryValueA"(hKey As Long, lpSubKEy As String, lpValue As String, lpcbValue As Long) As Long
Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA"(hKey As Long, lpValueName As String, lpReserved As Long, lpType As Long, lpData As Integer, lpcbData As Long) As Long
Declare Function RegReplaceKey Lib "advapi32" Alias "RegReplaceKeyA"(hKey As Long, lpSubKey As String, lpNewFile As String, lpOldFile As String) As Long
Declare Function RegRestoreKey Lib "advapi32" Alias "RegRestoreKeyA"(hKey As Long, lpFile As String, dwFlags As Long) As Long
Declare Function RegSetValue Lib "advapi32" Alias "RegSetValueA"(hKey As Long, lpSubKey As String, dwType As Long, lpData As String, cbData As Long) As Long
Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA"(hKey As Long, lpValueName As String, Reserved As Long, dwType As Long, lpData As Integer, cbData As Long) As Long
Declare Function RegUnLoadKey Lib "advapi32" Alias "RegUnLoadKeyA"(hKey As Long, lpSubKey As String) As Long
Declare Function InitiateSystemShutdown Lib "advapi32" Alias "InitiateSystemShutdownA"(lpMachineName As String, lpMessage As String, dwTimeout As Long, bForceAppsClosed As Long, bRebootAfterShutdown As Long) As Long
Declare Function AbortSystemShutdown Lib "advapi32" Alias "AbortSystemShutdownA"(lpMachineName As String) As Long
