Msgbox GetVBHeader
GetVBHeader ,This is only part of the function of VB multi-threaded programming. It is like a medical insurance product in a hospital, masks are just one of them.
[VB6] - Module for working with multithreading.-VBForums
https://www.vbforums.com/showthread....=1#post5456137
:)stdexethd.zip
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
GetVBHeader ,This is only part of the function of VB multi-threaded programming. It is like a medical insurance product in a hospital, masks are just one of them.
[VB6] - Module for working with multithreading.-VBForums
https://www.vbforums.com/showthread....=1#post5456137
:)stdexethd.zip
Code:
hModule = App.hInstance
' // Get VBHeader structure
Public Function GetVBHeader() As Long
Dim ptr As Long
' // Get e_lfanew
GetMem4 ByVal hModule + &H3C, ptr
' // Get AddressOfEntryPoint
GetMem4 ByVal ptr + &H28 + hModule, ptr
' // Get VBHeader
GetMem4 ByVal ptr + hModule + 1, GetVBHeader
End Function