|
' ==============================================================================
' "RtlMoveMemory" and popular synonyms
Public Declare Sub RtlMoveMemory Lib "kernel32" ( _
dst As Any, _
src As Any, _
ByVal nBytes As Long)
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
dst As Any, _
src As Any, _
ByVal nBytes As Long)
' (re-)typed aliases
Public Declare Sub CopyMemLng Lib "kernel32.dll" Alias "RtlMoveMemory" ( _
ByVal dst As Long, _
ByVal src As Long, _
ByVal nBytes As Long)
Public Declare Sub PokeInt Lib "kernel32" Alias "RtlMoveMemory" ( _
ByVal Addr As Long, _
Value As Long, _
Optional ByVal nBytes As Long = 2)
Public Declare Sub PokeLng Lib "kernel32" Alias "RtlMoveMemory" ( _
ByVal Addr As Long, _
Value As Long, _
Optional ByVal nBytes As Long = 4)
' ==============================================================================
' "RtlZeroMemory"
Public Declare Sub RtlZeroMemory Lib "kernel32" ( _
dst As Any, _
ByVal nBytes As Long)
' ==============================================================================
' "RtlFillMemory"
Public Declare Sub RtlFillMemory Lib "kernel32" ( _
dst As Any, _
ByVal nBytes As Long, _
ByVal bFill As Byte)
' ==============================================================================
' "VarPtr" and popular synonyms
#If VB5 = 1 Then
' note that msvbvm50.dll calls are a bit faster
Public Declare Function ArrPtr Lib "msvbvm50.dll" Alias "VarPtr" ( _
Ptr() As Any) As Long '<-- VB5
Public Declare Function VarPtrArray Lib "msvbvm50.dll" Alias "VarPtr" ( _
Ptr() As Any) As Long '<-- VB5
#Else
Public Declare Function ArrPtr Lib "msvbvm60.dll" Alias "VarPtr" ( _
Ptr() As Any) As Long '<-- VB6
Public Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" ( _
Ptr() As Any) As Long '<-- VB6
#End If
' ==============================================================================
' "SysAllocStringByteLen"
Public Declare Function SysAllocStringByteLen Lib "oleaut32" ( _
ByVal olestr As Long, _
ByVal BLen As Long) As Long
|