Click here to Skip to main content
15,898,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionvc++ Pin
amitesh29112-Sep-05 3:59
sussamitesh29112-Sep-05 3:59 
AnswerRe: vc++ Pin
David Crow2-Sep-05 8:55
David Crow2-Sep-05 8:55 
Questionvc++ Pin
amitesh29112-Sep-05 3:58
sussamitesh29112-Sep-05 3:58 
QuestionMFC Application - Document handling Pin
KSMANN2-Sep-05 3:51
KSMANN2-Sep-05 3:51 
AnswerRe: MFC Application - Document handling Pin
Roger Allen2-Sep-05 6:44
Roger Allen2-Sep-05 6:44 
AnswerRe: MFC Application - Document handling Pin
ThatsAlok2-Sep-05 19:28
ThatsAlok2-Sep-05 19:28 
QuestionLoading Dll and calling class's methods Pin
Bernard382-Sep-05 3:38
Bernard382-Sep-05 3:38 
AnswerRe: Loading Dll and calling class's methods Pin
Cedric Moonen2-Sep-05 3:49
Cedric Moonen2-Sep-05 3:49 
You could use the same principle as COM works: you have a function that will instantiate the object for you:

void GetObject(YourClass* & pInstance);

Your pointer is passed by reference that means the function won't make a copy of it so if you make a new, you will get the new adress in your program. Inside that function, you can then create your class (with new).

One really important thing is that you have to be carefull with memorory deletion: you cannot delete this object in your program !! It has to be freed in the DLL itselfs ('cause it has been allocated in the DLL memory). The best way to delete the object is to add a function for doing that:

void YourClass::Destroy()<br />
{<br />
  delete this;<br />
}


Hope this helps
GeneralRe: Loading Dll and calling class's methods Pin
Bernard382-Sep-05 4:36
Bernard382-Sep-05 4:36 
GeneralRe: Loading Dll and calling class's methods Pin
Cedric Moonen2-Sep-05 5:12
Cedric Moonen2-Sep-05 5:12 
Questionisspace. What about isreturn Pin
LCI2-Sep-05 3:35
LCI2-Sep-05 3:35 
AnswerRe: isspace. What about isreturn Pin
toxcct2-Sep-05 4:03
toxcct2-Sep-05 4:03 
GeneralRe: isspace. What about isreturn Pin
LCI2-Sep-05 4:30
LCI2-Sep-05 4:30 
AnswerRe: isspace. What about isreturn Pin
toxcct2-Sep-05 4:36
toxcct2-Sep-05 4:36 
QuestionI need to load custom data to Analysis Server (MS-OLAP) without going through any OLE DB Pin
kuldeepjangir2-Sep-05 3:15
kuldeepjangir2-Sep-05 3:15 
Question0xc0000005 access violation --- Need Urgent help... Pin
Smita Duraphe2-Sep-05 3:06
Smita Duraphe2-Sep-05 3:06 
AnswerRe: 0xc0000005 access violation --- Need Urgent help... Pin
ThatsAlok2-Sep-05 20:38
ThatsAlok2-Sep-05 20:38 
QuestionOutlook mail list Pin
Member 2434132-Sep-05 2:36
Member 2434132-Sep-05 2:36 
AnswerRe: Outlook mail list Pin
ThatsAlok2-Sep-05 19:30
ThatsAlok2-Sep-05 19:30 
QuestionDirectX SDK impact on performances Pin
uplink22-Sep-05 2:18
uplink22-Sep-05 2:18 
GeneralRe: DirectX SDK impact on performances Pin
LeFauve2-Sep-05 6:20
LeFauve2-Sep-05 6:20 
GeneralRe: DirectX SDK impact on performances Pin
LeFauve3-Sep-05 23:51
LeFauve3-Sep-05 23:51 
QuestionVC6 -&gt; .NET Pin
mcsherry2-Sep-05 2:12
mcsherry2-Sep-05 2:12 
AnswerRe: VC6 -&gt; .NET Pin
toxcct2-Sep-05 2:40
toxcct2-Sep-05 2:40 
GeneralRe: VC6 -&gt; .NET Pin
mcsherry2-Sep-05 2:54
mcsherry2-Sep-05 2:54 

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.