Changeset 628 for trunk/ab5.0/ablib/src/api_system.sbp
- Timestamp:
- Sep 21, 2008, 2:01:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/api_system.sbp
r599 r628 3 3 #ifdef UNICODE 4 4 Const _FuncName_AddAtom = "AddAtomW" 5 Const _FuncName_CompareString = "CompareStringW"6 5 Const _FuncName_CopyFile = "CopyFileW" 7 6 Const _FuncName_CreateDirectory = "CreateDirectoryW" … … 28 27 Const _FuncName_GetComputerName = "GetComputerNameW" 29 28 Const _FuncName_GetCurrentDirectory = "GetCurrentDirectoryW" 30 Const _FuncName_GetDateFormat = "GetDateFormatW"31 29 Const _FuncName_GetDiskFreeSpace = "GetDiskFreeSpaceW" 32 30 Const _FuncName_GetDiskFreeSpaceEx = "GetDiskFreeSpaceExW" … … 50 48 Const _FuncName_GetTempFileName = "GetTempFileNameW" 51 49 Const _FuncName_GetTempPath = "GetTempPathW" 52 Const _FuncName_GetTimeFormat = "GetTimeFormatW"53 50 Const _FuncName_GetUserName = "GetUserNameW" 54 51 Const _FuncName_GetVersionEx = "GetVersionExW" 55 52 Const _FuncName_GetWindowsDirectory = "GetWindowsDirectoryW" 56 Const _FuncName_LCMapString = "LCMapStringW"57 53 Const _FuncName_LoadLibrary = "LoadLibraryW" 58 54 Const _FuncName_LoadLibraryEx = "LoadLibraryExW" … … 76 72 #else 77 73 Const _FuncName_AddAtom = "AddAtomA" 78 Const _FuncName_CompareString = "CompareStringA"79 74 Const _FuncName_CopyFile = "CopyFileA" 80 75 Const _FuncName_CreateDirectory = "CreateDirectoryA" … … 105 100 Const _FuncName_GetComputerName = "GetComputerNameA" 106 101 Const _FuncName_GetCurrentDirectory = "GetCurrentDirectoryA" 107 Const _FuncName_GetDateFormat = "GetDateFormatA"108 102 Const _FuncName_GetDiskFreeSpace = "GetDiskFreeSpaceA" 109 103 Const _FuncName_GetDiskFreeSpaceEx = "GetDiskFreeSpaceExA" … … 123 117 Const _FuncName_GetTempFileName = "GetTempFileNameA" 124 118 Const _FuncName_GetTempPath = "GetTempPathA" 125 Const _FuncName_GetTimeFormat = "GetTimeFormatA"126 119 Const _FuncName_GetUserName = "GetUserNameA" 127 120 Const _FuncName_GetVersionEx = "GetVersionExA" 128 121 Const _FuncName_GetWindowsDirectory = "GetWindowsDirectoryA" 129 Const _FuncName_LCMapString = "LCMapStringA"130 122 Const _FuncName_LoadLibrary = "LoadLibraryA" 131 123 Const _FuncName_LoadLibraryEx = "LoadLibraryExA" … … 207 199 Const GPTR = GMEM_FIXED or GMEM_ZEROINIT 208 200 Const GMEM_DISCARDED = &H4000 209 210 ' Locale flag211 Const LOCALE_NOUSEROVERRIDE = &H80000000212 201 213 202 'Critical Section … … 272 261 #endif 273 262 274 275 263 Declare Function Beep Lib "kernel32" (dwFreq As DWord, dwDuration As DWord) As BOOL 276 264 Declare Function CloseHandle Lib "kernel32" (hObject As HANDLE) As BOOL 277 265 278 266 Declare Function CompareFileTime Lib "kernel32" (ByRef FileTime1 As FILETIME, ByRef FileTime2 As FILETIME) As Long 279 280 Const NORM_IGNORECASE = &H00000001281 Const NORM_IGNORENONSPACE = &H00000002282 Const NORM_IGNORESYMBOLS = &H00000004283 Const SORT_STRINGSORT = &H00001000284 Const NORM_IGNOREKANATYPE = &H00010000285 Const NORM_IGNOREWIDTH = &H00020000286 Const CSTR_LESS_THAN = 1287 Const CSTR_EQUAL = 2288 Const CSTR_GREATER_THAN = 3289 Declare Function CompareString Lib "kernel32" Alias _FuncName_CompareString (Locale As LCID, dwCmpFlags As DWord, pString1 As PCTSTR, cchCount1 As Long, pString2 As PCTSTR, cchCount2 As Long) As Long290 267 291 268 Declare Function CopyFile Lib "kernel32" Alias _FuncName_CopyFile (pExistingFileName As PCTSTR, pNewFileName As PCTSTR, bFailIfExists As BOOL) As BOOL … … 294 271 Declare Function CreateMutex Lib "kernel32" Alias _FuncName_CreateMutex (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCTSTR) As HANDLE 295 272 Declare Function CreatePipe Lib "Kernel32" ( 296 297 298 299 273 ByRef hReadPipe As HANDLE, 274 ByRef hWritePipe As HANDLE, 275 ByVal pPipeAttributes As *SECURITY_ATTRIBUTES, 276 ByVal nSize As DWord) As Long 300 277 Declare Function CreateSemaphore Lib "kernel32" Alias _FuncName_CreateSemaphore (pSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, pName As PCTSTR) As HANDLE 301 278 … … 517 494 Declare Function GetCurrentThreadId Lib "kernel32" () As DWord 518 495 519 Const DATE_SHORTDATE = &H00000001520 Const DATE_LONGDATE = &H00000002521 Const DATE_USE_ALT_CALENDAR = &H00000004522 Declare Function GetDateFormat Lib "kernel32" Alias _FuncName_GetDateFormat (Locale As LCID, dwFlags As DWord, ByRef Date As SYSTEMTIME, pFormat As PCTSTR, pDateStr As PTSTR, cchDate As Long) As Long523 524 496 Declare Function GetDiskFreeSpace Lib "kernel32" Alias _FuncName_GetDiskFreeSpace (pRootPathName As PCTSTR, lpSectorsPerCluster As *DWord, pBytesPerSector As *DWord, pNumberOfFreeClusters As *DWord, pTotalNumberOfClusters As *DWord) As BOOL 525 497 Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias _FuncName_GetDiskFreeSpaceEx (pDirectoryName As PCTSTR, ByRef lpFreeBytesAvailableToCaller As ULARGE_INTEGER, ByRef TotalNumberOfBytes As ULARGE_INTEGER, ByRef TotalNumberOfFreeBytes As ULARGE_INTEGER) As BOOL … … 656 628 Declare Function GetTickCount Lib "kernel32" () As DWord 657 629 658 Const TIME_NOMINUTESORSECONDS = &H00000001659 Const TIME_NOSECONDS = &H00000002660 Const TIME_NOTIMEMARKER = &H00000004661 Const TIME_FORCE24HOURFORMAT = &H00000008662 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 BOOL663 Declare Function GetUserDefaultLCID Lib "kernel32" () As LCID664 630 Declare Function GetUserName Lib "advapi32" Alias _FuncName_GetUserName (pBuffer As PTSTR, ByRef nSize As DWord) As BOOL 665 631 Declare Function GetVersionEx Lib "kernel32" Alias _FuncName_GetVersionEx (ByRef VersionInformation As OSVERSIONINFO) As BOOL … … 696 662 Declare Function IsBadReadPtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL 697 663 Declare Function IsBadWritePtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL 698 Declare Function IsDBCSLeadByte Lib "kernel32" (TestChar As Byte) As BOOL699 664 700 665 #ifdef _WIN64 701 666 Declare Function IsWow64Process Lib "kernel32" (hProcess As HANDLE, ByRef bWow64Process As BOOL) As BOOL 702 667 #endif 703 704 Const LCMAP_LOWERCASE = &H00000100 ' lower case letters705 Const LCMAP_UPPERCASE = &H00000200 ' upper case letters706 Const LCMAP_SORTKEY = &H00000400 ' WC sort key (normalize)707 Const LCMAP_BYTEREV = &H00000800 ' byte reversal708 Const LCMAP_HIRAGANA = &H00100000 ' map katakana to hiragana709 Const LCMAP_KATAKANA = &H00200000 ' map hiragana to katakana710 Const LCMAP_HALFWIDTH = &H00400000 ' map double byte to single byte711 Const LCMAP_FULLWIDTH = &H00800000 ' map single byte to double byte712 Const LCMAP_LINGUISTIC_CASING = &H01000000 ' use linguistic rules for casing713 Const LCMAP_SIMPLIFIED_CHINESE = &H02000000 ' map traditional chinese to simplified chinese714 Const LCMAP_TRADITIONAL_CHINESE = &H04000000 ' map simplified chinese to traditional chinese715 Declare Function LCMapString Lib "kernel32" Alias _FuncName_LCMapString (Locale As LCID, dwMapFlags As DWord, lpSrcStr As LPCTSTR, cchSrc As Long, lpDestStr As LPTSTR, cchDest As Long) As Long716 668 717 669 Declare Sub LeaveCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION) … … 755 707 ) As Long 756 708 757 Const CP_ACP = 0 'default to ANSI code page758 Const CP_OEMCP = 1 'default to OEM code page759 Const CP_MACCP = 2 'default to MAC code page760 Const CP_THREAD_ACP = 3 'current thread's ANSI code page761 Const CP_SYMBOL = 42 'SYMBOL translations762 Const CP_UTF7 = 65000 'UTF-7 translation763 Const CP_UTF8 = 65001 'UTF-8 translation764 765 Declare Function MultiByteToWideChar Lib "kernel32" (CodePage As DWord, dwFlags As DWord, pMultiByteStr As PCSTR, cchMultiByte As Long, pWideCharStr As PWSTR, cchWideChar As Long) As Long766 709 Declare Function OpenEvent Lib "kernel32" Alias _FuncName_OpenEvent (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE 767 710 Declare Function OpenMutex Lib "kernel32" Alias _FuncName_OpenMutex (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE … … 831 774 Declare Function TerminateProcess Lib "kernel32" (hProcess As HANDLE, dwExitCode As DWord) As BOOL 832 775 Declare Function TerminateThread Lib "kernel32" (hThread As HANDLE, dwExitCode As DWord) As BOOL 776 777 Const TLS_OUT_OF_INDEXES = &hffffffff As DWord 833 778 Declare Function TlsAlloc Lib "kernel32" () As DWord 834 779 Declare Function TlsFree Lib "kernel32" (dwTlsIndex As DWord) As BOOL … … 870 815 Declare Function WaitForSingleObjectEx Lib "kernel32" (hHandle As HANDLE, dwMilliseconds As DWord, bAlertable As BOOL) As DWord 871 816 872 Const WC_COMPOSITECHECK = &H00000200873 Const WC_DISCARDNS = &H00000010874 Const WC_SEPCHARS = &H00000020875 Const WC_DEFAULTCHAR = &H00000040876 Const WC_NO_BEST_FIT_CHARS = &H00000400877 Declare Function WideCharToMultiByte Lib "Kernel32" (878 CodePage As DWord,879 dwFlags As DWord,880 pWideCharStr As PCWSTR,881 cchWideChar As Long,882 pMultiByteStr As PSTR,883 cbMultiByte As Long,884 pDefaultChar As PCSTR,885 pUsedDefaultChar As *BOOL886 ) As Long887 888 817 Declare Function WriteFile Lib "kernel32" (hFile As HANDLE, lpBuffer As VoidPtr, nNumberOfBytesToWrite As DWord, lpNumberOfBytesWritten As *DWord, ByRef pOverlapped As OVERLAPPED) As BOOL 889 818 Declare Sub ZeroMemory Lib "kernel32" Alias "RtlZeroMemory" (Destination As VoidPtr, dwLength As DWord)
Note: See TracChangeset
for help on using the changeset viewer.