Declare Function GetGlyphOutline& Lib "GDI" (ByVal hdc%, ByVal uChar%, ByVal fuFormat%, lpgm As GLYPHMETRICS, ByVal cbBuffer&, ByVal lpBuffer$, lpmat2 As MAT2)
' GetGlyphOutline constants
Global Const GGO_METRICS = 0
Global Const GGO_BITMAP = 1
Global Const GGO_NATIVE = 2
Global Const TT_POLYGON_TYPE = 24
Global Const TT_PRIM_LINE = 1
Global Const TT_PRIM_QSPLINE = 2
Type POINTFX
x As FIXED
y As FIXED
End Type
Type TTPOLYCURVE
wType As Integer
cpfx As Integer
apfx As POINTFX
End Type
Type TTPOLYGONHEADER
cb As Long
dwType As Long
pfxStart As POINTFX
End Type
Type ABC
abcA As Integer
abcB As Integer
abcC As Integer
End Type
Declare Function GetCharABCWidths Lib "GDI" (ByVal hdc As Integer, ByVal uFirstChar As Integer, ByVal uLastChar As Integer, lpabc As ABC) As Integer
Type KERNINGPAIR
wFirst As Integer
wSecond As Integer
iKernAmount As Integer
End Type
Declare Function GetKerningPairs Lib "GDI" (ByVal hdc As Integer, ByVal cPairs As Integer, lpkrnpair As KERNINGPAIR) As Integer
Type RASTERIZER_STATUS
nSize As Integer
wFlags As Integer
nLanguageID As Integer
End Type
' bits defined in wFlags of RASTERIZER_STATUS
Global Const TT_AVAILABLE = &H0001
Global Const TT_ENABLED = &H0002
Declare Function GetRasterizerCaps Lib "GDI" (lpraststat As RASTERIZER_STATUS, ByVal cb As Integer) As Integer
Declare Function SetBitmapDimensionEx Lib "GDI" (ByVal hbm As Integer, ByVal nX As Integer, ByVal nY As Integer, lpSize As SIZE) As Integer
Declare Function GetBitmapDimensionEx Lib "GDI" (ByVal hBitmap As Integer, lpDimension As SIZE) As Integer
Declare Function SetMetaFileBitsBetter Lib "GDI" (ByVal hmt As Integer) As Integer
Type DOCINFO
cbSize As Integer
lpszDocName As Long
lpszOutput As Long
End Type
Declare Function StartDoc Lib "GDI" (ByVal hdc As Integer, lpdi As DOCINFO) As Integer
Declare Function StartPage Lib "GDI" (ByVal hdc As Integer) As Integer
Declare Function EndPage Lib "GDI" (ByVal hdc As Integer) As Integer
Declare Function EndDocAPI Lib "GDI" Alias "EndDoc" (ByVal hdc As Integer) As Integer
Declare Function AbortDoc Lib "GDI" (ByVal hdc As Integer) As Integer
Declare Function SpoolFile Lib "GDI" (ByVal lpszPrinter As String, ByVal lpszPort As String, ByVal lpszJob As String, ByVal lpszFile As String) As Integer
Global Const SM_CXDOUBLECLK = 36
Global Const SM_CYDOUBLECLK = 37
Global Const SM_CXICONSPACING = 38
Global Const SM_CYICONSPACING = 39
Global Const SM_MENUDROPALIGNMENT = 40
Global Const SM_PENWINDOWS = 41
Global Const SM_DBCSENABLED = 42
Declare Function SystemParametersInfo Lib "User" (ByVal uAction As Integer, ByVal uParam As Integer, lpvParam As Any, ByVal fuWinIni As Integer) As Integer
Global Const SPI_GETBEEP = 1
Global Const SPI_SETBEEP = 2
Global Const SPI_GETMOUSE = 3
Global Const SPI_SETMOUSE = 4
Global Const SPI_GETBORDER = 5
Global Const SPI_SETBORDER = 6
Global Const SPI_GETKEYBOARDSPEED = 10
Global Const SPI_SETKEYBOARDSPEED = 11
Global Const SPI_LANGDRIVER = 12
Global Const SPI_ICONHORIZONTALSPACING = 13
Global Const SPI_GETSCREENSAVETIMEOUT = 14
Global Const SPI_SETSCREENSAVETIMEOUT = 15
Global Const SPI_GETSCREENSAVEACTIVE = 16
Global Const SPI_SETSCREENSAVEACTIVE = 17
Global Const SPI_GETGRIDGRANULARITY = 18
Global Const SPI_SETGRIDGRANULARITY = 19
Global Const SPI_SETDESKWALLPAPER = 20
Global Const SPI_SETDESKPATTERN = 21
Global Const SPI_GETKEYBOARDDELAY = 22
Global Const SPI_SETKEYBOARDDELAY = 23
Global Const SPI_ICONVERTICALSPACING = 24
Global Const SPI_GETICONTITLEWRAP = 25
Global Const SPI_SETICONTITLEWRAP = 26
Global Const SPI_GETMENUDROPALIGNMENT = 27
Global Const SPI_SETMENUDROPALIGNMENT = 28
Global Const SPI_SETDOUBLECLKWIDTH = 29
Global Const SPI_SETDOUBLECLKHEIGHT = 30
Global Const SPI_GETICONTITLELOGFONT = 31
Global Const SPI_SETDOUBLECLICKTIME = 32
Global Const SPI_SETMOUSEBUTTONSWAP = 33
Global Const SPI_SETICONTITLELOGFONT = 34
Global Const SPI_GETFASTTASKSWITCH = 35
Global Const SPI_SETFASTTASKSWITCH = 36
' SystemParametersInfo flags
Global Const SPIF_UPDATEINIFILE = &H0001
Global Const SPIF_SENDWININICHANGE = &H0002
Declare Function GetMessageExtraInfo Lib "User" () As Long
Declare Function GetQueueStatus Lib "User" (ByVal fuFlags As Integer) As Long
' GetQueueStatus flags
Global Const QS_KEY = &H0001
Global Const QS_MOUSEMOVE = &H0002
Global Const QS_MOUSEBUTTON = &H0004
Global Const QS_MOUSE = (QS_MOUSEMOVE Or QS_MOUSEBUTTON)
Global Const QS_POSTMESSAGE = &H0008
Global Const QS_TIMER = &H0010
Global Const QS_PAINT = &H0020
Global Const QS_SENDMESSAGE = &H0040
Global Const QS_ALLINPUT = &H007f
' ***** Power management *****
Global Const WM_POWER = &H0048
' wParam for WM_POWER window message and DRV_POWER driver notification
Global Const PWR_OK = 1
Global Const PWR_FAIL = -1
Global Const PWR_SUSPENDREQUEST = 1
Global Const PWR_SUSPENDRESUME = 2
Global Const PWR_CRITICALRESUME = 3
Global Const GCW_ATOM = -32
Global Const WS_EX_TOPMOST = &H00000008&
Global Const WS_EX_ACCEPTFILES = &H00000010&
Global Const WS_EX_TRANSPARENT = &H00000020&
Type WINDOWPLACEMENT
length As Integer
flags As Integer
showCmd As Integer
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECT
End Type
Global Const WPF_SETMINPOSITION = &H0001
Global Const WPF_RESTORETOMAXIMIZED = &H0002
Declare Function GetWindowPlacement Lib "User" (ByVal hwnd As Integer, lpwndpl As WINDOWPLACEMENT) As Integer
Declare Function SetWindowPlacement Lib "User" (ByVal hwnd As Integer, lpwndpl As WINDOWPLACEMENT) As Integer
Global Const WM_WINDOWPOSCHANGING = &H0046
Global Const WM_WINDOWPOSCHANGED = &H0047
' WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
Type WINDOWPOS
hwnd As Integer
hwndInsertAfter As Integer
x As Integer
y As Integer
cx As Integer
cy As Integer
flags As Integer
End Type
Declare Sub MapWindowPoints Lib "User" (ByVal hwndFrom As Integer, ByVal hwndTo As Integer, lppt As POINTAPI, ByVal cPoints As Integer)
Declare Function GetDCEx Lib "User" (ByVal hwnd As Integer, ByVal hrgnclip As Integer, ByVal fdwOptions As Long) As Integer
Global Const DCX_WINDOW = &H00000001&
Global Const DCX_CACHE = &H00000002&
Global Const DCX_CLIPCHILDREN = &H00000008&
Global Const DCX_CLIPSIBLINGS = &H00000010&
Global Const DCX_PARENTCLIP = &H00000020&
Global Const DCX_EXCLUDERGN = &H00000040&
Global Const DCX_INTERSECTRGN = &H00000080&
Global Const DCX_LOCKWINDOWUPDATE = &H00000400&
Global Const DCX_USESTYLE = &H00010000&
Declare Function LockWindowUpdate Lib "User" (ByVal hwndLock As Integer) As Integer
Declare Function RedrawWindow Lib "User" (ByVal hwnd As Integer, lprcUpdate As RECT, ByVal hrgnUpdate As Integer, ByVal fuRedraw As Integer) As Integer
Global Const RDW_INVALIDATE = &H0001
Global Const RDW_INTERNALPAINT = &H0002
Global Const RDW_ERASE = &H0004
Global Const RDW_VALIDATE = &H0008
Global Const RDW_NOINTERNALPAINT = &H0010
Global Const RDW_NOERASE = &H0020
Global Const RDW_NOCHILDREN = &H0040
Global Const RDW_ALLCHILDREN = &H0080
Global Const RDW_UPDATENOW = &H0100
Global Const RDW_ERASENOW = &H0200
Global Const RDW_FRAME = &H0400
Global Const RDW_NOFRAME = &H0800
Declare Function ScrollWindowEx% Lib "User" (ByVal hwnd%, ByVal dx%, ByVal dy%, lprcScroll As RECT, lprcClip As RECT, ByVal hrgnUpdate%, lprcUpdate As RECT, ByVal fuScroll%)
Global Const SW_SCROLLCHILDREN = &H0001
Global Const SW_INVALIDATE = &H0002
Global Const SW_ERASE = &H0004
' WM_NCCALCSIZE return flags
Global Const WVR_ALIGNTOP = &H0010
Global Const WVR_ALIGNLEFT = &H0020
Global Const WVR_ALIGNBOTTOM = &H0040
Global Const WVR_ALIGNRIGHT = &H0080
Global Const WVR_HREDRAW = &H0100
Global Const WVR_VREDRAW = &H0200
Global Const WVR_REDRAW = (WVR_HREDRAW Or WVR_VREDRAW)
Global Const WVR_VALIDRECTS = &H0400
' WM_NCCALCSIZE parameter structure
Type NCCALCSIZE_PARAMS
rgrc As Long
lppos As Long
End Type
Global Const MA_NOACTIVATEANDEAT = 4
Declare Function IsMenu Lib "User" (ByVal hmenu As Integer) As Integer
Global Const TPM_RIGHTBUTTON = &H0002
Global Const TPM_LEFTALIGN = &H0000
Global Const TPM_CENTERALIGN = &H0004
Global Const TPM_RIGHTALIGN = &H0008
Declare Function GetOpenClipboardWindow Lib "User" () As Integer
Declare Function CopyCursor Lib "User" (ByVal hinst As Integer, ByVal hcur As Integer) As Integer
Declare Function GetCursor Lib "User" () As Integer
Declare Sub GetClipCursor Lib "User" (lprc As RECT)
Declare Function CopyIcon Lib "User" (ByVal hinst As Integer, ByVal hicon As Integer) As Integer
Global Const MDIS_ALLCHILDSTYLES = &H0001
' wParam values for WM_MDITILE and WM_MDICASCADE messages.
Global Const MDITILE_VERTICAL = &H0000
Global Const MDITILE_HORIZONTAL = &H0001
Global Const MDITILE_SKIPDISABLED = &H0002
' Static Control Mesages
Global Const STM_SETICON = (WM_USER+0)
Global Const STM_GETICON = (WM_USER+1)
Global Const ES_READONLY = &H00000800&
Global Const ES_WANTRETURN = &H00001000&
Global Const EM_GETFIRSTVISIBLELINE = (WM_USER+30)
Declare Function UnhookWindowsHookEx Lib "User" (ByVal hHook As Integer) As Integer
Declare Function CallNextHookEx Lib "User" (ByVal hHook As Integer, ByVal ncode As Integer, ByVal wParam As Integer, lParam As Any) As Long
' HCBT_CREATEWND parameters pointed to by lParam
Type CBT_CREATEWND
lpcs As Long
hwndInsertAfter As Integer
End Type
' HCBT_ACTIVATE structure pointed to by lParam
Type CBTACTIVATESTRUCT
fMouse As Integer
hWndActive As Integer
End Type
Global Const WH_HARDWARE = 8
Type HARDWAREHOOKSTRUCT
hWnd As Integer
wMessage As Integer
wParam As Integer
lParam As Long
End Type
' SetWindowsHook() Shell hook code
Global Const WH_SHELL = 10
Global Const HSHELL_WINDOWCREATED = 1
Global Const HSHELL_WINDOWDESTROYED = 2
Global Const HSHELL_ACTIVATESHELLWINDOW = 3
' SetWindowsHook debug hook support
Global Const WH_DEBUG = 9
Type DEBUGHOOKINFO
hModuleHook As Integer
reserved As Long
lParam As Long
wParam As Integer
code As Integer
End Type
Declare Function QuerySendMessage Lib "User" (ByVal hreserved1 As Integer, ByVal hreserved2 As Integer, ByVal hreserved3 As Integer, ByVal lpMessage As String) As Integer
Declare Function LockInput Lib "User" (ByVal hReserved As Integer, ByVal hwndInput As Integer, ByVal fLock As Integer) As Integer
Declare Function GetSystemDebugState Lib "User" () As Long
' Flags returned by GetSystemDebugState.
Global Const SDS_MENU = &H0001
Global Const SDS_SYSMODAL = &H0002
Global Const SDS_NOTASKQUEUE = &H0004
Global Const SDS_DIALOG = &H0008
Global Const SDS_TASKLOCKED = &H0010
' new escape functions
Global Const GETMAXLPT = 8
Global Const GETMAXCOM = 9
Global Const GETBASEIRQ = 10
' Comm Baud Rate indices
Global Const CBR_110 = &HFF10
Global Const CBR_300 = &HFF11
Global Const CBR_600 = &HFF12
Global Const CBR_1200 = &HFF13
Global Const CBR_2400 = &HFF14
Global Const CBR_4800 = &HFF15
Global Const CBR_9600 = &HFF16
Global Const CBR_14400 = &HFF17
Global Const CBR_19200 = &HFF18
Global Const CBR_38400 = &HFF1B
Global Const CBR_56000 = &HFF1F
Global Const CBR_128000 = &HFF23
Global Const CBR_256000 = &HFF27
' notifications passed in low word of lParam on WM_COMMNOTIFY messages
Global Const CN_RECEIVE = &H0001
Global Const CN_TRANSMIT = &H0002
Global Const CN_EVENT = &H0004
Declare Function EnableCommNotification Lib "User" (ByVal idComDev As Integer, ByVal hwnd As Integer, ByVal cbWriteNotify As Integer, ByVal OutQueue As Integer) As Integer
Global Const WM_COMMNOTIFY = &H0044
' Driver messages
Global Const DRV_LOAD = &H0001
Global Const DRV_ENABLE = &H0002
Global Const DRV_OPEN = &H0003
Global Const DRV_CLOSE = &H0004
Global Const DRV_DISABLE = &H0005
Global Const DRV_FREE = &H0006
Global Const DRV_CONFIGURE = &H0007
Global Const DRV_QUERYCONFIGURE = &H0008
Global Const DRV_INSTALL = &H0009
Global Const DRV_REMOVE = &H000A
Global Const DRV_EXITSESSION = &H000B
Global Const DRV_EXITAPPLICATION = &H000C
Global Const DRV_POWER = &H000F
Global Const DRV_RESERVED = &H0800
Global Const DRV_USER = &H4000
' LPARAM of DRV_CONFIGURE message
Type DRVCONFIGINFO
dwDCISize As Long
lpszDCISectionName As Long
lpszDCIAliasName As Long
End Type
' Supported return values for DRV_CONFIGURE message
Global Const DRVCNF_CANCEL = &H0000
Global Const DRVCNF_OK = &H0001
Global Const DRVCNF_RESTART = &H0002
' Supported lParam1 of DRV_EXITAPPLICATION notification
Global Const DRVEA_NORMALEXIT = &H0001
Global Const DRVEA_ABNORMALEXIT = &H0002
Declare Function DefDriverProc Lib "User" (ByVal dwDriverIdentifier As Long, ByVal hdrvr As Integer, ByVal umsg As Integer, lParam1 As Any, lParam2 As Any) As Long
Declare Function OpenDriver Lib "User" (ByVal lpDriverName As String, ByVal lpSectionName As String, lParam As Any) As Integer
Declare Function CloseDriver Lib "User" (ByVal hdrvr As Integer, lParam1 As Any, lParam2 As Any) As Long
Declare Function SendDriverMessage Lib "User" (ByVal hdrvr As Integer, ByVal msg As Integer, lParam1 As Any, lParam2 As Any) As Long
Declare Function GetDriverModuleHandle Lib "User" (ByVal hdrvr As Integer) As Integer
Declare Function GetNextDriver Lib "User" (ByVal hdrvr As Integer, ByVal fdwFlag As Long) As Integer
' GetNextDriver flags
Global Const GND_FIRSTINSTANCEONLY = &H00000001
Global Const GND_FORWARD = &H00000000
Global Const GND_REVERSE = &H00000002
Type DRIVERINFOSTRUCT
length As Integer
hDriver As Integer
hModule As Integer
szAliasName As String * 128
End Type
Declare Function GetDriverInfo Lib "User" (ByVal hdrvr As Integer, lpdis As DRIVERINFOSTRUCT) As Integer
' ***** LZEXPAND error return codes *****
Global Const LZERROR_BADINHANDLE = (-1) ' invalid input handle
Global Const LZERROR_BADOUTHANDLE = (-2) ' invalid output handle
Global Const LZERROR_READ = (-3) ' corrupt compressed file format
Global Const LZERROR_WRITE = (-4) ' out of space for output file
Global Const LZERROR_GLOBALLOC = (-5) ' insufficient memory for LZFile struct
Global Const LZERROR_GLOBLOCK = (-6) ' bad global handle
Global Const LZERROR_BADVALUE = (-7) ' input parameter out of range
Global Const LZERROR_UNKNOWNALG = (-8) ' compression algorithm not recognized
Declare Function LZStart Lib "LZexpand.dll" () As Integer
Declare Sub LZDone Lib "LZexpand.dll" ()
Declare Function CopyLZFile Lib "LZexpand.dll" (ByVal hfSource As Integer, ByVal hfDest As Integer) As Long
Declare Function LZCopy Lib "LZexpand.dll" (ByVal hfSource As Integer, ByVal hfDest As Integer) As Long
Declare Function LZInit Lib "LZexpand.dll" (ByVal hfSrc As Integer) As Integer
Declare Function GetExpandedName Lib "LZexpand.dll" (ByVal lpszSource As String, ByVal lpszBuffer As String) As Integer
Declare Function LZOpenFile Lib "LZexpand.dll" (ByVal lpszFile As String, lpOf As OFSTRUCT, ByVal style As Integer) As Integer
Declare Function LZSeek Lib "LZexpand.dll" (ByVal hfFile As Integer, ByVal lOffset As Long, ByVal nOrigin As Integer) As Long
Declare Function LZRead Lib "LZexpand.dll" (ByVal hfFile As Integer, ByVal lpvBuf As String, ByVal cb As Integer) As Integer
Declare Sub LZClose Lib "LZexpand.dll" (ByVal hfFile As Integer)
' ***** Windows Network support *****
Global Const WN_SUCCESS = &H0000
Global Const WN_NOT_SUPPORTED = &H001
Global Const WN_NET_ERROR = &H0002
Global Const WN_MORE_DATA = &H0003
Global Const WN_BAD_POINTER = &H0004
Global Const WN_BAD_VALUE = &H0005
Global Const WN_BAD_PASSWORD = &H0006
Global Const WN_ACCESS_DENIED = &H0007
Global Const WN_FUNCTION_BUSY = &H0008
Global Const WN_WINDOWS_ERROR = &H0009
Global Const WN_BAD_USER = &H000A
Global Const WN_OUT_OF_MEMORY = &H000B
Global Const WN_CANCEL = &H000C
Global Const WN_CONTINUE = &H000D
Global Const WN_NOT_CONNECTED = &H0030
Global Const WN_OPEN_FILES = &H0031
Global Const WN_BAD_NETNAME = &H0032
Global Const WN_BAD_LOCALNAME = &H0033
Global Const WN_ALREADY_CONNECTED = &H0034
Global Const WN_DEVICE_ERROR = &H0035
Global Const WN_CONNECTION_CLOSED = &H0036
Declare Function WNetAddConnection Lib "User" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Integer
Declare Function WNetCancelConnection Lib "User" (ByVal lpszName As String, ByVal bForce As Integer) As Integer
Declare Function WNetGetConnection Lib "User" (ByVal lpszLocalName As String, ByVal lpszRemoteName As String, cbRemoteName As Integer) As Integer