Jump to content
Tuts 4 You

MSVC++ Generate new ollydbg.def file?


high6

Recommended Posts

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 by high6
Link to comment

Not sure what Olly PDK you're using, but there is an updated version 1.3

That 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_Plugincmd

As it says, not too elegant, but works fine for me (VS 2005 and 2008)

Link to comment
Not sure what Olly PDK you're using, but there is an updated version 1.3

That 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_Plugincmd

As it says, not too elegant, but works fine for me (VS 2005 and 2008)

I am using the one on the site.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...