Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Bitmap pixels Pin
bob1697216-Apr-06 15:49
bob1697216-Apr-06 15:49 
AnswerRe: Bitmap pixels Pin
Hamid_RT16-Apr-06 6:33
Hamid_RT16-Apr-06 6:33 
AnswerRe: Bitmap pixels Pin
MANISH RASTOGI16-Apr-06 18:39
MANISH RASTOGI16-Apr-06 18:39 
Questionhow come I can not use the Release( ) methord of CComPtr? Pin
ewighell16-Apr-06 2:41
ewighell16-Apr-06 2:41 
AnswerRe: how come I can not use the Release( ) methord of CComPtr? Pin
RChin16-Apr-06 3:06
RChin16-Apr-06 3:06 
AnswerRe: how come I can not use the Release( ) methord of CComPtr? Pin
Stephen Hewitt16-Apr-06 4:21
Stephen Hewitt16-Apr-06 4:21 
AnswerRe: how come I can not use the Release( ) methord of CComPtr? Pin
ewighell16-Apr-06 15:25
ewighell16-Apr-06 15:25 
QuestionMultiple instances of a DLL Pin
Virtek16-Apr-06 2:38
Virtek16-Apr-06 2:38 
Hi.

I was wonder how can I set multiple instances of one dll file,

see the following:

<br />
<br />
typedef void type_SetX(int x);<br />
typedef int type_GetX();<br />
<br />
type_SetX *SetX;<br />
type_GetX *GetX;<br />
<br />
HINSTANCE h1 = LoadLibrary("foo.dll");<br />
HINSTANCE h2 = LoadLibrary("foo.dll");<br />
<br />
SetX = (type_SetX *)GetProcAddress(h1, "SetX");<br />
GetX = (type_GetX *)GetProcAddress(h1, "GetX");<br />
<br />
SetX(5);<br />
Print( GetX() ); // GetX returns 5 as it should.<br />
<br />
// Now i'll set X on h2 instance<br />
<br />
SetX = (type_SetX *)GetProcAddress(h2, "SetX");<br />
<br />
SetX(8); // It's OVERWRITING h1, because h1=h2, they point to the same instace !!!<br />
<br />
Print( GetX() ); // Because of the overwrite, GetX returns 8, as I wanted it to return 5...<br />


The var X inside the dll is not static of course.
Any idia how can I manage multiple instances of the same dll ?

Thanks,

David

-- modified at 8:39 Sunday 16th April, 2006
AnswerRe: Multiple instances of a DLL Pin
eli1502197916-Apr-06 3:21
eli1502197916-Apr-06 3:21 
GeneralRe: Multiple instances of a DLL Pin
Virtek16-Apr-06 4:19
Virtek16-Apr-06 4:19 
GeneralRe: Multiple instances of a DLL Pin
Michael Dunn16-Apr-06 6:14
sitebuilderMichael Dunn16-Apr-06 6:14 
Questionfinding files with a certain extension Pin
SWDevil16-Apr-06 2:26
SWDevil16-Apr-06 2:26 
AnswerRe: finding files with a certain extension Pin
shortwave16-Apr-06 2:51
shortwave16-Apr-06 2:51 
GeneralRe: finding files with a certain extension Pin
SWDevil16-Apr-06 2:58
SWDevil16-Apr-06 2:58 
GeneralRe: finding files with a certain extension Pin
shortwave16-Apr-06 3:03
shortwave16-Apr-06 3:03 
GeneralRe: finding files with a certain extension Pin
SWDevil16-Apr-06 3:09
SWDevil16-Apr-06 3:09 
GeneralRe: finding files with a certain extension Pin
shortwave16-Apr-06 3:19
shortwave16-Apr-06 3:19 
GeneralRe: finding files with a certain extension Pin
SWDevil16-Apr-06 3:32
SWDevil16-Apr-06 3:32 
GeneralRe: finding files with a certain extension Pin
shortwave16-Apr-06 3:57
shortwave16-Apr-06 3:57 
GeneralRe: finding files with a certain extension Pin
SWDevil16-Apr-06 4:07
SWDevil16-Apr-06 4:07 
QuestionRe: finding files with a certain extension Pin
David Crow17-Apr-06 3:51
David Crow17-Apr-06 3:51 
GeneralRe: finding files with a certain extension Pin
David Crow17-Apr-06 3:50
David Crow17-Apr-06 3:50 
GeneralRe: finding files with a certain extension Pin
David Crow17-Apr-06 3:49
David Crow17-Apr-06 3:49 
AnswerRe: finding files with a certain extension Pin
Saurabh.Garg16-Apr-06 6:06
Saurabh.Garg16-Apr-06 6:06 
AnswerRe: finding files with a certain extension Pin
Michael Dunn16-Apr-06 6:15
sitebuilderMichael Dunn16-Apr-06 6:15 

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.