Msgbox GetVBHeader
Code:
Private Type MODULEINFO
lpBaseDLL As Long
ImageSize As Long
EntryPoint As Long
End Type
Private Declare Function GetModuleInformation Lib "psapi.dll" (ByVal hProcess As Long, ByVal hModule As Long, mInfo As MODULEINFO, ByVal cbSize As Long) As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Function GetVBHeader() As Long
Dim mInfo As MODULEINFO
GetModuleInformation GetCurrentProcess(), &H400000, mInfo, 12
If mInfo.EntryPoint Then CopyMemory GetVBHeader, ByVal mInfo.EntryPoint + 1, 4
End Function