Click here to Skip to main content
16,006,845 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multi threading with one processor?? Pin
Nitron20-Jan-03 8:35
Nitron20-Jan-03 8:35 
GeneralRe: Multi threading with one processor?? Pin
Ted Ferenc20-Jan-03 9:22
Ted Ferenc20-Jan-03 9:22 
Generalcapture content of directx window Pin
Joerg Wiedenmann20-Jan-03 2:49
Joerg Wiedenmann20-Jan-03 2:49 
GeneralRe: capture content of directx window Pin
Mike Nordell20-Jan-03 2:56
Mike Nordell20-Jan-03 2:56 
GeneralRe: capture content of directx window Pin
Joerg Wiedenmann21-Jan-03 0:01
Joerg Wiedenmann21-Jan-03 0:01 
GeneralRe: capture content of directx window Pin
Joerg Wiedenmann21-Jan-03 0:02
Joerg Wiedenmann21-Jan-03 0:02 
GeneralPlugin System in Visual C++ Pin
albuemil20-Jan-03 2:46
albuemil20-Jan-03 2:46 
GeneralRe: Plugin System in Visual C++ Pin
User 665820-Jan-03 3:29
User 665820-Jan-03 3:29 
I have written a plugin system for a game launcher, and it works very fine and very similar to the one in Winamp2. The exe loads all .dll files in the plugin directory using LoadLibrary(). Of yourse you can make it selectable which files should be loaded.

In order to access data from the main program I have an exported function in my DLL that accepts a pointer parameter, here's an example:
extern "C" __declspec(dllexport) void _stdcall OnJoinServer(const hlla_SERVER* server)

Before you can user any exported functions I find their address in the DLL using GetProcAddress()

To bring up a configuration dialog I export e function in my DLL called OnConfigure; the exe calls this function if the user clicks on "Configure" in the main app. Inside the OnConfigure function in the DLL I simply open the configuration dialog using DoModal().

When my app finishes I close all handles to the plugins (dlls) with FreeLibrary()

regards
Greg

modified 12-Sep-18 21:01pm.

GeneralRe: Plugin System in Visual C++ Pin
albuemil20-Jan-03 4:12
albuemil20-Jan-03 4:12 
GeneralRe: Plugin System in Visual C++ Pin
User 665820-Jan-03 4:30
User 665820-Jan-03 4:30 
GeneralRe: Plugin System in Visual C++ Pin
albuemil20-Jan-03 5:11
albuemil20-Jan-03 5:11 
GeneralRe: Plugin System in Visual C++ Pin
Ryan B.20-Jan-03 3:41
Ryan B.20-Jan-03 3:41 
GeneralRe: Plugin System in Visual C++ Pin
Todd Smith20-Jan-03 8:56
Todd Smith20-Jan-03 8:56 
QuestionWhat kind of project should I create? Pin
LittleYellowBird20-Jan-03 2:43
LittleYellowBird20-Jan-03 2:43 
AnswerRe: What kind of project should I create? Pin
jhwurmbach20-Jan-03 3:11
jhwurmbach20-Jan-03 3:11 
GeneralRe: What kind of project should I create? Pin
LittleYellowBird20-Jan-03 4:23
LittleYellowBird20-Jan-03 4:23 
GeneralRe: What kind of project should I create? Pin
jhwurmbach20-Jan-03 4:37
jhwurmbach20-Jan-03 4:37 
AnswerRe: What kind of project should I create? Pin
Nitron20-Jan-03 4:03
Nitron20-Jan-03 4:03 
GeneralRe: What kind of project should I create? Pin
LittleYellowBird20-Jan-03 4:29
LittleYellowBird20-Jan-03 4:29 
GeneralRe: What kind of project should I create? Pin
Nitron20-Jan-03 8:38
Nitron20-Jan-03 8:38 
GeneralChanging MainFrame Title at runtime Pin
Mr Bose Dayala20-Jan-03 2:03
Mr Bose Dayala20-Jan-03 2:03 
GeneralRe: Changing MainFrame Title at runtime Pin
HENDRIK R20-Jan-03 2:07
HENDRIK R20-Jan-03 2:07 
GeneralRe: Changing MainFrame Title at runtime Pin
Mr Bose Dayala20-Jan-03 20:21
Mr Bose Dayala20-Jan-03 20:21 
GeneralRe: Changing MainFrame Title at runtime Pin
Nitron20-Jan-03 4:05
Nitron20-Jan-03 4:05 
GeneralRe: Changing MainFrame Title at runtime Pin
HENDRIK R20-Jan-03 4:17
HENDRIK R20-Jan-03 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.