Not a able to return value from a dll

V

Venkat

Hi,

I got a simple cpp application which calls a dll at runtime.
The application is calling the dll and the dll is also doing the required
thing it suppose to do but
when after dll is done it has to return back to the calling application.
I am having the problem in dll returning back to the calling application.
Infact the application stops once
the dll is called.

Can some one please let me know where i am going wrong.


Sample Code
-------------------
dll

int CIDPDBInstall::IDPInstallCSVFile(const std::string m_CSVFileName)
{
......
......
......
}

Application

{

.......
ret1 = obj->IDPInstallCSVFile(m_CSVFileName);
}


regards,
Venkat
 
T

tom_usenet

Hi,

I got a simple cpp application which calls a dll at runtime.
The application is calling the dll and the dll is also doing the required
thing it suppose to do but
when after dll is done it has to return back to the calling application.
I am having the problem in dll returning back to the calling application.
Infact the application stops once
the dll is called.
int CIDPDBInstall::IDPInstallCSVFile(const std::string m_CSVFileName)
{
.....
.....
.....
}

Application

{

......
ret1 = obj->IDPInstallCSVFile(m_CSVFileName);
}

This is not a C++ problem, rather a DLL problem. Ask in a group for
your platform, such as microsoft.public.vc.stl (since string's
destructor is probably causing the problem).

(hint, have you linked both the DLL and the EXE against the
Multithreaded DLL version of the CRT?)

Tom

C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top