Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with DirectShow Pin
Alexander M.,28-Jul-05 8:51
Alexander M.,28-Jul-05 8:51 
GeneralRe: Problem with DirectShow Pin
perroflaco31-Jul-05 23:02
perroflaco31-Jul-05 23:02 
Questiondynamic class instantiation in c++? Pin
ThinkingPrometheus28-Jul-05 1:38
ThinkingPrometheus28-Jul-05 1:38 
AnswerRe: dynamic class instantiation in c++? Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 2:02
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 2:02 
AnswerRe: dynamic class instantiation in c++? Pin
berndg28-Jul-05 2:12
berndg28-Jul-05 2:12 
AnswerRe: dynamic class instantiation in c++? Pin
Bob Stanneveld28-Jul-05 5:14
Bob Stanneveld28-Jul-05 5:14 
AnswerRe: dynamic class instantiation in c++? Pin
Giles28-Jul-05 7:04
Giles28-Jul-05 7:04 
GeneralRe: dynamic class instantiation in c++? Pin
ThinkingPrometheus2-Aug-05 2:37
ThinkingPrometheus2-Aug-05 2:37 
thx@ll for the answer
but i did it a little bit different

my problem was for linux, and there is a linux way
but maybe there is a port for windows so i describe how it works with linux:

what i wanted is that i can load a class dynamically during runtime of my "core"
the problem: the only thing i (wanted to) know was the class name (and the function name for instantiating an object)
first you have to create a class, where all your classes are derived from
so i made a server class with a GetInstance method which simply calls
new MyObject();
depending on which class you want
next you can use dlopen to load the library file
and dlsym to get an object using the GetInstance function

void *hndl = dlopen("libnewshapes.so", RTLD_NOW);
if(hndl == NULL){
cerr << dlerror() << endl;
exit(-1);
}
void *mkr = dlsym(hndl, "maker");
shape *my_shape = static_cast<shape *()="">(mkr)();

and there is our shape object Wink | ;-)

for more information read http://www.linuxjournal.com/article/3687
GeneralCListView usage Pin
B.R.Singh28-Jul-05 1:19
B.R.Singh28-Jul-05 1:19 
GeneralRe: CListView usage Pin
Mohammed F. Salem28-Jul-05 4:26
Mohammed F. Salem28-Jul-05 4:26 
GeneralRe: CListView usage Pin
David Crow28-Jul-05 5:11
David Crow28-Jul-05 5:11 
General,CListView Usage Pin
B.R.Singh28-Jul-05 1:14
B.R.Singh28-Jul-05 1:14 
GeneralLooking for an advice about password authentication Pin
Halawlaws28-Jul-05 1:07
Halawlaws28-Jul-05 1:07 
GeneralRe: Looking for an advice about password authentication Pin
mark novak28-Jul-05 4:45
mark novak28-Jul-05 4:45 
QuestionIs there a #define for Multi-Threading? Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 1:02
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 1:02 
AnswerRe: Is there a #define for Multi-Threading? Pin
berndg28-Jul-05 2:15
berndg28-Jul-05 2:15 
GeneralRe: Is there a #define for Multi-Threading? Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 4:21
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 4:21 
GeneralRe: Is there a #define for Multi-Threading? Pin
berndg28-Jul-05 4:27
berndg28-Jul-05 4:27 
AnswerRe: Is there a #define for Multi-Threading? Pin
Blake Miller28-Jul-05 5:09
Blake Miller28-Jul-05 5:09 
GeneralRe: Is there a #define for Multi-Threading? Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 5:19
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX28-Jul-05 5:19 
AnswerRe: Is there a #define for Multi-Threading? Pin
Bob Stanneveld28-Jul-05 5:22
Bob Stanneveld28-Jul-05 5:22 
AnswerRe: Is there a #define for Multi-Threading? Pin
Alexander M.,28-Jul-05 8:53
Alexander M.,28-Jul-05 8:53 
QuestionTool to generate API doc spec? Pin
huutribk200128-Jul-05 0:09
huutribk200128-Jul-05 0:09 
AnswerRe: Tool to generate API doc spec? Pin
mark novak28-Jul-05 0:30
mark novak28-Jul-05 0:30 
AnswerRe: Tool to generate API doc spec? Pin
Marc Soleda28-Jul-05 0:30
Marc Soleda28-Jul-05 0:30 

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.