View Full Version : 2 Questions
DaBookshah
November 1st, 2006, 08:47
Greetings, fellow forum-members.
I have two questions:
1. Can anyone advise me on debugging the windowing system(I don't know how else to put it) of a borland delphi program? I mean, its such spaggetti, and every time i try I end up getting lost half-way through, and having to start over.
2. I don't really understand the use of inbuilt window-classes, "Button", etc. Olly shows the windowproc for these windows being in user32, how does execution get from there to the actual program?
Thanks,
Rohan
disavowed
November 1st, 2006, 10:53
For question 1, use http://www.wasm.ru/tools/20/D67RTL.zip ("http://www.wasm.ru/tools/20/D67RTL.zip") in IDA and use IDA's disassembly to help you with debugging in OllyDbg. Additionally, you can try http://www.wasm.ru/baixado.php?mode=tool&id=55 ("http://www.wasm.ru/baixado.php?mode=tool&id=55") for Delphi disassembling.
For question 2, you need to understand how windows work in Windows. For example, see
Code:
http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windowprocedures/windowprocedurereference/windowprocedurefunctions/windowproc.asp?frame=true ("http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windowprocedures/windowprocedurereference/windowprocedurefunctions/windowproc.asp?frame=true").
The information there won't help you much, but dig deeper into this type of documentation to learn more.
blurcode
November 1st, 2006, 12:47
Quote:
[Originally Posted by DaBookshah]
... windowing system(I don't know how else to put it) of a borland delphi program ...
|
Known as Visual Component Library (VCL) .
http://bdn.borland.com/article/32975
LLXX
November 1st, 2006, 23:24
2. You'll understand this when you figure out that every common UI element is composed of one or more windows which react to various messages, along with the functions (wndprocs) used to process those messages.
For example, a button is nothing more than a simple bordered window that responds to mouse click messages, which makes it update its appearance and send a message to its parent window.
DaBookshah
November 2nd, 2006, 00:07
Ah-ha. Getting somewhere. So the entire functionality of those built-in classes is within user32.dll, and messages are handled by the program only when the built-in class window sends a window-message to its parent window. I guess I was getting a little confused because typically in java/standard GUI's, you can add an "onclick" handler to a button, so i figured there must be some direct link between the windowproc and the program. But yeah, if the in-built classes just propogate relevant messages upwards, that makes sense. So many messages are filtered out by user32, and only the relevant ones go on to the parent?
Fake51
November 2nd, 2006, 09:06
Indeed. Check the SDK for BN_ messages.
Regards
Fake
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.