Feb 21st, 2003, 11:34 AM
#1
Thread Starter
Frenzied Member
Debugger written in VB - needs a bit of cleaning up...
The attached is a debugger/dependency walker application written in VB. I need a bit of help adding the ability to view (and ultimately edit) the resources held in the executable (and it's loaded libraries)
You will need a good understanding of API to do this...
Attached Files
Feb 24th, 2003, 04:58 AM
#2
Thread Starter
Frenzied Member
Hmm - kinda depressing that nobody is even prepared to download the code and take a look.
Mar 7th, 2003, 07:59 AM
#3
Retired VBF Adm1nistrator
Originally posted by MerrionComputin
Hmm - kinda depressing that nobody is even prepared to download the code and take a look.
Dunc, that's because your level of VB expertise is so far above everyone else's, it sorta leaves us all in the dark a little.
Lonely at the top 'eh ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
Mar 7th, 2003, 08:54 AM
#4
Thread Starter
Frenzied Member
I shall have to write some catch-up articles so
Mar 15th, 2003, 04:40 AM
#5
Lively Member
i was debugging IEXPLORE.EXE and it gave me an overflow.. any ideas? coz i need complete control over IEXPLORE.EXE.. i want to get events from it and all that..
Mar 16th, 2003, 07:45 PM
#6
Addicted Member
I got the same problem (the Overflow), but with McAfee Virus Scan.
Mar 18th, 2003, 05:35 AM
#7
Thread Starter
Frenzied Member
You couldn't perhaps give me the line of code that gave the overflow?
Mar 18th, 2003, 05:39 AM
#8
Retired VBF Adm1nistrator
Originally posted by MerrionComputin
You couldn't perhaps give me the line of code that gave the overflow?
Yeah just give them a few minutes to dig up the source for IE and Mcafee anti-virus
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
Mar 18th, 2003, 05:56 AM
#9
Thread Starter
Frenzied Member
OK ...backs away slowly...
I'm guessing the VB code was throwing the overflow error? When the message comes up press CTRL+BREAK and the line causeing the error should show up..?
Mar 18th, 2003, 09:32 AM
#10
Addicted Member
Here's the place in the VB code:
(For VirusScan)
Module: DebugMain.bas
This line: If btSrc + btCarry + btDest > &HFF Then
In this context:
If btSrc + btCarry + btDest > &HFF Then
btCarry = (btSrc + btCarry + btDest) And &HFF00
bt3 = (btSrc + btCarry + btDest) And &HFF
Else
bt3 = (btSrc + btCarry + btDest)
End If
Mar 18th, 2003, 12:35 PM
#11
Thread Starter
Frenzied Member
Oops - perhaps I should clear out the carry flag
Try:-
VB Code:
'\\ --[ByteByByteAdd]-----------------------------------------------
'\\ Adds two longs in a byte-by-byte manner to prevent nast overflow
'\\ errors when VB longs are mixed up with C ULONGs
'\\ ----------------------------------------------------------------
Public Function ByteByByteAdd(ByVal lIn1 As Long, ByVal lIn2 As Long) As Long
Dim btSrc As Byte
Dim btDest As Byte
Dim btCarry As Integer
Dim bt1 As Byte
Dim bt2 As Byte
Dim bt3 As Byte
Dim bt4 As Byte
Dim lRet As Long
btSrc = LoByte(LoWord(lIn1))
btDest = LoByte(LoWord(lIn2))
If btSrc + btDest > &HFF Then
btCarry = (btSrc + btDest) And &HFF00
bt1 = (btSrc + btDest) And &HFF
Else
bt1 = (btSrc + btDest)
btCarry = 0
End If
btSrc = HiByte(LoWord(lIn1))
btDest = HiByte(LoWord(lIn2))
If btSrc + btCarry + btDest > &HFF Then
btCarry = (btSrc + btCarry + btDest) And &HFF00
bt2 = (btSrc + btCarry + btDest) And &HFF
Else
bt2 = (btSrc + btCarry + btDest)
btCarry = 0
End If
btSrc = LoByte(HiWord(lIn1))
btDest = LoByte(HiWord(lIn2))
If btSrc + btCarry + btDest > &HFF Then
btCarry = (btSrc + btCarry + btDest) And &HFF00
bt3 = (btSrc + btCarry + btDest) And &HFF
Else
bt3 = (btSrc + btCarry + btDest)
btCarry = 0
End If
btSrc = HiByte(HiWord(lIn1))
btDest = HiByte(HiWord(lIn2))
If btSrc + btCarry + btDest > &HFF Then
btCarry = (btSrc + btCarry + btDest) And &HFF00
bt4 = (btSrc + btCarry + btDest) And &HFF
Else
bt4 = (btSrc + btCarry + btDest)
btCarry = 0
End If
ByteByByteAdd = MakeLong(MakeWord(bt1, bt2), MakeWord(bt3, bt4))
End Function
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width