?? apidebughookinfo.cls
字號:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "ApiDEBUGHOOKINFO"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit
' ##MODULE_DESCRIPTION This class provides the properties that a DEBUG hook returns _
when a debug event occurs in the process that has been hooked.
Private Type DebugHookInfo
hModuleHook As Long
Reserved As Long
lParam As Long
wParam As Long
Code As Long
End Type
Public hModuleHook As Long
Public Reserved As Long
Public lParam As Long
Public wParam As Long
Public Code As Long
Public CreatedOK As Boolean
'\\ Private memory handling functions
Private Declare Sub CopyMemoryDebugHookInfo Lib "kernel32" Alias "RtlMoveMemory" (Destination As DebugHookInfo, ByVal Source As Long, ByVal Length As Long)
Private Declare Function IsBadReadPtrDebugHookInfo Lib "kernel32" Alias "IsBadReadPtr" (ByVal lp As Long, ByVal ucb As Long) As Long
Private Declare Function IsBadWritePtrDebugHookInfo Lib "kernel32" Alias "IsBadWritePtr" (ByVal lp As Long, ByVal ucb As Long) As Long
'\\ --[CreateFromPointer]---------------------------------------------
'\\ Fills this DebugHookInfo object from the location poiunted to by
'\\ lpDebugHookInfo
'\\ VB.NET Porting note: This function should be replaced with an override
'\\ of the New() for correctness
'\\ ----------------------------------------------------------------------------------------
'\\ (c) 2001 - Merrion Computing. All rights to use, reproduce or publish this code reserved
'\\ Please check http://www.merrioncomputing.com for updates.
'\\ ----------------------------------------------------------------------------------------
Friend Function CreateFromPointer(lpDebugHookInfo As Long) As Boolean
Dim ftThis As DebugHookInfo
CreatedOK = False
If Not IsBadReadPtrDebugHookInfo(lpDebugHookInfo, Len(ftThis)) Then
Call CopyMemoryDebugHookInfo(ftThis, lpDebugHookInfo, Len(ftThis))
If Err.LastDllError = 0 Then
With ftThis
Code = .Code
hModuleHook = .hModuleHook
lParam = .lParam
Reserved = .Reserved
wParam = .wParam
If Err.LastDllError = 0 Then
CreatedOK = True
End If
End With
End If
End If
CreateFromPointer = CreatedOK
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -