' ---------------------------------------------------------------------
'
'    WIN16API.TXT -- Windows 3.1 API Declarations for WordBasic
'
'              Copyright (C) 1994 Microsoft Corporation
'
'
'  This file contains the Declare statements for Windows 3.1 APIs. 
'
'  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 GetNumTasks Lib "Kernel"() As Integer
Declare Function GetModuleHandle Lib "Kernel"(lpModuleName As String) As Integer
Declare Function GetModuleUsage Lib "Kernel"(hModule As Integer) As Integer
Declare Function GetModuleFileName Lib "Kernel"(hModule As Integer, lpFilename As String, nSize As Integer) As Integer
Declare Function GetInstanceData Lib "Kernel"(hInstance As Integer, pData As Integer, nCount As Integer) As Integer
Declare Function LoadLibrary Lib "Kernel"(lpLibFileName As String) As Integer
Declare Sub FreeModule Lib "Kernel"(hModule As Integer)
Declare Sub FreeLibrary Lib "Kernel"(hLibModule As Integer)
Declare Function GetFreeSpace Lib "Kernel"(wFlags As Integer) As Long
Declare Function WinExec Lib "Kernel"(lpCmdLine As String, nCmdShow As Integer) As Integer
Declare Sub DebugBreak Lib "Kernel"()
Declare Sub OutputDebugString Lib "Kernel"(lpOutputString As String)
Declare Sub SwitchStackBack Lib "Kernel"()
Declare Sub SwitchStackTo Lib "Kernel"(wStackSegment As Integer, wStackPointer As Integer, wStackTop As Integer)
Declare Function GetCurrentPDB Lib "Kernel"() As Integer
Declare Function GetVersion Lib "Kernel"() As Long
Declare Function GetTempDrive Lib "Kernel"(cDriveLetter As Integer) As Integer
Declare Function GetTempFileName Lib "Kernel"(cDriveLetter As Integer, lpPrefixString As String, wUnique As Integer, lpTempFileName As String) As Integer
Declare Function SetHandleCount Lib "Kernel"(wNumber As Integer) As Integer
Declare Function GetDriveType Lib "Kernel"(nDrive As Integer) As Integer
Declare Function GlobalAlloc Lib "Kernel"(wFlags As Integer, dwBytes As Long) As Integer
Declare Function GlobalCompact Lib "Kernel"(dwMinFree As Long) As Long
Declare Function GlobalFree Lib "Kernel"(hMem As Integer) As Integer
Declare Function GlobalHandle Lib "Kernel"(wMem As Integer) As Long
Declare Function GlobalLock Lib "Kernel"(hMem As Integer) As Long
Declare Function GlobalReAlloc Lib "Kernel"(hMem As Integer, dwBytes As  Long, wFlags As Integer) As Integer
Declare Function GlobalSize Lib "Kernel"(hMem As Integer) As Long
Declare Function GlobalUnlock Lib "Kernel"(hMem As Integer) As Integer
Declare Function UnlockResource Lib "Kernel" Alias "GlobalUnlock"(hMem As Integer) As Integer
Declare Function GlobalFlags Lib "Kernel"(hMem As Integer) As Integer
Declare Function GlobalWire Lib "Kernel"(hMem As Integer) As Long
Declare Function GlobalUnWire Lib "Kernel"(hMem As Integer) As Integer
Declare Function GlobalUnlock Lib "Kernel"(hMem As Integer) As Integer
Declare Function GlobalLRUNewest Lib "Kernel"(hMem As Integer) As Integer
Declare Function GlobalLRUOldest Lib "Kernel"(hMem As Integer) As Integer
Declare Function GlobalPageLock Lib "Kernel"(wSelector As Integer) As Integer
Declare Function GlobalPageUnlock Lib "Kernel"(wSelector As Integer) As Integer
Declare Sub GlobalFix Lib "Kernel"(hMem As Integer)
Declare Function GlobalUnfix Lib "Kernel"(hMem As Integer) As Integer
Declare Function LockSegment Lib "Kernel"(wSegment As Integer) As Integer
Declare Function UnlockSegment Lib "Kernel"(wSegment As Integer) As Integer
Declare Function LocalAlloc Lib "Kernel"(wFlags As Integer, wBytes As Integer) As Integer
Declare Function LocalCompact Lib "Kernel"(wMinFree As Integer) As Integer
Declare Function LocalFree Lib "Kernel"(hMem As Integer) As Integer
Declare Function LocalHandle Lib "Kernel"(wMem As Integer) As Integer
Declare Function LocalInit Lib "Kernel"(wSegment As Integer, pStart As Integer, pEnd As Integer) As Integer
Declare Function LocalLock Lib "Kernel"(hMem As Integer) As Integer'(returns a near  pointer)
Declare Function LocalReAlloc Lib "Kernel"(hMem As Integer, wBytes As Integer, wFlags As Integer) As Integer
Declare Function LocalSize Lib "Kernel"(hMem As Integer) As Integer
Declare Function LocalUnlock Lib "Kernel"(hMem As Integer) As Integer
Declare Function LocalFlags Lib "Kernel"(hMem As Integer) As Integer
Declare Function LocalShrink Lib "Kernel"(hSeg As Integer, wSize As Integer) As  Integer
Declare Function SetSwapAreaSize Lib "Kernel"(rsSize As Integer) As Long
Declare Function ValidateFreeSpaces Lib "Kernel"() As Long
Declare Sub LimitEmsPages Lib "Kernel"(dwKbytes As Long)
Declare Function SetErrorMode Lib "Kernel"(wMode As Integer) As Integer
Declare Sub ValidateCodeSegments Lib "Kernel"()
Declare Function GetDOSEnvironment Lib "Kernel"() As Long
Declare Function AllocDStoCSAlias Lib "Kernel"(wSelector As Integer) As Integer
Declare Function AllocSelector Lib "Kernel"(wSelector As Integer) As Integer
Declare Function FreeSelector Lib "Kernel"(wSelector As Integer) As Integer
Declare Function LoadResource Lib "Kernel"(hInstance As Integer, hResInfo As Integer) As Integer
Declare Function FreeResource Lib "Kernel"(hResData As Integer) As Integer
Declare Function LockResource Lib "Kernel"(hResData As Integer) As Long
Declare Function AllocResource Lib "Kernel"(hInstance As Integer, hResInfo As  Integer, dwSize As Long) As Integer
Declare Function SizeofResource Lib "Kernel"(hInstance As Integer, hResInfo As  Integer) As Integer
Declare Function AccessResource Lib "Kernel"(hInstance As Integer, hResInfo  As Integer) As Integer
Declare Sub Yield Lib "Kernel"()
Declare Function GetCurrentTask Lib "Kernel"() As Integer
Declare Function InitAtomTable Lib "Kernel"(nSize As Integer) As Integer
Declare Function AddAtom Lib "Kernel"(lpString As String) As Integer
Declare Function DeleteAtom Lib "Kernel"(nAtom As Integer) As Integer
Declare Function FindAtom Lib "Kernel"(lpString As String) As Integer
Declare Function GetAtomName Lib "Kernel"(nAtom As Integer, lpBuffer As  String, nSize As Integer) As Integer
Declare Function GlobalAddAtom Lib "User"(lpString As String) As Integer
Declare Function GlobalDeleteAtom Lib "User"(nAtom As Integer) As Integer
Declare Function GlobalFindAtom Lib "User"(lpString As String) As Integer
Declare Function GlobalGetAtomName Lib "User"(nAtom As Integer, lpbuffer  As String, nSize As Integer) As Integer
Declare Function GetAtomHandle Lib "Kernel"(wAtom As Integer) As Integer
'
' User Profile Routines
Declare Function GetProfileInt Lib "Kernel"(lpAppName As String, lpKeyName As String, nDefault As Integer) As Integer
Declare Function GetProfileString Lib "Kernel"(lpAppName As String, lpKeyName  As String, lpDefault As String, lpReturnedString As String, nSize As  Integer) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel"(lpApplicationName As String, lpKeyName As String, nDefault As Integer, lpFileName As String) As Integer
Declare Function GetPrivateProfileString Lib "Kernel"(lpApplicationName As String, lpKeyName As String, lpDefault As String, lpReturnedString As String, nSize As Integer, lpFileName As String) As Integer
Declare Function GetWindowsDirectory Lib "Kernel"(lpBuffer As String, nSize As Integer) As Integer
Declare Function GetSystemDirectory Lib "Kernel"(lpBuffer As String, nSize As Integer) As Integer
Declare Sub FatalExit Lib "Kernel"(Code As Integer)
Declare Sub SwapRecording Lib "Kernel"(wFlag As Integer)
'
' Character Translation Routines
Declare Function AnsiToOem Lib "Keyboard"(lpAnsiStr As String, lpOemStr As String) As Integer
Declare Function OemToAnsi Lib "Keyboard"(lpOemStr As String, lpAnsiStr As String) As Integer
Declare Sub AnsiToOemBuff Lib "Keyboard"(lpAnsiStr As String, lpOemStr As String, nLength As Integer)
Declare Sub OemToAnsiBuff Lib "Keyboard"(lpOemStr As String, lpAnsiStr As String, nLength As Integer)
Declare Function AnsiUpper Lib "User"(lpString As String) As String
Declare Function AnsiUpperBuff Lib "User"(lpString As String, aWORD As Integer) As Integer
Declare Function AnsiLower Lib "User"(lpString As String) As Long
Declare Function AnsiLowerBuff Lib "User"(lpString As String, aWORD As Integer) As Integer
Declare Function AnsiNext Lib "User"(lpString As String) As Long
Declare Function AnsiPrev Lib "User"(lpString As String, lpString As String) As Long
'
' Keyboard Information Routines
Declare Function OemKeyScan Lib "Keyboard"(wOemChar As Integer) As Long
Declare Function VkKeyScan Lib "Keyboard"(cChar As Integer) As Integer
Declare Function GetKeyboardType Lib "Keyboard"(nTypeFlag As Integer) As Integer
Declare Function MapVirtualKey Lib "Keyboard"(wCode As Integer, wMapType As Integer) As Integer
Declare Sub GetKBCodePage Lib "Keyboard"()
Declare Function GetKeyNameText Lib "Keyboard"(lParam As Long, lpBuffer As String, nSize As Integer) As Integer
'
' Language dependent Routines
Declare Function IsCharAlpha Lib "User"(cChar As Integer) As Integer
Declare Function IsCharAlphaNumeric Lib "User"(cChar As Integer) As Integer
Declare Function IsCharUpper Lib "User"(cChar As Integer) As Integer
Declare Function IsCharLower Lib "User"(cChar As Integer) As Integer
Declare Function GetWinFlags Lib "Kernel"() As Long
'
' -------------
'  GDI Section
' -------------
Declare Function DrawIcon Lib "User"(hDC As Integer, X As Integer, Y As Integer, hIcon As Integer) As Integer
Declare Function GetWindowDC Lib "User"(hWnd As Integer) As Integer
Declare Function GetDC Lib "User"(hWnd As Integer) As Integer
Declare Function ReleaseDC Lib "User"(hWnd As Integer, hDC As Integer) As Integer
Declare Function CreateDC Lib "GDI"(lpDriverName As String, lpDeviceName As String, lpOutput As String, lpInitData As String) As Integer
Declare Function CreateIC Lib "GDI"(lpDriverName As String, lpDeviceName As String, lpOutput As String, lpInitData As String) As Integer
Declare Function CreateCompatibleDC Lib "GDI"(hDC As Integer) As Integer
Declare Function DeleteDC Lib "GDI"(hDC As Integer) As Integer
Declare Function SaveDC Lib "GDI"(hDC As Integer) As Integer
Declare Function RestoreDC Lib "GDI"(hDC As Integer, nSavedDC As Integer) As Integer
Declare Function MoveTo Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function GetCurrentPosition Lib "GDI"(hDC As Integer) As Long
Declare Function LineTo Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Integer
Declare Function GetDCOrg Lib "GDI"(hDC As Integer) As Long
Declare Function MulDiv Lib "GDI"(nNumber As Integer, nNumerator As Integer, nDenominator As Integer) As Integer
Declare Function Rectangle Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer) As Integer
Declare Function RoundRect Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, X3 As Integer, Y3 As Integer) As Integer
Declare Function Ellipse Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer) As Integer
Declare Function Arc Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, X3 As Integer, Y3 As Integer, X4 As Integer, Y4 As Integer) As Integer
Declare Function Chord Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, X3 As Integer, Y3 As Integer, X4 As Integer, Y4 As Integer) As Integer
Declare Function Pie Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, X3 As Integer, Y3 As Integer, X4 As Integer, Y4 As Integer) As Integer
Declare Function PatBlt Lib "GDI"(hDC As Integer, X As Integer, Y As Integer, nWidth As Integer, nHeight As Integer, dwRop As Long) As Integer
Declare Function BitBlt Lib "GDI"(hDestDC As Integer, X As Integer, Y As Integer, nWidth As Integer, nHeight As Integer, hSrcDC As Integer, XSrc As Integer, YSrc As Integer, dwRop As Long) As Integer
Declare Function TextOut Lib "GDI"(hDC As Integer, X As Integer, Y As Integer, lpString As String, nCount As Integer) As Integer
Declare Function TabbedTextOut Lib "User"(hDC As Integer, X As Integer, Y As Integer, lpString As String, nCount As Integer, nTabPositions As Integer, lpnTabStopPositions As Integer, nTabOrigin As Integer) As Long
Declare Function GetCharWidth Lib "GDI"(hDC As Integer, wFirstChar As Integer, wLastChar As Integer, lpBuffer As Integer) As Integer
Declare Function SetPixel Lib "GDI"(hDC As Integer, X As Integer, Y As Integer, crColor As Long) As Long
Declare Function GetPixel Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function FloodFill Lib "GDI"(hDC As Integer, X As Integer, Y As Integer, crColor As Long) As Integer
Declare Function ExtFloodFill Lib "GDI"(hDC As Integer, X As Integer, Y As Integer, crColor As Long, wFillType As Integer) As Integer
Declare Function GetStockObject Lib "GDI"(nIndex As Integer) As Integer
Declare Function CreatePen Lib "GDI"(nPenStyle As Integer, nWidth As Integer, crColor As Long) As Integer
Declare Function CreateSolidBrush Lib "GDI"(crColor As Long) As Integer
Declare Function CreateHatchBrush Lib "GDI"(nIndex As Integer, crColor As Long) As Integer
Declare Function SetBrushOrg Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function GetBrushOrg Lib "GDI"(hDC As Integer) As Long
Declare Function CreatePatternBrush Lib "GDI"(hBitmap As Integer) As Integer
Declare Function CreateCompatibleBitmap Lib "GDI"(hDC As Integer, nWidth As Integer, nHeight As Integer) As Integer
Declare Function CreateDiscardableBitmap Lib "GDI"(hDC As Integer, nWidth As Integer, nHeight As Integer) As Integer
Declare Function SetBitmapDimension Lib "GDI"(hBitmap As Integer, X As Integer, Y As Integer) As Long
Declare Function GetBitmapDimension Lib "GDI"(hBitmap As Integer) As Long
Declare Function SelectClipRgn Lib "GDI"(hDC As Integer, hRgn As Integer) As Integer
Declare Function CreateRectRgn Lib "GDI"(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer) As Integer
Declare Sub SetRectRgn Lib "GDI"(hRgn As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer)
Declare Function CreateEllipticRgn Lib "GDI"(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer) As Integer
Declare Function CreateRoundRectRgn Lib "GDI"(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, X3 As Integer, Y3 As Integer) As Integer
Declare Function GetObject Lib "GDI"(hObject As Integer, nCount As Integer, lpObject As Long) As Integer
Declare Function GetObjectGDI Lib "GDI" Alias "GetObject"(hObject As Integer, nCount As Integer, lpObject As Long) As Integer
Declare Function DeleteObject Lib "GDI"(hObject As Integer) As Integer
Declare Function SelectObject Lib "GDI"(hDC As Integer, hObject As Integer) As Integer
Declare Function UnrealizeObject Lib "GDI"(hObject As Integer) As Integer
Declare Function SetBkColor Lib "GDI"(hDC As Integer, crColor As Long) As Long
Declare Function GetBkColor Lib "GDI"(hDC As Integer) As Long
Declare Function SetBkMode Lib "GDI"(hDC As Integer, nBkMode As Integer) As Integer
Declare Function GetBkMode Lib "GDI"(hDC As Integer) As Integer
Declare Function SetTextColor Lib "GDI"(hDC As Integer, crColor As Long) As Long
Declare Function GetTextColor Lib "GDI"(hDC As Integer) As Long
Declare Function SetTextAlign Lib "GDI"(hDC As Integer, wFlags As Integer) As Integer
Declare Function GetTextAlign Lib "GDI"(hDC As Integer) As Integer
Declare Function SetMapperFlags Lib "GDI"(hDC As Integer, dwFlag As Long) As Long
Declare Function GetAspectRatioFilter Lib "GDI"(hDC As Integer) As Long
Declare Function GetNearestColor Lib "GDI"(hDC As Integer, crColor As Long) As Long
Declare Function SetROP2 Lib "GDI"(hDC As Integer, nDrawMode As Integer) As Integer
Declare Function GetROP2 Lib "GDI"(hDC As Integer) As Integer
Declare Function SetStretchBltMode Lib "GDI"(hDC As Integer, nStretchMode As Integer) As Integer
Declare Function GetStretchBltMode Lib "GDI"(hDC As Integer) As Integer
Declare Function SetPolyFillMode Lib "GDI"(hDC As Integer, nPolyFillMode As Integer) As Integer
Declare Function GetPolyFillMode Lib "GDI"(hDC As Integer) As Integer
Declare Function SetMapMode Lib "GDI"(hDC As Integer, nMapMode As Integer) As Integer
Declare Function GetMapMode Lib "GDI"(hDC As Integer) As Integer
Declare Function SetWindowOrg Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function GetWindowOrg Lib "GDI"(hDC As Integer) As Long
Declare Function SetWindowExt Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function GetWindowExt Lib "GDI"(hDC As Integer) As Long
Declare Function SetViewportOrg Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function GetViewportOrg Lib "GDI"(hDC As Integer) As Long
Declare Function SetViewportExt Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function GetViewportExt Lib "GDI"(hDC As Integer) As Long
Declare Function OffsetViewportOrg Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function ScaleViewportExt Lib "GDI"(hDC As Integer, Xnum As Integer, Xdenom As Integer, Ynum As Integer, Ydenom As Integer) As Long
Declare Function OffsetWindowOrg Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Long
Declare Function ScaleWindowExt Lib "GDI"(hDC As Integer, Xnum As Integer, Xdenom As Integer, Ynum As Integer, Ydenom As Integer) As Long
Declare Function IntersectClipRect Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer) As Integer
Declare Function OffsetClipRgn Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Integer
Declare Function ExcludeClipRect Lib "GDI"(hDC As Integer, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer) As Integer
Declare Function PtVisible Lib "GDI"(hDC As Integer, X As Integer, Y As Integer) As Integer
Declare Function CombineRgn Lib "GDI"(hDestRgn As Integer, hSrcRgn1 As Integer, hSrcRgn2 As Integer, nCombineMode As Integer) As Integer
Declare Function EqualRgn Lib "GDI"(hSrcRgn1 As Integer, hSrcRgn2 As Integer) As Integer
Declare Function OffsetRgn Lib "GDI"(hRgn As Integer, X As Integer, Y As Integer) As Integer
Declare Function SetTextJustification Lib "GDI"(hDC As Integer, nBreakExtra As Integer, nBreakCount As Integer) As Integer
Declare Function GetTextExtent Lib "GDI"(hDC As Integer, lpString As String, nCount As Integer) As Long
Declare Function SetTextCharacterExtra Lib "GDI"(hDC As Integer, nCharExtra As Integer) As Integer
Declare Function GetTextCharacterExtra Lib "GDI"(hDC As Integer) As Integer
Declare Function GetMetaFile Lib "GDI"(lpFilename As String) As Integer
Declare Function DeleteMetaFile Lib "GDI"(hMF As Integer) As Integer
Declare Function CopyMetaFile Lib "GDI"(hMF As Integer, lpFilename As String) As Integer
Declare Function PlayMetaFile Lib "GDI"(hDC As Integer, hMF As Integer) As Integer
Declare Function GetTextFace Lib "GDI"(hDC As Integer, nCount As Integer, lpFacename As String) As Integer
Declare Function GetDeviceCaps Lib "GDI"(hDC As Integer, nIndex As Integer) As Integer
Declare Function SetEnvironment Lib "GDI"(lpPortName As String, lpEnviron As String, nCount As Integer) As Integer
Declare Function CloseMetaFile Lib "GDI"(hMF As Integer) As Integer
Declare Function GetMetaFileBits Lib "GDI"(hMF As Integer) As Integer
Declare Function SetMetaFileBits Lib "GDI"(hMem As Integer) As Integer
Declare Function CreateDIBPatternBrush Lib "GDI"(hPackedDIB As Integer, wUsage As Integer) As Integer
Declare Function SelectPalette Lib "User"(hDC As Integer, hPalette As Integer, bForceBackground As Integer) As Integer
Declare Function RealizePalette Lib "User"(hDC As Integer) As Integer
Declare Function UpdateColors Lib "GDI"(hDC As Integer) As Integer
Declare Function GetNearestPaletteIndex Lib "GDI"(hPalette As Integer, crColor As Long) As Integer
Declare Function ResizePalette Lib "GDI"(hPalette As Integer, nNumEntries As Integer) As Integer
Declare Function GetSystemPaletteUse Lib "GDI"(hDC As Integer) As Integer
Declare Function SetSystemPaletteUse Lib "GDI"(hDC As Integer, wUsage As Integer) As Integer
'
' --------------
'  USER Section
' --------------
Declare Function wvsprintf Lib "User"(lpOutput As String, lpFormat As String, lpArglist As Integer) As Integer
Declare Function RegisterWindowMessage Lib "User"(lpString As String) As Integer
Declare Function lopen Lib "Kernel" Alias "_lopen"(lpPathName As String, iReadWrite As Integer) As Integer
Declare Function lclose Lib "Kernel" Alias "_lclose"(hFile As Integer) As Integer
Declare Function lcreat Lib "Kernel" Alias "_lcreat"(lpPathName As String, iAttribute As Integer) As Integer
Declare Function llseek Lib "Kernel" Alias "_llseek"(hFile As Integer, lOffset As Long, iOrigin As Integer) As Long
Declare Function lread Lib "Kernel" Alias "_lread"(hFile As Integer, lpBuffer As String, wBytes As Integer) As Integer
Declare Function lwrite Lib "Kernel" Alias "_lwrite"(hFile As Integer, lpBuffer As String, wBytes As Integer) As Integer
Declare Function SwapMouseButton Lib "User"(bSwap As Integer) As Integer
Declare Function GetMessagePos Lib "User"() As Long
Declare Function GetMessageTime Lib "User"() As Long
Declare Function GetSysModalWindow Lib "User"() As Integer
Declare Function SetSysModalWindow Lib "User"(hWnd As Integer) As Integer
Declare Sub ReplyMessage Lib "User"(lReply As Long)
Declare Sub WaitMessage Lib "User"()
Declare Sub PostQuitMessage Lib "User"(nExitCode As Integer)
Declare Function InSendMessage Lib "User"() As Integer
' Special HWND value for use with PostMessage and SendMessage
Declare Function GetDoubleClickTime Lib "User"() As Integer
Declare Sub SetDoubleClickTime Lib "User"(wCount As Integer)
Declare Function UnregisterClass Lib "User"(lpClassName As String, hInstance As Integer) As Integer
Declare Function SetMessageQueue Lib "User"(cMsg As Integer) As Integer
Declare Function IsWindow Lib "User"(hWnd As Integer) As Integer
Declare Function IsChild Lib "User"(hWndParent As Integer, hWnd As Integer) As Integer
Declare Function DestroyWindow Lib "User"(hWnd As Integer) As Integer
Declare Function ShowWindow Lib "User"(hWnd As Integer, nCmdShow As Integer) As Integer
Declare Function FlashWindow Lib "User"(hWnd As Integer, bInvert As Integer) As Integer
Declare Sub ShowOwnedPopups Lib "User"(hWnd As Integer, fShow As Integer)
Declare Function OpenIcon Lib "User"(hWnd As Integer) As Integer
Declare Sub CloseWindow Lib "User"(hWnd As Integer)
Declare Sub MoveWindow Lib "User"(hWnd As Integer, X As Integer, Y As Integer, nWidth As Integer, nHeight As Integer, bRepaint As Integer)
Declare Sub SetWindowPos Lib "User"(hWnd As Integer, hWndInsertAfter As Integer, X As Integer, Y As Integer, cx As Integer, cy As Integer, wFlags As Integer)
Declare Sub BeginDeferWindowPos Lib "User"(nNumWindows As Integer)
Declare Sub DeferWindowPos Lib "User"(hWinPosInfo As Integer, hWnd As Integer, hWndInsertAfter As Integer, x As Integer, y As Integer, cx As Integer, cy As Integer, wFlags As Integer)
Declare Sub EndDeferWindowPos Lib "User"(hWinPosInfo As Integer)
Declare Function IsWindowVisible Lib "User"(hWnd As Integer) As Integer
Declare Function IsIconic Lib "User"(hWnd As Integer) As Integer
Declare Function AnyPopup Lib "User"() As Integer
Declare Sub BringWindowToTop Lib "User"(hWnd As Integer)
Declare Function IsZoomed Lib "User"(hWnd As Integer) As Integer
Declare Sub EndDialog Lib "User"(hDlg As Integer, nResult As Integer)
Declare Function GetDlgItem Lib "User"(hDlg As Integer, nIDDlgItem As Integer) As Integer
Declare Sub SetDlgItemInt Lib "User"(hDlg As Integer, nIDDlgItem As Integer, wValue As Integer, bSigned As Integer)
Declare Function GetDlgItemInt Lib "User"(hDlg As Integer, nIDDlgItem As Integer, lpTranslated As Integer, bSigned As Integer) As Integer
Declare Sub SetDlgItemText Lib "User"(hDlg As Integer, nIDDlgItem As Integer, lpString As String)
Declare Function GetDlgItemText Lib "User"(hDlg As Integer, nIDDlgItem As Integer, lpString As String, nMaxCount As Integer) As Integer
Declare Sub CheckDlgButton Lib "User"(hDlg As Integer, nIDButton As Integer, wCheck As Integer)
Declare Sub CheckRadioButton Lib "User"(hDlg As Integer, nIDFirstButton As Integer, nIDLastButton As Integer, nIDCheckButton As Integer)
Declare Function IsDlgButtonChecked Lib "User"(hDlg As Integer, nIDButton As Integer) As Integer
Declare Function GetNextDlgGroupItem Lib "User"(hDlg As Integer, hCtl As Integer, bPrevious As Integer) As Integer
Declare Function GetNextDlgTabItem Lib "User"(hDlg As Integer, hCtl As Integer, bPrevious As Integer) As Integer
Declare Function GetDlgCtrlID Lib "User"(hWnd As Integer) As Integer
Declare Function GetDialogBaseUnits Lib "User"() As Long
'
' Clipboard Manager Functions
Declare Function OpenClipboard Lib "User"(hWnd As Integer) As Integer
Declare Function CloseClipboard Lib "User"() As Integer
Declare Function GetClipboardOwner Lib "User"() As Integer
Declare Function SetClipboardViewer Lib "User"(hWnd As Integer) As Integer
Declare Function GetClipboardViewer Lib "User"() As Integer
Declare Function ChangeClipboardChain Lib "User"(hWnd As Integer, hWndNext As Integer) As Integer
Declare Function SetClipboardData Lib "User"(wFormat As Integer, hMem As Integer) As Integer
Declare Function GetClipboardData Lib "User"(wFormat As Integer) As Integer
Declare Function RegisterClipboardFormat Lib "User"(lpString As String) As Integer
Declare Function CountClipboardFormats Lib "User"() As Integer
Declare Function EnumClipboardFormats Lib "User"(wFormat As Integer) As Integer
Declare Function GetClipboardFormatName Lib "User"(wFormat As Integer, lpString As String, nMaxCount As Integer) As Integer
Declare Function EmptyClipboard Lib "User"() As Integer
Declare Function IsClipboardFormatAvailable Lib "User"(wFormat As Integer) As Integer
Declare Function GetPriorityClipboardFormat Lib "User"(lpPriorityList As Integer, nCount As Integer) As Integer
Declare Function SetFocusAPI Lib "User" Alias "SetFocus"(hWnd As Integer) As Integer
Declare Function GetFocus Lib "User"() As Integer
Declare Function GetActiveWindow Lib "User"() As Integer
Declare Function GetKeyState Lib "User"(nVirtKey As Integer) As Integer
Declare Function GetAsyncKeyState Lib "User"(vKey As Integer) As Integer
Declare Function EnableHardwareInput Lib "User"(bEnableInput As Integer) As Integer
Declare Function GetInputState Lib "User"() As Integer
Declare Function GetCapture Lib "User"() As Integer
Declare Function SetCapture Lib "User"(hWnd As Integer) As Integer
Declare Sub ReleaseCapture Lib "User"()
'
' Windows Functions
Declare Function KillTimer Lib "User"(hWnd As Integer, nIDEvent As Integer) As Integer
Declare Function EnableWindow Lib "User"(hWnd As Integer, aBOOL As Integer) As Integer
Declare Function IsWindowEnabled Lib "User"(hWnd As Integer) As Integer
Declare Function LoadAccelerators Lib "User"(hInstance As Integer, lpTableName As String) As Integer
Declare Function GetSystemMetrics Lib "User"(nIndex As Integer) As Integer
Declare Function LoadMenu Lib "User"(hInstance As Integer, lpString As String) As Integer
Declare Function GetMenu Lib "User"(hWnd As Integer) As Integer
Declare Function SetMenu Lib "User"(hWnd As Integer, hMenu As Integer) As Integer
Declare Function ChangeMenu Lib "User"(hMenu As Integer, wID As Integer, lpszNew As String, wIDNew As Integer, wChange As Integer) As Integer
Declare Function HiliteMenuItem Lib "User"(hWnd As Integer, hMenu As Integer, wIDHiliteItem As Integer, wHilite As Integer) As Integer
Declare Function GetMenuString Lib "User"(hMenu As Integer, wIDItem As Integer, lpString As String, nMaxCount As Integer, wFlag As Integer) As Integer
Declare Function GetMenuState Lib "User"(hMenu As Integer, wId As Integer, wFlags As Integer) As Integer
Declare Sub DrawMenuBar Lib "User"(hWnd As Integer)
Declare Function GetSystemMenu Lib "User"(hWnd As Integer, bRevert As Integer) As Integer
Declare Function CreateMenu Lib "User"() As Integer
Declare Function CreatePopupMenu Lib "User"() As Integer
Declare Function DestroyMenu Lib "User"(hMenu As Integer) As Integer
Declare Function CheckMenuItem Lib "User"(hMenu As Integer, wIDCheckItem As Integer, wCheck As Integer) As Integer
Declare Function EnableMenuItem Lib "User"(hMenu As Integer, wIDEnableItem As Integer, wEnable As Integer) As Integer
Declare Function GetSubMenu Lib "User"(hMenu As Integer, nPos As Integer) As Integer
Declare Function GetMenuItemID Lib "User"(hMenu As Integer, nPos As Integer) As Integer
Declare Function GetMenuItemCount Lib "User"(hMenu As Integer) As Integer
Declare Function RemoveMenu Lib "User"(hMenu As Integer, nPosition As Integer, wFlags As Integer) As Integer
Declare Function DeleteMenu Lib "User"(hMenu As Integer, nPosition As Integer, wFlags As Integer) As Integer
Declare Function SetMenuItemBitmaps Lib "User"(hMenu As Integer, nPosition As Integer, wFlags As Integer, hBitmapUnchecked As Integer, hBitmapChecked As Integer) As Integer
Declare Function GetMenuCheckMarkDimensions Lib "User"() As Long
Declare Function SetActiveWindow Lib "User"(hWnd As Integer) As Integer
Declare Function SetScrollPos Lib "User"(hWnd As Integer, nBar As Integer, nPos As Integer, bRedraw As Integer) As Integer
Declare Function GetScrollPos Lib "User"(hWnd As Integer, nBar As Integer) As Integer
Declare Sub SetScrollRange Lib "User"(hWnd As Integer, nBar As Integer, nMinPos As Integer, nMaxPos As Integer, bRedraw As Integer)
Declare Sub GetScrollRange Lib "User"(hWnd As Integer, nBar As Integer, lpMinPos As Integer, lpMaxPos As Integer)
Declare Sub ShowScrollBar Lib "User"(hWnd As Integer, wBar As Integer, bShow As Integer)
Declare Function SetProp Lib "User"(hWnd As Integer, lpString As String, hData As Integer) As Integer
Declare Function RemoveProp Lib "User"(hWnd As Integer, lpString As String) As Integer
Declare Sub SetWindowText Lib "User"(hWnd As Integer, lpString As String)
Declare Function GetWindowText Lib "User"(hWnd As Integer, lpString As String, aint As Integer) As Integer
Declare Function GetWindowTextLength Lib "User"(hWnd As Integer) As Integer
Declare Function MessageBox Lib "User"(hWnd As Integer, lpText As String, lpCaption As String, wType As Integer) As Integer
Declare Sub MessageBeep Lib "User"(wType As Integer)
Declare Function ShowCursor Lib "User"(bShow As Integer) As Integer
Declare Sub SetCursorPos Lib "User"(X As Integer, Y As Integer)
Declare Function SetCursor Lib "User"(hCursor As Integer) As Integer
Declare Sub CreateCaret Lib "User"(hWnd As Integer, hBitmap As Integer, nWidth As Integer, nHeight As Integer)
Declare Function GetCaretBlinkTime Lib "User"() As Integer
Declare Sub SetCaretBlinkTime Lib "User"(wMSeconds As Integer)
Declare Sub DestroyCaret Lib "User"()
Declare Sub HideCaret Lib "User"(hWnd As Integer)
Declare Sub ShowCaret Lib "User"(hWnd As Integer)
Declare Sub SetCaretPos Lib "User"(X As Integer, Y As Integer)
Declare Function GetSysColor Lib "User"(nIndex As Integer) As Long
Declare Sub SetSysColors Lib "User"(nChanges As Integer, lpSysColor As Integer, lpColorValues As Long)
Declare Function FillRgn Lib "GDI"(hDC As Integer, hRgn As Integer, hBrush As Integer) As Integer
Declare Function FrameRgn Lib "GDI"(hDC As Integer, hRgn As Integer, hBrush As Integer, nWidth As Integer, nHeight As Integer) As Integer
Declare Function InvertRgn Lib "GDI"(hDC As Integer, hRgn As Integer) As Integer
Declare Function PaintRgn Lib "GDI"(hDC As Integer, hRgn As Integer) As Integer
Declare Function PtInRegion Lib "GDI"(hRgn As Integer, X As Integer, Y As Integer) As Integer
Declare Function GetCurrentTime Lib "User"() As Long
Declare Function GetTickCount Lib "User"() As Long
Declare Function GetWindowWord Lib "User"(hWnd As Integer, nIndex As Integer) As Integer
Declare Function SetWindowWord Lib "User"(hWnd As Integer, nIndex As Integer, wNewWord As Integer) As Integer
Declare Function GetWindowLong Lib "User"(hWnd As Integer, nIndex As Integer) As Long
Declare Function SetWindowLong Lib "User"(hWnd As Integer, nIndex As Integer, dwNewLong As Long) As Long
Declare Function GetClassWord Lib "User"(hWnd As Integer, nIndex As Integer) As Integer
Declare Function SetClassWord Lib "User"(hWnd As Integer, nIndex As Integer, wNewWord As Integer) As Integer
Declare Function GetClassLong Lib "User"(hWnd As Integer, nIndex As Integer) As Long
Declare Function SetClassLong Lib "User"(hWnd As Integer, nIndex As Integer, dwNewLong As Long) As Long
Declare Function GetDesktopHwnd Lib "User"() As Integer
Declare Function GetDesktopWindow Lib "User"() As Integer
Declare Function GetParent Lib "User"(hWnd As Integer) As Integer
Declare Function SetParent Lib "User"(hWndChild As Integer, hWndNewParent As Integer) As Integer
Declare Function GetClassName Lib "User"(hWnd As Integer, lpClassName As String, nMaxCount As Integer) As Integer
Declare Function GetTopWindow Lib "User"(hWnd As Integer) As Integer
Declare Function GetNextWindow Lib "User"(hWnd As Integer, wFlag As Integer) As Integer
Declare Function GetWindowTask Lib "User"(hWnd As Integer) As Integer
Declare Function GetLastActivePopup Lib "User"(hwndOwnder As Integer) As Integer
Declare Function GetWindow Lib "User"(hWnd As Integer, wCmd As Integer) As Integer
'
' Resource Loading Routines
Declare Function DestroyCursor Lib "User"(hCursor As Integer) As Integer
Declare Function DestroyIcon Lib "User"(hIcon As Integer) As Integer
'
' Dialog Manager Routines
Declare Function DlgDirList Lib "User"(hDlg As Integer, lpPathSpec As String, nIDListBox As Integer, nIDStaticPath As Integer, wFiletype As Integer) As Integer
Declare Function DlgDirSelect Lib "User"(hDlg As Integer, lpString As String, nIDListBox As Integer) As Integer
Declare Function DlgDirListComboBox Lib "User"(hDlg As Integer, lpPathSpec As String, nIDComboBox As Integer, nIDStaticPath As Integer, wFileType As Integer) As Integer
Declare Function DlgDirSelectComboBox Lib "User"(hDlg As Integer, lpString As String, nIDComboBox As Integer) As Integer
'
' Sound Functions
Declare Function OpenSound Lib "Sound"() As Integer
Declare Sub CloseSound Lib "Sound"()
Declare Function SetVoiceQueueSize Lib "Sound"(nVoice As Integer, nBytes As Integer) As Integer
Declare Function SetVoiceNote Lib "Sound"(nVoice As Integer, nValue As Integer, nLength As Integer, nCdots As Integer) As Integer
Declare Function SetVoiceAccent Lib "Sound"(nVoice As Integer, nTempo As Integer, nVolume As Integer, nMode As Integer, nPitch As Integer) As Integer
Declare Function SetVoiceEnvelope Lib "Sound"(nVoice As Integer, nShape As Integer, nRepeat As Integer) As Integer
Declare Function SetSoundNoise Lib "Sound"(nSource As Integer, nDuration As Integer) As Integer
Declare Function SetVoiceSound Lib "Sound"(nVoice As Integer, lFrequency As Long, nDuration As Integer) As Integer
Declare Function StartSound Lib "Sound"() As Integer
Declare Function StopSound Lib "Sound"() As Integer
Declare Function WaitSoundState Lib "Sound"(nState As Integer) As Integer
Declare Function SyncAllVoices Lib "Sound"() As Integer
Declare Function CountVoiceNotes Lib "Sound"(nVoice As Integer) As Integer
Declare Function GetThresholdEvent Lib "Sound"() As Integer
Declare Function GetThresholdStatus Lib "Sound"() As Integer
Declare Function SetVoiceThreshold Lib "Sound"(nVoice As Integer, nNotes As Integer) As Integer
'
' Escape Functions
Declare Function OpenComm Lib "User"(lpComName As String, wInQueue As Integer, wOutQueue As Integer) As Integer
Declare Function ReadComm Lib "User"(nCid As Integer, lpBuf As String, nSize As Integer) As Integer
Declare Function UngetCommChar Lib "User"(nCid As Integer, cChar As Integer) As Integer
Declare Function WriteComm Lib "User"(nCid As Integer, lpBuf As String, nSize As Integer) As Integer
Declare Function CloseComm Lib "User"(nCid As Integer) As Integer
Declare Function TransmitCommChar Lib "User"(nCid As Integer, cChar As Integer) As Integer
Declare Function SetCommEventMask Lib "User"(nCid As Integer, nEvtMask As Integer) As Long
Declare Function GetCommEventMask Lib "User"(nCid As Integer, nEvtMask As Integer) As Integer
Declare Function SetCommBreak Lib "User"(nCid As Integer) As Integer
Declare Function ClearCommBreak Lib "User"(nCid As Integer) As Integer
Declare Function FlushComm Lib "User"(nCid As Integer, nQueue As Integer) As Integer
Declare Function EscapeCommFunction Lib "User"(nCid As Integer, nFunc As Integer) As Integer
Declare Function DefFrameProc Lib "User"(hWnd As Integer, hWndMDIClient As Integer, wMsg As Integer, wParam As Integer, lParam As Long) As Long
Declare Function DefMDIChildProc Lib "User"(hWnd As Integer, wMsg As Integer, wParam As Integer, lParam As Long) As Long
Declare Function ArrangeIconicWindows Lib "User"(hWnd As Integer) As Integer

Declare Function GetFreeSystemResources Lib "User"(fuSysResource As Integer) As Integer
'
' Drawing bounds accumulation APIs 
Declare Function SetMetaFileBitsBetter Lib "GDI"(hmt As Integer) As Integer
Declare Function StartPage Lib "GDI"(hdc As Integer) As Integer
Declare Function EndPage Lib "GDI"(hdc As Integer) As Integer
Declare Function EndDocAPI Lib "GDI" Alias "EndDoc"(hdc As Integer) As Integer
Declare Function AbortDoc Lib "GDI"(hdc As Integer) As Integer
Declare Function SpoolFile Lib "GDI"(lpszPrinter As String, lpszPort As String, lpszJob As String, lpszFile As String) As Integer
Declare Function GetMessageExtraInfo Lib "User"() As Long
Declare Function GetQueueStatus Lib "User"(fuFlags As Integer) As Long

