Declare PtrSafe Function SetPriorityClass Lib "kernel32" Alias "SetPriorityClass" (ByVal hProcess As LongPtr, ByVal dwPriorityClass As Long) As Long Declare PtrSafe Function GetPriorityClass Lib "kernel32" Alias "GetPriorityClass" (ByVal hProcess As LongPtr) As Long #If Win64 Then Type M128A Low...
Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long #End If 我罗列了一些写法,大家可以参考:Declare PtrSafe Function GetProfileString Lib "kernel32" Alias "GetProfileStringA" (ByVal lpAppName As ...
Declare PtrSafe Function GetThreadPriority Lib "kernel32" Alias "GetThreadPriority" (ByVal hThread As LongPtr) As Long Declare PtrSafe Function GetThreadTimes Lib "kernel32" Alias "GetThreadTimes" (ByVal hThread As LongPtr, lpCreationTime As FILETIME, lpExitTime As FILETIME, lpKernelTime As FILETI...
Declare PtrSafe Function EqualPrefixSid Lib "advapi32.dll" Alias "EqualPrefixSid" (pSid1 As Any, pSid2 As Any) As Long Declare PtrSafe Function GetSidLengthRequired Lib "advapi32.dll" Alias "GetSidLengthRequired" (ByVal nSubAuthorityCount As Byte) As Long Declare PtrSafe Function AllocateAnd...
Declare PtrSafe Function CreatePrivateObjectSecurity Lib "advapi32.dll" Alias "CreatePrivateObjectSecurity" (ParentDescriptor As SECURITY_DESCRIPTOR, CreatorDescriptor As SECURITY_DESCRIPTOR, NewDescriptor As SECURITY_DESCRIPTOR, ByVal IsDirectoryObject As Long, ByVal Token As LongPtr, GenericMapping As ...
Declare PtrSafe Function GetUserDefaultLCID Lib "kernel32" Alias "GetUserDefaultLCID" () As Long ' Locale Independent APIs Declare PtrSafe Function GetStringTypeA Lib "kernel32" Alias "GetStringTypeA" (ByVal lcid As Long, ByVal dwInfoType As Long, ByVal lpSrcStr As String, ByVal cchSrc As ...
Declare PtrSafe Function SetConsoleMode Lib "kernel32" Alias "SetConsoleMode" (ByVal hConsoleHandle As LongPtr, ByVal dwMode As Long) As Long Declare PtrSafe Function SetConsoleActiveScreenBuffer Lib "kernel32" Alias "SetConsoleActiveScreenBuffer" (ByVal hConsoleOutput As LongPtr) As Long Declare ...
Private Declare Function timeGetTime Lib "winmm.dll" () As Long 延时函数和上面的一样,只是将Timer函数换成timeGetTime: '精确延时程序 Private Declare PtrSafe Function timeGetTime Lib "winmm.dll" () As Long Sub delay(T As Long) Dim time1 As Long ...
Declare PtrSafe Function GlobalFindAtom Lib "kernel32" Alias "GlobalFindAtomA" (ByVal lpString As String) As Integer Declare PtrSafe Function GlobalGetAtomName Lib "kernel32" Alias "GlobalGetAtomNameA" (ByVal nAtom As Integer, ByVal lpBuffer As String, ByVal nSize As Long) As Long ...
Declare PtrSafe Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long Declare PtrSafe Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long Declare PtrSafe Function GetCur...