1

I have a DLL from a game I'm importing into a windows32 application, I've successfully loaded it and have called quite a few functions. However I'm facing a problem with a certain function I need to use needs a structure passed to it.

It seems when I disassemble the DLL I can see the structures and the data types in the structure, however how would I use this structure?

AFAIK GetProcAddress wouldnt work?

I'm looking for a way to use this struct.

    *(_DWORD *)this = tagRX_GLOBAL___vftable_;
    RX__g_pGlobal = (struct tagRX_GLOBAL *)this;
BenMorel
  • 34,448
  • 50
  • 182
  • 322
TrueAlias
  • 11
  • 1
  • It is not a struct, it is a C++ class. The vftable variable points to the v-table, a list of pointers to virtual methods of the class. – Hans Passant Jul 29 '12 at 05:31

1 Answers1

0

I would recommend you to add a simple function that will return you an address of the struct. Functions are fine with GetProcAddress.

Kirill Kobelev
  • 10,252
  • 6
  • 30
  • 51
  • thanks, but how would you go about modifying the members in the struct? could i possibly get an example of how to get the reference to the struct and access the members? – TrueAlias Jul 28 '12 at 23:11
  • You need to pick up the layout of the struct from some header to access the members. Dll itself simply does not contain this info. This is not a .net dll. – Kirill Kobelev Jul 28 '12 at 23:22
  • i have the variable layout, however is there a resource i could look at to see implementation of the struct and getting a reference to it? – TrueAlias Jul 28 '12 at 23:59