Log in

View Full Version : Example of custom function for MFC42


MrSmith
January 19th, 2005, 08:33
Hi,
I tried to create a common.arg file for an MFC42 function, but run into problems.
In my program I have a call like this (demangling switched on):

push 1
mov ecx,esi
call <jmp.&MFC42.#5503_CWinApp::RegisterShellFileTypes>

My common arg looks like this:

info MFC42.#5503_CWinApp::RegisterShellFileTypes
stdfunc RegisterShellFileTypes
"bCompat" BOOL
end

In Ollydbgs Log window I see that Olly loads common.arg, but my disassembler listing remains the same, even after redoing "Analyse Code'".

Why is this? Why doesn't Olly recognise the function?
Could it have something to do with the demangling ?

Any help is welcomed,

MrSmith

Lord_Looser
January 19th, 2005, 11:55
use stdfunc "#5503_CWinApp::RegisterShellFileTypes"
or stdfunc "#5503_RegisterShellFileTypes"
or deactivate debugging option - addresses - prepend ordinals to implib names and use
stdfunc "CWinApp::RegisterShellFileTypes"
or stdfunc "RegisterShellFileTypes"
(with "" !!) in common.arg

for me i tested it with:
info MFC42.#1200_AfxMessageBox
STDFUNC "#1200_AfxMessageBox"
"lpszText" INT
"nType" INT
"nIDHelp" INT
END

MrSmith
January 20th, 2005, 02:14
many thanx,
now I'm getting somewhere.

cheers,

MrSmith