Click here to Skip to main content
15,916,601 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMSXML2 - XML parser Memory Leak Pin
chevu15-Jul-10 2:03
chevu15-Jul-10 2:03 
AnswerRe: MSXML2 - XML parser Memory Leak Pin
Naveen15-Jul-10 2:19
Naveen15-Jul-10 2:19 
GeneralRe: MSXML2 - XML parser Memory Leak Pin
chevu15-Jul-10 18:31
chevu15-Jul-10 18:31 
QuestionNested DLL Pin
viduran15-Jul-10 1:38
viduran15-Jul-10 1:38 
AnswerRe: Nested DLL Pin
Richard MacCutchan15-Jul-10 2:05
mveRichard MacCutchan15-Jul-10 2:05 
GeneralRe: Nested DLL Pin
viduran15-Jul-10 2:30
viduran15-Jul-10 2:30 
GeneralRe: Nested DLL Pin
Richard MacCutchan15-Jul-10 2:52
mveRichard MacCutchan15-Jul-10 2:52 
GeneralRe: Nested DLL [modified] Pin
viduran15-Jul-10 3:06
viduran15-Jul-10 3:06 
Hi,
I cant understand what u r saying.so pls go thru the code.
This is the code i wrote to create another dll.
Is it correct.
I dont know what mistake i have done here.
Pls.tell me what mistake i have done.
MultipleFn.DLL is my X.dll
The code i have given here is my Y.dll.This dll should call the function of X.dll.
Then i can create an .exe file which can call Y.dll.
The result should return the value by calling the function in X.dll from Y.dll.
I think now it will be clear.


#define DLLEXPORT __declspec(dllexport)
#define EXTERNC extern "C"

This is the function prototype i need to export from Y.dll

EXTERNC DLLEXPORT int Addition(int ,int);

typedef int *AddFunc1();
AddFunc1 _AddFunc;

This is my X.dll
HINSTANCE hInstLib = LoadLibrary("MultipleFn.dll");

int Addition(int a,int b)
{
if ( hInstLib != NULL )
{
FARPROC _AddFunc ;


_AddFunc = GetProcAddress ( hInstLib , "Add" ) ;

if ( _AddFunc != (FARPROC)NULL )
{
int c;
c = _AddFunc();
std::cout << "Loaded Successfully" << std::endl;
}
else
{
std::cout << "Failed to Load " << std::endl;
}

FreeLibrary ( hInstLib ) ;
}
return true;
}

modified on Thursday, July 15, 2010 9:14 AM

GeneralRe: Nested DLL Pin
Richard MacCutchan15-Jul-10 4:18
mveRichard MacCutchan15-Jul-10 4:18 
GeneralRe: Nested DLL Pin
viduran15-Jul-10 19:39
viduran15-Jul-10 19:39 
GeneralRe: Nested DLL Pin
Richard MacCutchan15-Jul-10 21:26
mveRichard MacCutchan15-Jul-10 21:26 
GeneralRe: Nested DLL Pin
viduran15-Jul-10 21:37
viduran15-Jul-10 21:37 
GeneralRe: Nested DLL Pin
Richard MacCutchan15-Jul-10 21:49
mveRichard MacCutchan15-Jul-10 21:49 
AnswerRe: Nested DLL Pin
KarstenK15-Jul-10 2:26
mveKarstenK15-Jul-10 2:26 
GeneralRe: Nested DLL Pin
viduran15-Jul-10 2:55
viduran15-Jul-10 2:55 
QuestionEdit Control Pin
AbhiHcl15-Jul-10 0:33
AbhiHcl15-Jul-10 0:33 
AnswerRe: Edit Control Pin
Naveen15-Jul-10 1:37
Naveen15-Jul-10 1:37 
GeneralRe: Edit Control Pin
AbhiHcl15-Jul-10 2:00
AbhiHcl15-Jul-10 2:00 
GeneralRe: Edit Control Pin
Naveen15-Jul-10 2:08
Naveen15-Jul-10 2:08 
GeneralRe: Edit Control Pin
AbhiHcl15-Jul-10 2:33
AbhiHcl15-Jul-10 2:33 
GeneralRe: Edit Control Pin
Naveen15-Jul-10 2:40
Naveen15-Jul-10 2:40 
AnswerRe: Edit Control Pin
Member 392263915-Jul-10 2:12
Member 392263915-Jul-10 2:12 
GeneralRe: Edit Control Pin
AbhiHcl15-Jul-10 2:36
AbhiHcl15-Jul-10 2:36 
GeneralRe: Edit Control Pin
Richard MacCutchan15-Jul-10 4:26
mveRichard MacCutchan15-Jul-10 4:26 
QuestionFirst Chance Exception Pin
Pryabu14-Jul-10 23:58
Pryabu14-Jul-10 23:58 

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.