Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. trinking iterface calls mscc++ 2 g++

trinking iterface calls mscc++ 2 g++

Scheduled Pinned Locked Moved C / C++ / MFC
c++toolstutorialquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suiram40
    wrote on last edited by
    #1

    I have interfaces definitions. I have implemented them in dll's These dll's worked as cutom plugins. Usually they were build by msvc. Each dll exported 3 function, GetIterfacesCLSIDS()/Create(CLSID)/Destroy(CLSID). It woked superb when both (client, plug in were buld by msvc compiler) or both with mingw compiler. The client now has growned and I'm using massive MFC (has lot's of gui and u knw is easy). Now I try to build the dll's on demand (as compiled script) and I use free gcc (g++) from (Mingw) C++ compiler and dlltool. The dll is oj, and exported functions are called and my instances created ok. Now I get 'ESP was not saved corectly durring a ... see the call type' So is not the call type. As long the object imlementor of the interface is created my dll and the virtual table layout is different than the msvc. Msvc vtable is PObject->PVtable->[Vf1][Vf2]..[Vfk] while mingw vtable is PObject->[Vf1][Vf2]..[Vfk] So there is a missing intermdiare [PVtable] pointer there. Does any one know how to hack the calls using trunks or __asm (back and forward) these ? Thanks:((

    S 1 Reply Last reply
    0
    • S suiram40

      I have interfaces definitions. I have implemented them in dll's These dll's worked as cutom plugins. Usually they were build by msvc. Each dll exported 3 function, GetIterfacesCLSIDS()/Create(CLSID)/Destroy(CLSID). It woked superb when both (client, plug in were buld by msvc compiler) or both with mingw compiler. The client now has growned and I'm using massive MFC (has lot's of gui and u knw is easy). Now I try to build the dll's on demand (as compiled script) and I use free gcc (g++) from (Mingw) C++ compiler and dlltool. The dll is oj, and exported functions are called and my instances created ok. Now I get 'ESP was not saved corectly durring a ... see the call type' So is not the call type. As long the object imlementor of the interface is created my dll and the virtual table layout is different than the msvc. Msvc vtable is PObject->PVtable->[Vf1][Vf2]..[Vfk] while mingw vtable is PObject->[Vf1][Vf2]..[Vfk] So there is a missing intermdiare [PVtable] pointer there. Does any one know how to hack the calls using trunks or __asm (back and forward) these ? Thanks:((

      S Offline
      S Offline
      suiram40
      wrote on last edited by
      #2

      /

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups