Connecting Tech Pros Worldwide Help | Site Map

Not a able to return value from a dll

  #1  
Old July 22nd, 2005, 06:10 AM
Venkat
Guest
 
Posts: n/a
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







  #2  
Old July 22nd, 2005, 06:10 AM
tom_usenet
Guest
 
Posts: n/a

re: Not a able to return value from a dll


On Tue, 13 Jan 2004 17:32:50 +0530, "Venkat" <venkat_kp@yahoo.com>
wrote:
[color=blue]
>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.[/color]
[color=blue]
>int CIDPDBInstall::IDPInstallCSVFile(const std::string m_CSVFileName)
>{
>.....
>.....
>.....
>}
>
>Application
>
>{
>
>......
>ret1 = obj->IDPInstallCSVFile(m_CSVFileName);
>}[/color]

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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interop: failure returning a value from unmanaged dll ConfNoob answers 7 May 8th, 2006 09:25 AM
Help calling function from DLL and processing returned value (Can not marshal return value) Angel answers 9 November 15th, 2005 11:11 PM
can't get return value from COM in PHP5 klingus@gmail.com answers 2 November 9th, 2005 11:55 AM
Calling a dll from a Javascript Venkat answers 1 July 20th, 2005 10:55 AM