View Full Version : VB source patch
current
12-06-2000, 06:01 PM
I need some help. Does anyone have a VB source on how to code a patch (or any tut)? I mean, just like the ones we see in a lot of tuts in ASM, C and pascal (a small program that checks the offsets and change the bytes of the target). I know VB is a lame language but even so I would appreciate any help.
Thanks
current
I wouldn't exactly say that vb is lame, but it definitely limits you as a programmer. That said, the relevant patch functions are as follows (digging deep in my poor memory):
1) open the file in question with (gasp) "open filename as filenumber"
*note: of course you'll want to verify the file version/size and all of that jazz
2) use "get filenum, offset" (correct me if I'm wrong cause it's been a long time) to check a single byte
*note: vb always seemed to be a lot different to me, like if I'm not mistaken the offset starts with 0 instead of 1 so you'll have to subtract one from all your patch offsets to change the intended bytes. Also, I think that all the offsets/bytes need to be in dec format. Again, I could be wrong.
3) use the "put filenum, offset, byte" (again, I might be wrong) to actually change the byte.
*note: read the note from #2
4) finally close the file with "close filenum", where filenum is the file number that you opened it with.
That's really about it I think. Of course that's vb6 functions, vb5 had "seek" instead of "get" I think.
Anyways, hope this helped.
--4oh4
current
12-08-2000, 02:41 PM
Hello 4oh4,
I whish I had your memory

The tips you gave me were very helpful and it was enough to get what I needed. Thanks for the help.
BTW the offsets in vb start with 1 so its need to add 1 (not subtract)
current
Glad that info helped!
Sorry about my mistake though. Alcohol consumption has a direct affect on mathematical coherency I think.
--4oh4
?ferret
12-10-2000, 10:45 AM
Amount of Sleep*Amount of Alcohol
______________________________
Number of Living Brain Cells Left
=Amount of Mathematical Coherency?
(My equation could be a bit off.....same problem) LOL
That sounds about right. 8n)
Something's always puzzled me though...
If most forms of alcohol are about 90% water, then how come it dehydrates you so badly?
I even tried mixing vodka and gatorade, thinking that they would balance each other out and rehydrate me at the same rate at which I was dehydrating. To me, that sounds like reasonable logic. Needless to say it didn't work out as I had intended though.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.