1.Private Declare PtrSafe Function timeGetTime Lib 'winmm.dll' () As Long 2.Sub delay(T As Long) 3.Dim time1 As Long 4.time1 = timeGetTime 5.Do 6.DoEvents 7.Loop While timeGetTime - time1 < T 8.End Sub 9.Sub ce_time() 10.Dim d As Date 11. 12.d = Time() 13.Call...
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 OpenBackupEventLog Lib "advapi32.dll" Alias "OpenBackupEventLogA" (ByVal lpUNCServerName As String, ByVal lpFileName As String) As LongPtr Declare PtrSafe Function ReadEventLog Lib "advapi32.dll" Alias "ReadEventLogA" (ByVal hEventLog As LongPtr, ByVal dwReadF...
今日是第十 部分。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 The...
Declare PtrSafe Function GetPriorityClass Lib "kernel32" Alias "GetPriorityClass" (ByVal hProcess As LongPtr) As Long #If Win64 Then Type M128A Low As LongLong High As LongLong End Type Type XMM_SAVE_AREA32 ControlWord As Integer StatusWord As Integer ...
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 Sub... #EndIf 示例1: #If VBA7 Then ' 64位 Private Declare PtrSafe Function apisndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Declare PtrSafe Function apiPlaySound Lib "winmm.dll" Alias "PlaySoundA" (...
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 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 ...