Re: copymemory basic question
- From: "Someone" <nobody@xxxxxxx>
- Date: Sun, 4 Sep 2005 11:18:10 -0400
"Sam Hobbs" <samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:eXiM4dTsFHA.3216@xxxxxxxxxxxxxxxxxxxxxxx
> I use the value "0DEB1h" (&HDEB1) so that I can find the code in the
> machine code listing. I compile the code prior to dis-assembly in order to
> get the compiled code. I created a small test project with just a module
> and later I added a class. I compiled the project and then dumped the exe
> using:
>
> DUMPBIN /DisAsm /Out:Dump.txt StaticCode.exe
>
There is an easier way to see the compiled code than this by using VC++ 6.0.
Here are step by step instructions:
- Create a new VB project, and write a sample code in Form_Click in Form1.
- Add a MsgBox "Hello" in the code.
- Save the project(a must).
- Go to Project|Properties|Compile, and select "Create Symbolic Debug Info".
- Compile and save.
- Run the EXE from Windows Explorer.
- Go to VC++ 6.0|File|Close Workspace.
- Go to Build|Start Debug|Attach to process, and select your running EXE.
- Click on Form1, this will execute Form_Click, and a message box with the
word Hello will appear. Do not click OK yet.
- Go to VC++ 6.0|Debug|Break.
- Go to View|Debug Windows, and make sure that "Call Stack" window is
visible.
- One of the lines in "Call Stack" shows "Form1::Form_Click()", double click
on that, this will view the source code.
- Now Right Click on any source line that you like, and select "Go to
Disassembly", this will show the source and what VB compiled the code to in
an easy to view format.
- After you are done, make sure that you turn off the debug info in your VB6
project and recompile, otherwise, you will make it easier for a hacker to
break your code.
It's important to note that VB6 does source level optimization, a specific
line may be compiled differently based on the lines before it.
Please start a new thread if you want to discuss this further as this might
be off topic...
Feel free to post this on the web...
.
- Follow-Ups:
- Re: copymemory basic question
- From: Sam Hobbs
- Re: copymemory basic question
- References:
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Donald Lessau
- Re: copymemory basic question
- From: Jim Mack
- Re: copymemory basic question
- From: Donald Lessau
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Jim Mack
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Jim Mack
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Donald Lessau
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: mscir
- Re: copymemory basic question
- From: Karl E. Peterson
- Re: copymemory basic question
- From: Tony Proctor
- Re: copymemory basic question
- From: Sam Hobbs
- Re: copymemory basic question
- Prev by Date: Re: Lighweight AVI Control
- Next by Date: Re: Lighweight AVI Control
- Previous by thread: Re: copymemory basic question
- Next by thread: Re: copymemory basic question
- Index(es):
Relevant Pages
|
Loading