Created
March 24, 2012 00:06
-
-
Save kumatti1/2176573 to your computer and use it in GitHub Desktop.
vtbl書き出し
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Declare Sub RtlMoveMemory Lib "Kernel32.dll" (ByVal Destination&, ByVal Source&, ByVal length&) | |
Sub hoge() | |
Dim vtbl&() | |
Dim pVtbl&, pObj&, size&, i& | |
Dim unk As stdole.IUnknown | |
ReDim vtbl(0 To 25) '適当 | |
size = (UBound(vtbl) + 1) * 4 | |
Set unk = Application | |
pObj = ObjPtr(unk) | |
RtlMoveMemory VarPtr(pVtbl), pObj, 4 | |
RtlMoveMemory VarPtr(vtbl(0)), pVtbl, size | |
For i = 0 To UBound(vtbl) | |
' Debug.Print Hex$(vtbl(i)); vbCrLf | |
Debug.Print vtbl(i); vbCrLf | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment