Skip to main content
gamedev.net
🔒 Locked

Singleton dll

Started by Muncher Sep 27, 2005 at 9:17 PM 1 replies 600+ views
Original Post
Muncher
Muncher
hi if i have a singleton class inside a dll, is it possible to access the same singleton instance from within a application that uses the dll? I figure you can do it if you provide a function to copy the instance; So the dll would have Singleton.h and the App would have Singleton.h, and the app would just copy the singletons instance into its own Singleton object; Is there a cleaner way of doing it? Paul
SiCrane
SiCrane
Just have the DLL export a function that returns a reference to the DLL's singleton instance.
Muncher
Muncher
could i provide that function in the Singleton class, and just export the whole class from the dll?

Also, is it possible/good practive to embed a dll inside another dll?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.