high6 Posted March 22, 2009 Posted March 22, 2009 (edited) Well the provided .def file mismatches with the provided header. How so? Well the header defines every function normally but the definition file defines every function with a underscore in front of the name.So instead of redoing the header file. Can I regenerate the .def file without underscores?Edit:Even though msvc prepends _ to the name it can't find the external reference unless I prepend a _ myself. Edited March 22, 2009 by high6
Killboy Posted March 22, 2009 Posted March 22, 2009 Not sure what Olly PDK you're using, but there is an updated version 1.3That piece of code seems to fix it: // Borland adds underscore to export automatically, whereas I don't know any // such option for Microsoft compiler. This solution is not too elegant but // works. #define ODBG_Plugindata _ODBG_Plugindata #define ODBG_Plugininit _ODBG_Plugininit #define ODBG_Pluginmainloop _ODBG_Pluginmainloop #define ODBG_Pluginsaveudd _ODBG_Pluginsaveudd #define ODBG_Pluginuddrecord _ODBG_Pluginuddrecord #define ODBG_Pluginmenu _ODBG_Pluginmenu #define ODBG_Pluginaction _ODBG_Pluginaction #define ODBG_Pluginshortcut _ODBG_Pluginshortcut #define ODBG_Pluginreset _ODBG_Pluginreset #define ODBG_Pluginclose _ODBG_Pluginclose #define ODBG_Plugindestroy _ODBG_Plugindestroy #define ODBG_Paused _ODBG_Paused #define ODBG_Pausedex _ODBG_Pausedex #define ODBG_Plugincmd _ODBG_PlugincmdAs it says, not too elegant, but works fine for me (VS 2005 and 2008)
high6 Posted March 22, 2009 Author Posted March 22, 2009 Not sure what Olly PDK you're using, but there is an updated version 1.3That piece of code seems to fix it: // Borland adds underscore to export automatically, whereas I don't know any // such option for Microsoft compiler. This solution is not too elegant but // works. #define ODBG_Plugindata _ODBG_Plugindata #define ODBG_Plugininit _ODBG_Plugininit #define ODBG_Pluginmainloop _ODBG_Pluginmainloop #define ODBG_Pluginsaveudd _ODBG_Pluginsaveudd #define ODBG_Pluginuddrecord _ODBG_Pluginuddrecord #define ODBG_Pluginmenu _ODBG_Pluginmenu #define ODBG_Pluginaction _ODBG_Pluginaction #define ODBG_Pluginshortcut _ODBG_Pluginshortcut #define ODBG_Pluginreset _ODBG_Pluginreset #define ODBG_Pluginclose _ODBG_Pluginclose #define ODBG_Plugindestroy _ODBG_Plugindestroy #define ODBG_Paused _ODBG_Paused #define ODBG_Pausedex _ODBG_Pausedex #define ODBG_Plugincmd _ODBG_PlugincmdAs it says, not too elegant, but works fine for me (VS 2005 and 2008)I am using the one on the site.
high6 Posted March 22, 2009 Author Posted March 22, 2009 Okay, the newer version works. Kinda seems hacky to stuff the header with a define for each function.
high6 Posted March 22, 2009 Author Posted March 22, 2009 AlsoRestoreallthreads();Is that the Debug->Run command in ollydbg?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now