Changeset 160 for Include/api_system.sbp
- Timestamp:
- Mar 13, 2007, 1:13:06 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/api_system.sbp
r142 r160 18 18 Const _FuncName_CreateProcess = "CreateProcessW" 19 19 Const _FuncName_DeleteFile = "DeleteFileW" 20 Const _FuncName_ExpandEnvironmentStrings = "ExpandEnvironmentStringsW" 20 21 Const _FuncName_FatalAppExit = "FatalAppExitW" 21 22 Const _FuncName_FindFirstChangeNotification = "FindFirstChangeNotificationW" 22 23 Const _FuncName_FindFirstFile = "FindFirstFileW" 23 24 Const _FuncName_FindNextFile = "FindNextFileW" 25 Const _FuncName_FindResource = "FindResourceW" 24 26 Const _FuncName_FormatMessage = "FormatMessageW" 25 27 Const _FuncName_FreeEnvironmentStrings = "FreeEnvironmentStringsW" … … 37 39 Const _FuncName_GetFullPathName = "GetFullPathNameW" 38 40 Const _FuncName_GetLogicalDriveStrings = "GetLogicalDriveStringsW" 41 Const _FuncName_GetLongPathName = "GetLongPathNameW" 39 42 Const _FuncName_GetModuleFileName = "GetModuleFileNameW" 40 43 Const _FuncName_GetModuleHandle = "GetModuleHandleW" … … 51 54 Const _FuncName_LoadLibrary = "LoadLibraryW" 52 55 Const _FuncName_LoadLibraryEx = "LoadLibraryExW" 56 Const _FuncName_LookupPrivilegeValue = "LookupPrivilegeValueW" 53 57 Const _FuncName_lstrcat = "lstrcatW" 54 58 Const _FuncName_lstrcmp = "lstrcmpW" 55 59 Const _FuncName_lstrcmpi = "lstrcmpiW" 56 60 Const _FuncName_lstrcpy = "lstrcpyW" 61 Const _FuncName_lstrcpyn = "lstrcpynW" 57 62 Const _FuncName_MoveFile = "MoveFileW" 58 63 Const _FuncName_OpenEvent = "OpenEventW" … … 80 85 Const _FuncName_CreateProcess = "CreateProcessA" 81 86 Const _FuncName_DeleteFile = "DeleteFileA" 87 Const _FuncName_ExpandEnvironmentStrings = "ExpandEnvironmentStringsA" 82 88 Const _FuncName_FatalAppExit = "FatalAppExitA" 83 89 Const _FuncName_FindFirstChangeNotification = "FindFirstChangeNotificationA" 84 90 Const _FuncName_FindFirstFile = "FindFirstFileA" 85 91 Const _FuncName_FindNextFile = "FindNextFileA" 92 Const _FuncName_FindResource = "FindResourceA" 86 93 Const _FuncName_FormatMessage = "FormatMessageA" 87 94 Const _FuncName_FreeEnvironmentStrings = "FreeEnvironmentStringsA" … … 99 106 Const _FuncName_GetFullPathName = "GetFullPathNameA" 100 107 Const _FuncName_GetLogicalDriveStrings = "GetLogicalDriveStringsA" 108 Const _FuncName_GetLongPathName = "GetLongPathNameA" 101 109 Const _FuncName_GetModuleFileName = "GetModuleFileNameA" 102 110 Const _FuncName_GetModuleHandle = "GetModuleHandleA" … … 113 121 Const _FuncName_LoadLibrary = "LoadLibraryA" 114 122 Const _FuncName_LoadLibraryEx = "LoadLibraryExA" 123 Const _FuncName_LookupPrivilegeValue = "LookupPrivilegeValueA" 115 124 Const _FuncName_lstrcat = "lstrcatA" 116 125 Const _FuncName_lstrcmp = "lstrcmpA" 117 126 Const _FuncName_lstrcmpi = "lstrcmpiA" 118 127 Const _FuncName_lstrcpy = "lstrcpyA" 128 Const _FuncName_lstrcpyn = "lstrcpynA" 119 129 Const _FuncName_MoveFile = "MoveFileA" 120 130 Const _FuncName_OpenEvent = "OpenEventA" … … 483 493 Declare Function CreateEvent Lib "kernel32" Alias _FuncName_CreateEvent (pEventAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, bInitialState As BOOL, pName As PCTSTR) As HANDLE 484 494 Declare Function CreateMutex Lib "kernel32" Alias _FuncName_CreateMutex (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCTSTR) As HANDLE 495 Declare Function CreatePipe Lib "Kernel32" ( 496 ByRef hReadPipe As HANDLE, 497 ByRef hWritePipe As HANDLE, 498 ByVal pPipeAttributes As *SECURITY_ATTRIBUTES, 499 ByVal nSize As DWORD) As Long 485 500 Declare Function CreateSemaphore Lib "kernel32" Alias _FuncName_CreateSemaphore (pSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, pName As PCTSTR) As HANDLE 486 501 … … 646 661 ) As Long 647 662 Declare Function DisableThreadLibraryCalls Lib "kernel32" (hLibModule As HINSTANCE) As BOOL 648 Declare Function DosDateTimeToFileTime Lib "kernel32" (wFatDate As Word, wFatTime As Word, ByRef lpFileTime As FILETIME) As BOOL663 Declare Function DosDateTimeToFileTime Lib "kernel32" (wFatDate As Word, wFatTime As Word, ByRef FileTime As FILETIME) As BOOL 649 664 650 665 Const DUPLICATE_CLOSE_SOURCE = 1 … … 788 803 Declare Function GetLogicalDrives Lib "kernel32" () As DWord 789 804 Declare Function GetLogicalDriveStrings Lib "kernel32" Alias _FuncName_GetLogicalDriveStrings (nBufferLength As DWord, pBuffer As PTSTR) As DWord 805 Declare Function GetLongPathName Lib "kernel32" Alias _FuncName_GetLongPathName (lpszShortPath As LPCTSTR, lpszLongPath As LPTSTR, cchBuffer As DWord) As DWord 790 806 Declare Function GetModuleFileName Lib "kernel32" Alias _FuncName_GetModuleFileName (hModule As HINSTANCE, lpFileName As PTSTR, nSize As DWord) As DWord 791 807 Declare Function GetModuleHandle Lib "kernel32" Alias _FuncName_GetModuleHandle (lpModuleName As PTSTR) As HINSTANCE … … 796 812 bWait As BOOL 797 813 ) As BOOL 814 Type SYSTEM_POWER_STATUS 815 ACLineStatus As Byte 816 BatteryFlag As Byte 817 BatteryLifePercent As Byte 818 Reserved1 As Byte 819 BatteryLifeTime As Long 820 BatteryFullLifeTime As Long 821 End Type 822 Declare Function GetSystemPowerStatus Lib "kernel32" (ByRef SystemPowerStatus As SYSTEM_POWER_STATUS) As Long 798 823 Declare Function GetPriorityClass Lib "kernel32" (hProcess As HANDLE) As DWord 799 824 Declare Function GetProcAddress Lib "kernel32" (hModule As HINSTANCE, pProcName As PCSTR) As DWord … … 868 893 Const TIME_FORCE24HOURFORMAT = &H00000008 869 894 Declare Function GetTimeFormat Lib "kernel32" Alias _FuncName_GetTimeFormat (Locale As LCID, dwFlags As DWord, ByRef Time As SYSTEMTIME, lpFormat As PCTSTR, lpTimeStr As PTSTR, cchTime As DWord) As BOOL 870 871 895 Declare Function GetUserDefaultLCID Lib "kernel32" () As LCID 872 896 Declare Function GetUserName Lib "advapi32" Alias _FuncName_GetUserName (pBuffer As PTSTR, ByRef nSize As DWord) As BOOL … … 967 991 Declare Function LoadLibraryEx Lib "kernel32" Alias _FuncName_LoadLibraryEx (pLibFileName As PCTSTR, hFile As HANDLE, dwFlags As DWord) As HINSTANCE 968 992 969 Declare Function lstrcat Lib "kernel32" Alias _FuncName_lstrcat (pString1 As PTSTR, pString2 As PCTSTR) As PSTR 970 Declare Function lstrcmp Lib "kernel32" Alias _FuncName_lstrcmp (pString1 As PCTSTR, pString2 As PCTSTR) As Long 971 Declare Function lstrcmpi Lib "kernel32" Alias _FuncName_lstrcmpi (pString1 As PCTSTR, pString2 As PCTSTR) As Long 972 Declare Function lstrcpy Lib "kernel32" Alias _FuncName_lstrcpy (pString1 As PTSTR, pString2 As PCTSTR) As PSTR 973 Declare Function lstrlenA Lib "kernel32" (pString As PCSTR) As Long 974 Declare Function lstrlenW Lib "kernel32" (pString As PCWSTR) As Long 993 Declare Function lstrcat Lib "kernel32" Alias _FuncName_lstrcat (lpString1 As LPTSTR, lpString2 As LPCTSTR) As LPTSTR 994 Declare Function lstrcmp Lib "kernel32" Alias _FuncName_lstrcmp (lpString1 As LPCTSTR, lpString2 As LPCTSTR) As Long 995 Declare Function lstrcmpi Lib "kernel32" Alias _FuncName_lstrcmpi (lpString1 As LPCTSTR, lpString2 As LPCTSTR) As Long 996 Declare Function lstrcpy Lib "kernel32" Alias _FuncName_lstrcpy (lpString1 As LPTSTR, lpString2 As LPCTSTR) As LPTSTR 997 Declare Function lstrcpyn Lib "kernel32" Alias _FuncName_lstrcpyn (lpString1 As LPTSTR,ByVal lpString2 As LPCTSTR,ByVal iMaxLength As Long) As LPTSTR 998 Declare Function lstrlenA Lib "kernel32" (lpString As LPCSTR) As Long 999 Declare Function lstrlenW Lib "kernel32" (lpString As LPCWSTR) As Long 975 1000 #ifdef UNICODE 976 Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" ( pString AsPCWSTR) As Long1001 Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" (lpString As LPCWSTR) As Long 977 1002 #else 978 Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" ( pString AsPCSTR) As Long1003 Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (lpString As LPCSTR) As Long 979 1004 #endif 980 1005 Declare Sub memcpy Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T) 981 1006 Declare Function MoveFile Lib "kernel32" Alias _FuncName_MoveFile (lpExistingFileName As LPCTSTR, lpNewFileName As LPCTSTR) As BOOL 982 Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)1007 Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As PVOID, pSrc As VoidPtr, length As SIZE_T) 983 1008 984 1009 Declare Function MulDiv Lib "kernel32" ( … … 1030 1055 pArguments As *ULONG_PTR) 1031 1056 Declare Function ReadFile Lib "kernel32" (hFile As HANDLE, lpBuffer As VoidPtr, nNumberOfBytesToRead As DWord, lpNumberOfBytesRead As DWordPtr, ByRef lpOverlapped As OVERLAPPED) As BOOL 1057 Declare Function ReadProcessMemory Lib "Kernel32" (hProcess As HANDLE, lpBaseAddress As VoidPtr, lpBuffer As VoidPtr, nSize As SIZE_T, lpNumberOfBytesRead As *SIZE_T) As BOOL 1032 1058 Declare Function ReleaseMutex Lib "kernel32" (hMutex As HANDLE) As BOOL 1033 1059 Declare Function ReleaseSemaphore Lib "kernel32" (hSemaphore As HANDLE, lReleaseCount As Long, ByRef lpPreviousCount As Long) As BOOL … … 1066 1092 ) As BOOL 1067 1093 1068 Const EXCEPTION_MAXIMUM_PARAMETERS = ELM(15)1094 Const EXCEPTION_MAXIMUM_PARAMETERS = 15 1069 1095 1070 1096 Type EXCEPTION_RECORD … … 1074 1100 ExceptionAddress As VoidPtr 1075 1101 NumberParameters As DWord 1076 ExceptionInformation[E XCEPTION_MAXIMUM_PARAMETERS] As ULONG_PTR1102 ExceptionInformation[ELM(EXCEPTION_MAXIMUM_PARAMETERS)] As ULONG_PTR 1077 1103 End Type 1078 1104 … … 1416 1442 Const WAIT_IO_COMPLETION = &h000000C0 'STATUS_USER_APC 1417 1443 1444 Declare Function FindResource Lib "kernel32" Alias _FuncName_FindResource (hInstance As HINSTANCE, lpName As LPCTSTR, lpType As LPCTSTR) As HRSRC 1445 Declare Function LoadResource Lib "kernel32" (hModule As HMODULE, hResInfo As HRSRC) As HGLOBAL 1446 Declare Function FreeResource Lib "kernel32" (hResData As HGLOBAL) As BOOL 1447 Declare Function LockResource Lib "kernel32" (hResData As HGLOBAL) As VoidPtr 1448 Declare Function SizeofResource Lib "kernel32" (hModule As HANDLE, hResInfo As HRSRC) As DWord 1449 1450 Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias _FuncName_ExpandEnvironmentStrings (lpSrc As LPCTSTR, lpDst As LPTSTR, nSize As DWord) As DWord 1451 1452 Type DCB 1453 DCBlength As DWord 1454 BaudRate As DWord 1455 fBitFields As DWord 1456 wReserved As Word 1457 XonLim As Word 1458 XoffLim As Word 1459 ByteSize As Byte 1460 Parity As Byte 1461 StopBits As Byte 1462 XonChar As CHAR 1463 XoffChar As CHAR 1464 ErrorChar As CHAR 1465 EofChar As CHAR 1466 EvtChar As CHAR 1467 wReserved1 As Word 1468 End Type 1469 1470 Type COMMTIMEOUTS 1471 ReadIntervalTimeout As DWord 1472 ReadTotalTimeoutMultiplier As DWord 1473 ReadTotalTimeoutConstant As DWord 1474 WriteTotalTimeoutMultiplier As DWord 1475 WriteTotalTimeoutConstant As DWord 1476 End Type 1477 Type COMSTAT 1478 fCoBitFlds As Long 'See Comment in Win32API.Txt 1479 cbInQue As DWord 1480 cbOutQue As DWord 1481 End Type 1482 Declare Function SetCommState Lib "kernel32" (hCommDev As HANDLE, ByRef dcb As DCB) As BOOL 1483 Declare Function SetCommTimeouts Lib "kernel32" (hFile As HANDLE ,ByRef pCommTimeouts As COMMTIMEOUTS) As BOOL 1484 Declare Function ClearCommError Lib "kernel32" (hCommDevs As HANDLE, ByRef Errors As DWord, ByRef Stat As COMSTAT) As BOOL 1485 Declare Function EscapeCommFunction Lib "kernel32" (nCid As HANDLE, ByVal nFunc As DWord) As BOOL 1486 Declare Function GetCommModemStatus Lib "kernel32" (hFile As HANDLE, ByRef ModemStat As DWord) As BOOL 1487 Declare Function SetCommMask Lib "kernel32" (hFile As HANDLE, dwEvtMask As DWord) As BOOL 1488 Declare Function WaitCommEvent Lib "kernel32" (hFile As HANDLE, ByRef EvtMask As DWord, lpOverlapped As *OVERLAPPED) As BOOL 1489 1490 Const ANYSIZE_ARRAY = 1 1491 Type LUID 1492 LowPart As DWord 1493 HighPart As Long 1494 End Type 1495 Type LUID_AND_ATTRIBUTES 1496 Luid As LUID 1497 Attributes As DWord 1498 End Type 1499 TypeDef PLUID_AND_ATTRIBUTES = *LUID_AND_ATTRIBUTES 1500 'TypeDef LUID_AND_ATTRIBUTES_ARRAY = LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY] 1501 'TypeDef PLUID_AND_ATTRIBUTES_ARRAY = *LUID_AND_ATTRIBUTES_ARRAY 1502 1503 Type TOKEN_PRIVILEGES 1504 PrivilegeCount As DWord 1505 Privileges[ELM(ANYSIZE_ARRAY)] As LUID_AND_ATTRIBUTES 1506 End Type 1507 1508 Declare Function OpenProcessToken Lib "advapi32" (ProcessHandle As HANDLE, DesiredAccess As DWord, ByRef TokenHandle As HANDLE) As BOOL 1509 Declare Function LookupPrivilegeValue Lib "advapi32" Alias _FuncName_LookupPrivilegeValue (lpSystemName As LPCTSTR, lpName As LPCTSTR, ByRef Luid As LUID) As Long 1510 Declare Function AdjustTokenPrivileges Lib "advapi32" (TokenHandle As Long, DisableAllPrivileges As Long,_ 1511 ByRef NewState As TOKEN_PRIVILEGES, BufferLength As Long, 1512 ByRef PreviousState As TOKEN_PRIVILEGES, ByRef ReturnLength As Long) As Long 1513 1418 1514 #endif '_INC_SYSTEM
Note:
See TracChangeset
for help on using the changeset viewer.