Jump to content
Tuts 4 You

How To Use Dr0,..,Dr7 In VB ?


Sh4DoVV

Recommended Posts

Same as in any other language with SetThreadContext:

Declare Function SetThreadContext Lib "kernel32.dll" _
Alias "SetThreadContext" ( _
ByVal hThread As Long, _
lpContext As CONTEXT) As Long
Public Type CONTEXT86
ContextFlags As Long
Dr0 As Long
Dr1 As Long
Dr2 As Long
Dr3 As Long
Dr6 As Long
Dr7 As Long
FloatSave As FLOATING_SAVE_AREA
SegGs As Long
SegFs As Long
SegEs As Long
SegDs As Long
Edi As Long
Esi As Long
Ebx As Long
Edx As Long
Ecx As Long
Eax As Long
Ebp As Long
Eip As Long
SegCs As Long
EFlags As Long
Esp As Long
SegSs As Long
End Type
Link to comment

But do not use this API on a running thread (e.g. the current), suspend it first. Dependent on VB's way to process exception you could give modifying the CONTEXT pointer in an exception handler a try.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...