Jump to content
  • Advertisement
Sign in to follow this  

DLL Problem

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

Hiya, I'm having some trouble getting my DLL to compile, and I was wondering if anyone could have a quick look and see what the problem is. At the moment, all it needs to export is a factory function called bool CreateFileIStream( IFileIStream **ppStream );. The constructor of the abstract IFileIStream class needs to be protected, and have the factory function as a friend. It's a simple design, but because the factory function needs to be exported I'm not sure of the syntax and I can't find any similar examples anywhere.
class IFileIStream : public IFileStream

    friend extern "C" __declspec (dllexport) bool __stdcall CreateFileIStream( IFileIStream **ppFileIStream );


    // constructor, etc...


    // etc...

If anyone could tell me the correct way of doing this I would be very grateful. Many thanks :)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!