Jump to content
  • Advertisement
Sign in to follow this  
Aardvajk

DLL plugins - what can I pass across the boundary

This topic is 2478 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

Hello all,

Just thinking about adding future plugin support to a 3D modelling program I've been working on and I've discovered that it is hard to research and find out exactly what I can pass across the boundary between my app and the DLL.

I've heard that passing standard containers is a no-no, presumably because of the potential differences in memory allocation when the template is compiled into the DLL. What I was wondering is is it safe to still use this stuff as long as it is wrapped inside a static lib that the application and the DLL both link to?

So my lib would present a class with access methods for adding vertices and removing them, say, which internally inside the lib is done via manipulating vectors. But the client code just uses the methods of the class and a PIMPL idiom is used to prevent the .h from needing to include <vector>.

Is this now okay? I'd presume so because the vector is only compiled into the lib but I'm really not too sure.

Thanks.

Share this post


Link to post
Share on other sites
Advertisement

What I was wondering is is it safe to still use this stuff as long as it is wrapped inside a static lib that the application and the DLL both link to?


If your static lib ever changes or needs to be re-compiled you are facing the same problems.

Share this post


Link to post
Share on other sites
Ah, I see. Because then the code linked into the DLL and the code linked into the application would be different.

Hmm, okay. Need a rethink. Thanks for the input.

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!