Jump to content
  • Advertisement
Sign in to follow this  
toddgrayson

Error loading a Visual Studio 2003 DLL from C++Builder or gcc created app

This topic is 5401 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am having problems loading a dll created in Visual Studio 2003 (c++) with C++Builder. Basically, I have created a plugin system that passes a pointer to a SystemManager class to each loaded dll. The systemmanager class allows each dll to query the engine for a loaded module by category. ex. Manager->GetActiveSystem("LogManager"); Each plugin is initialized like so: Module->Initialize((SystemManager*) SysMan); My problem is that I can pass this pointer with no problems if both the client and the dll are created in Visual Studio or if both the client and dll are created in C++Builder. But, when I create the dll in Visual Studio and load it with a C++Builder client I get a memory allocation error or vice versa. Is there a way to do this or am I simply running into compiler incampatibilities? Here is a link to some code. There may be some errors in it as I have tried many derivatives, but it gives a clearer view of what I am trying to accomplish: http://www31.brinkster.com/btgco/plugintests.rar [Edited by - toddgrayson on October 6, 2004 9:46:58 AM]

Share this post


Link to post
Share on other sites
Advertisement
Yes. I have no problem calling functions from the classes generated from the dll. I only have problems when I try to send data to the dll.

For example:
Module->GetName(); //no problem
Module->Print("Test"); //data is passed to the dll and generates a memory allocation error or throws an exception.

Share this post


Link to post
Share on other sites
They are both exactly the same except that one is compiled in Visual C++ 2003 and the other is compiled with C++Builder or gcc. ie DLL Compiled with Visual C++ 2003 and the Client app compiled with C++ Builder

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!