?? win32api.txt
字號:
Type UNLOAD_DLL_DEBUG_INFO
lpBaseOfDll As Long
End Type
Type OUTPUT_DEBUG_STRING_INFO
lpDebugStringData As String
fUnicode As Integer
nDebugStringLength As Integer
End Type
Type RIP_INFO
dwError As Long
dwType As Long
End Type
' GetDriveType return values
Const DRIVE_REMOVABLE = 2
Const DRIVE_FIXED = 3
Const DRIVE_REMOTE = 4
Const DRIVE_CDROM = 5
Const DRIVE_RAMDISK = 6
Const FILE_TYPE_UNKNOWN = &H0
Const FILE_TYPE_DISK = &H1
Const FILE_TYPE_CHAR = &H2
Const FILE_TYPE_PIPE = &H3
Const FILE_TYPE_REMOTE = &H8000
Const STD_INPUT_HANDLE = -10&
Const STD_OUTPUT_HANDLE = -11&
Const STD_ERROR_HANDLE = -12&
Const NOPARITY = 0
Const ODDPARITY = 1
Const EVENPARITY = 2
Const MARKPARITY = 3
Const SPACEPARITY = 4
Const ONESTOPBIT = 0
Const ONE5STOPBITS = 1
Const TWOSTOPBITS = 2
Const IGNORE = 0 ' Ignore signal
Const INFINITE = &HFFFF ' Infinite timeout
' Comm Baud Rate indices
Const CBR_110 = 110
Const CBR_300 = 300
Const CBR_600 = 600
Const CBR_1200 = 1200
Const CBR_2400 = 2400
Const CBR_4800 = 4800
Const CBR_9600 = 9600
Const CBR_14400 = 14400
Const CBR_19200 = 19200
Const CBR_38400 = 38400
Const CBR_56000 = 56000
Const CBR_57600 = 57600
Const CBR_115200 = 115200
Const CBR_128000 = 128000
Const CBR_256000 = 256000
' Error Flags
Const CE_RXOVER = &H1 ' Receive Queue overflow
Const CE_OVERRUN = &H2 ' Receive Overrun Error
Const CE_RXPARITY = &H4 ' Receive Parity Error
Const CE_FRAME = &H8 ' Receive Framing error
Const CE_BREAK = &H10 ' Break Detected
Const CE_TXFULL = &H100 ' TX Queue is full
Const CE_PTO = &H200 ' LPTx Timeout
Const CE_IOE = &H400 ' LPTx I/O Error
Const CE_DNS = &H800 ' LPTx Device not selected
Const CE_OOP = &H1000 ' LPTx Out-Of-Paper
Const CE_MODE = &H8000 ' Requested mode unsupported
Const IE_BADID = (-1) ' Invalid or unsupported id
Const IE_OPEN = (-2) ' Device Already Open
Const IE_NOPEN = (-3) ' Device Not Open
Const IE_MEMORY = (-4) ' Unable to allocate queues
Const IE_DEFAULT = (-5) ' Error in default parameters
Const IE_HARDWARE = (-10) ' Hardware Not Present
Const IE_BYTESIZE = (-11) ' Illegal Byte Size
Const IE_BAUDRATE = (-12) ' Unsupported BaudRate
' Events
Const EV_RXCHAR = &H1 ' Any Character received
Const EV_RXFLAG = &H2 ' Received certain character
Const EV_TXEMPTY = &H4 ' Transmitt Queue Empty
Const EV_CTS = &H8 ' CTS changed state
Const EV_DSR = &H10 ' DSR changed state
Const EV_RLSD = &H20 ' RLSD changed state
Const EV_BREAK = &H40 ' BREAK received
Const EV_ERR = &H80 ' Line status error occurred
Const EV_RING = &H100 ' Ring signal detected
Const EV_PERR = &H200 ' Printer error occured
Const EV_RX80FULL = &H400 ' Receive buffer is 80 percent full
Const EV_EVENT1 = &H800 ' Provider specific event 1
Const EV_EVENT2 = &H1000 ' Provider specific event 2
' Escape Functions
Const SETXOFF = 1 ' Simulate XOFF received
Const SETXON = 2 ' Simulate XON received
Const SETRTS = 3 ' Set RTS high
Const CLRRTS = 4 ' Set RTS low
Const SETDTR = 5 ' Set DTR high
Const CLRDTR = 6 ' Set DTR low
Const RESETDEV = 7 ' Reset device if possible
Const SETBREAK = 8 'Set the device break line
Const CLRBREAK = 9 ' Clear the device break line
' PURGE function flags.
Const PURGE_TXABORT = &H1 ' Kill the pending/current writes to the comm port.
Const PURGE_RXABORT = &H2 ' Kill the pending/current reads to the comm port.
Const PURGE_TXCLEAR = &H4 ' Kill the transmit queue if there.
Const PURGE_RXCLEAR = &H8 ' Kill the typeahead buffer if there.
Const LPTx = &H80 ' Set if ID is for LPT device
' Modem Status Flags
Const MS_CTS_ON = &H10&
Const MS_DSR_ON = &H20&
Const MS_RING_ON = &H40&
Const MS_RLSD_ON = &H80&
' WaitSoundState() Constants
Const S_QUEUEEMPTY = 0
Const S_THRESHOLD = 1
Const S_ALLTHRESHOLD = 2
' Accent Modes
Const S_NORMAL = 0
Const S_LEGATO = 1
Const S_STACCATO = 2
' SetSoundNoise() Sources
Const S_PERIOD512 = 0 ' Freq = N/512 high pitch, less coarse hiss
Const S_PERIOD1024 = 1 ' Freq = N/1024
Const S_PERIOD2048 = 2 ' Freq = N/2048 low pitch, more coarse hiss
Const S_PERIODVOICE = 3 ' Source is frequency from voice channel (3)
Const S_WHITE512 = 4 ' Freq = N/512 high pitch, less coarse hiss
Const S_WHITE1024 = 5 ' Freq = N/1024
Const S_WHITE2048 = 6 ' Freq = N/2048 low pitch, more coarse hiss
Const S_WHITEVOICE = 7 ' Source is frequency from voice channel (3)
Const S_SERDVNA = (-1) ' Device not available
Const S_SEROFM = (-2) ' Out of memory
Const S_SERMACT = (-3) ' Music active
Const S_SERQFUL = (-4) ' Queue full
Const S_SERBDNT = (-5) ' Invalid note
Const S_SERDLN = (-6) ' Invalid note length
Const S_SERDCC = (-7) ' Invalid note count
Const S_SERDTP = (-8) ' Invalid tempo
Const S_SERDVL = (-9) ' Invalid volume
Const S_SERDMD = (-10) ' Invalid mode
Const S_SERDSH = (-11) ' Invalid shape
Const S_SERDPT = (-12) ' Invalid pitch
Const S_SERDFQ = (-13) ' Invalid frequency
Const S_SERDDR = (-14) ' Invalid duration
Const S_SERDSR = (-15) ' Invalid source
Const S_SERDST = (-16) ' Invalid state
Const NMPWAIT_WAIT_FOREVER = &HFFFF
Const NMPWAIT_NOWAIT = &H1
Const NMPWAIT_USE_DEFAULT_WAIT = &H0
Const FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES
Const FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH
Const FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK
Const FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS
Const SECTION_QUERY = &H1
Const SECTION_MAP_WRITE = &H2
Const SECTION_MAP_READ = &H4
Const SECTION_MAP_EXECUTE = &H8
Const SECTION_EXTEND_SIZE = &H10
Const SECTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE
Const FILE_MAP_COPY = SECTION_QUERY
Const FILE_MAP_WRITE = SECTION_MAP_WRITE
Const FILE_MAP_READ = SECTION_MAP_READ
Const FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS
' OpenFile() Flags
Const OF_READ = &H0
Const OF_WRITE = &H1
Const OF_READWRITE = &H2
Const OF_SHARE_COMPAT = &H0
Const OF_SHARE_EXCLUSIVE = &H10
Const OF_SHARE_DENY_WRITE = &H20
Const OF_SHARE_DENY_READ = &H30
Const OF_SHARE_DENY_NONE = &H40
Const OF_PARSE = &H100
Const OF_DELETE = &H200
Const OF_VERIFY = &H400
Const OF_CANCEL = &H800
Const OF_CREATE = &H1000
Const OF_PROMPT = &H2000
Const OF_EXIST = &H4000
Const OF_REOPEN = &H8000
Const OFS_MAXPATHNAME = 128
' OpenFile() Structure
Type OFSTRUCT
cBytes As Byte
fFixedDisk As Byte
nErrCode As Integer
Reserved1 As Integer
Reserved2 As Integer
szPathName(OFS_MAXPATHNAME) As Byte
End Type
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Const PROCESSOR_INTEL_386 = 386
Const PROCESSOR_INTEL_486 = 486
Const PROCESSOR_INTEL_PENTIUM = 586
Const PROCESSOR_MIPS_R4000 = 4000
Const PROCESSOR_ALPHA_21064 = 21064
Const PROCESSOR_ARCHITECTURE_INTEL = 0
Const PROCESSOR_ARCHITECTURE_MIPS = 1
Const PROCESSOR_ARCHITECTURE_ALPHA = 2
Const PROCESSOR_ARCHITECTURE_PPC = 3
Const PROCESSOR_ARCHITECTURE_UNKNOWN = &hFFFF
Declare Function GetCurrentTime Lib "kernel32" Alias "GetTickCount" () As Long
' Flags for DrawFrameControl
Const DFC_CAPTION = 1
Const DFC_MENU = 2
Const DFC_SCROLL = 3
Const DFC_BUTTON = 4
Const DFCS_CAPTIONCLOSE = &H0
Const DFCS_CAPTIONMIN = &H1
Const DFCS_CAPTIONMAX = &H2
Const DFCS_CAPTIONRESTORE = &H3
Const DFCS_CAPTIONHELP = &H4
Const DFCS_MENUARROW = &H0
Const DFCS_MENUCHECK = &H1
Const DFCS_MENUBULLET = &H2
Const DFCS_MENUARROWRIGHT = &H4
Const DFCS_SCROLLUP = &H0
Const DFCS_SCROLLDOWN = &H1
Const DFCS_SCROLLLEFT = &H2
Const DFCS_SCROLLRIGHT = &H3
Const DFCS_SCROLLCOMBOBOX = &H5
Const DFCS_SCROLLSIZEGRIP = &H8
Const DFCS_SCROLLSIZEGRIPRIGHT = &H10
Const DFCS_BUTTONCHECK = &H0
Const DFCS_BUTTONRADIOIMAGE = &H1
Const DFCS_BUTTONRADIOMASK = &H2
Const DFCS_BUTTONRADIO = &H4
Const DFCS_BUTTON3STATE = &H8
Const DFCS_BUTTONPUSH = &H10
Const DFCS_INACTIVE = &H100
Const DFCS_PUSHED = &H200
Const DFCS_CHECKED = &H400
Const DFCS_ADJUSTRECT = &H2000
Const DFCS_FLAT = &H4000
Const DFCS_MONO = &H8000
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, ByVal Value As Long) As Long
' Loader Routines
Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As SECURITY_ATTRIBUTES, lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Declare Function SetProcessShutdownParameters Lib "kernel32" Alias "SetProcessShutdownParameters" (ByVal dwLevel As Long, ByVal 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" (ByVal uAction As Long, ByVal lpMessageText As String)
Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (lpStartupInfo As STARTUPINFO)
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As String
Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long
Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (ByVal lpName As String, ByVal lpValue As String) As Long
Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias "ExpandEnvironmentStringsA" (ByVal lpSrc As String, ByVal lpDst As String, ByVal nSize As Long) As Long
Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Declare Function LoadLibraryEx Lib "kernel32" Alias "LoadLibraryExA" (ByVal lpLibFileName As String, ByVal hFile As Long, ByVal dwFlags As Long) As Long
Const DONT_RESOLVE_DLL_REFERENCES = &H1
Declare Function LoadModule Lib "kernel32" Alias "LoadModule" (ByVal lpModuleName As String, lpParameterBlock As Any) As Long
Declare Function FreeLibrary Lib "kernel32" Alias "FreeLibrary" (ByVal hLibModule As Long) As Long
Declare Function WinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
Declare Sub DebugBreak Lib "kernel32" Alias "DebugBreak" ()
Declare Function ContinueDebugEvent Lib "kernel32" Alias "ContinueDebugEvent" (ByVal dwProcessId As Long, ByVal dwThreadId As Long, ByVal dwContinueStatus As Long) As Long
Declare Function DebugActiveProcess Lib "kernel32" Alias "DebugActiveProcess" (ByVal dwProcessId As Long) As Long
Type CRITICAL_SECTION
dummy As Long
End Type
Declare Sub InitializeCriticalSection Lib "kernel32" Alias "InitializeCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
Declare Sub EnterCriticalSection Lib "kernel32" Alias "EnterCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
Declare Sub LeaveCriticalSection Lib "kernel32" Alias "LeaveCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
Declare Sub DeleteCriticalSection Lib "kernel32" Alias "DeleteCriticalSection" (lpCriticalSection As CRITICAL_SECTION)
Declare Function SetEvent Lib "kernel32" Alias "SetEvent" (ByVal hEvent As Long) As Long
Declare Function ResetEvent Lib "kernel32" Alias "ResetEvent" (ByVal hEvent As Long) As Long
Declare Function PulseEvent Lib "kernel32" Alias "PulseEvent" (ByVal hEvent As Long) As Long
Declare Function ReleaseSemaphore Lib "kernel32" Alias "ReleaseSemaphore" (ByVal hSemaphore As Long, ByVal lReleaseCount As Long, lpPreviousCount As Long) As Long
Declare Function ReleaseMutex Lib "kernel32" Alias "ReleaseMutex" (ByVal hMutex As Long) As Long
Declare Function WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Declare Function WaitForMultipleObjects Lib "kernel32" Alias "WaitForMultipleObjects" (ByVal nCount As Long, lpHandles As Long, ByVal bWaitAll As Long, ByVal dwMilliseconds As Long) As Long
Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
Declare Function GetVersion Lib "kernel32" Alias "GetVersion" () As Long
Declare Function OpenFile Lib "kernel32" Alias "OpenFile" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
' GetTempFileName() Flags
'
Const TF_FORCEDRIVE = &H80
Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long
Declare Function SetHandleCount Lib "kernel32" Alias "SetHandleCount" (ByVal wNumber As Long) As Long
Declare Function GetLogicalDrives Lib "kernel32" Alias "GetLogicalDrives" () As Long
Declare Function LockFile Lib "kernel32" Alias "LockFile" (ByVal hFile As Long, ByVal dwFileOffsetLow As Long, ByVal dwFileOffsetHigh As Long, ByVal nNumberOfBytesToLockLow As Long, ByVal nNumberOfBytesToLockHigh As Long) As Long
Declare Function UnlockFile Lib "kernel32" Alias "UnlockFile" (ByVal hFile As Long, ByVal dwFileOffsetLow As Long, ByVal dwFileOffsetHigh As Long, ByVal nNumberOfBytesToUnlockLow As Long, ByVal nNumberOfBytesToUnlockHigh As Long) As Long
Declare Function LockFileEx Lib "kernel32" Alias "LockFileEx" (ByVal hFile As Long, ByVal dwFlags As Long, ByVal dwReserved As Long, ByVal nNumberOfBytesToLockLow As Long, ByVal nNumberOfBytesToLockHigh As Long, lpOverlapped As OVERLAPPED) As Long
Const LOCKFILE_FAIL_IMMEDIATELY = &H1
Const LOCKFILE_EXCLUSIVE_LOCK = &H2
Declare Function UnlockFileEx Lib "kernel32" Alias "UnlockFileEx" (ByVal hFile As Long, ByVal dwReserved As Long, ByVal nNumberOfBytesToUnlockLow As Long, ByVal nNumberOfBytesToUnlockHigh As Long, lpOverlapped As OVERLAPPED) As Long
Type BY_HANDLE_FILE_INFORMATION
dwFileAttributes As Long
ftCreationTime As FILETIME
ftLastAccessTime As FILETIME
ftLastWriteTime As FILETIME
dwVolumeSerialNumber As Long
nFileSizeHigh As Long
nFileSizeLow As Long
nNumberOfLinks As Long
nFileIndexHigh As Long
nFileIndexLow As Long
End Type
Declare Function GetFileInformationByHandle Lib "kernel32" Alias "GetFileInformationByHandle" (ByVal hFile As Long, lpFileInformation As BY_HANDLE_FILE_INFORMATION) As Long
Declare Function GetFileType Lib "kernel32" Alias "GetFileType" (ByVal hFile As Long) As Long
Declare Function GetFileSize Lib "kernel32" Alias "GetFileSize" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
Declare Function GetStdHandle Lib "kernel32" Alias "GetStdHandle" (ByVal nStdHandle As Long) As Long
Declare Function SetStdHandle Lib "kernel32" Alias "SetStdHandle" (ByVal nStdHandle As Long, ByVal nHandle As Long) As
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -