Click here to Skip to main content
15,925,061 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSingle Instance DLL Pin
Larry Dobson19-Sep-00 9:34
Larry Dobson19-Sep-00 9:34 
GeneralRe: Single Instance DLL Pin
Erik Funkenbusch19-Sep-00 13:07
Erik Funkenbusch19-Sep-00 13:07 
GeneralRe: Single Instance DLL Pin
Larry Dobson19-Sep-00 17:03
Larry Dobson19-Sep-00 17:03 
GeneralRe: Single Instance DLL Pin
Erik Funkenbusch20-Sep-00 9:14
Erik Funkenbusch20-Sep-00 9:14 
GeneralPaint problems Pin
Ori19-Sep-00 7:56
Ori19-Sep-00 7:56 
GeneralISAPI Filter Pin
Anderson J Almeida19-Sep-00 7:21
sussAnderson J Almeida19-Sep-00 7:21 
GeneralODBC API, BLOBs Pin
Oz Ben Eliezer19-Sep-00 7:12
Oz Ben Eliezer19-Sep-00 7:12 
QuestionInteresting Question on DLL...use class* as a parameter../?? Pin
Ryan Park18-Sep-00 23:52
Ryan Park18-Sep-00 23:52 
HI,

I want to pass class* as a parameter to DLL..

Without using MFC extension dll...

I mean as a regular dll..

I think when I correctly pass the address information of

Class*, I could call the method of it..

Is it difficult to understand??

See Next codes:

In exe :

1. declare Class CA (no inheritance..)

2. define all the methods of Class CA..

3. in some handler code,

CA* inexe = NULL;
Set(inexe);
inexe->aa();
inexe->bb();

In Dll :

1. declare and define export func Set() as follows:

void Set(CA* indll)
{
CA SI; //SI is instance of CA in DLL
indll = &SI;
}
2. then I can copy the address of CA instance in DLL..Right?

so now inexe has address of CA instance in DLL..

Is it correct??

One more thing that makes life horrible..

I'll declare and define of CA in exe that has different

implementation of CA's methods...

I mean, in dll aa() returns 10 but in exe aa() return 20...

Then I'll call methods of CA in dll...

But in reallity it won't work...

In exe, when I call the Set() with appropriate CA*,

the result of inexe()-> returns 20 not 10...why??

I think when using the address, I could access the

CA implementation in DLL..

But It just wouldn't work..

If anybody has a interest in this send me a mail...

Then I'll send you immedialtely complete sample DSW...

and other DSP and cpp..h...lib...exe....dll...OK??

So thanks for reading .... Smile | :)

Regardz
-Ryan

AnswerRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Jignesh Patel19-Sep-00 4:12
Jignesh Patel19-Sep-00 4:12 
GeneralRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Ryan Park19-Sep-00 16:16
Ryan Park19-Sep-00 16:16 
GeneralRe: Interesting Question on DLL...use class* as a parameter../?? Pin
WoR20-Sep-00 22:04
WoR20-Sep-00 22:04 
AnswerRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Sam Hobbs19-Sep-00 7:34
Sam Hobbs19-Sep-00 7:34 
GeneralRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Ryan Park19-Sep-00 16:59
Ryan Park19-Sep-00 16:59 
AnswerRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Paolo Messina19-Sep-00 23:28
professionalPaolo Messina19-Sep-00 23:28 
GeneralRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Wade Brainerd20-Sep-00 1:10
Wade Brainerd20-Sep-00 1:10 
GeneralRe: Interesting Question on DLL...use class* as a parameter../?? Pin
Sam Hobbs21-Sep-00 18:10
Sam Hobbs21-Sep-00 18:10 
GeneralSome Color issues...redirecting the registry? =) Pin
Fredrik18-Sep-00 23:16
Fredrik18-Sep-00 23:16 
GeneralRe: Some Color issues...redirecting the registry? =) Pin
#realJSOP19-Sep-00 1:20
professional#realJSOP19-Sep-00 1:20 
GeneralRe: Some Color issues...redirecting the registry? =) Pin
Fredrik19-Sep-00 2:15
Fredrik19-Sep-00 2:15 
GeneralRe: Some Color issues...redirecting the registry? =) Pin
#realJSOP21-Sep-00 1:19
professional#realJSOP21-Sep-00 1:19 
GeneralRe: Some Color issues...redirecting the registry? =) Pin
Fredrik21-Sep-00 1:38
Fredrik21-Sep-00 1:38 
GeneralConsole Output to Windows Control Pin
J. J.18-Sep-00 5:43
sussJ. J.18-Sep-00 5:43 
GeneralRe: Console Output to Windows Control Pin
Sam Hobbs18-Sep-00 11:26
Sam Hobbs18-Sep-00 11:26 
GeneralButton color Pin
Roger18-Sep-00 5:42
Roger18-Sep-00 5:42 
GeneralHere's what I did... Pin
Fredrik18-Sep-00 22:50
Fredrik18-Sep-00 22:50 

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.