|
-
September 7th, 2012, 11:42 PM
#2
Re: run program in dll mode (if that is the right concept)
This is a very common issue, and key if you want to write extremely modularized programs.
Look up the functions dlopen, dlsync, and dlclose. Windows has their own functiotns called OpenLibrary, GetProcAddress, and FreeLibrary.
Then you define the interface with extern "C" and the compiler will do the rest for you. You can load a dll, grab its functions, and call them with function pointers.
The only caveat is that if you allocate memory in the library, the library must be the thing that frees it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|