Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / March 2004

Tip: Looking for answers? Try searching our database.

register corruption occurs when managed C++ calls unmanaged C++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael van der Bokke - 05 Mar 2004 20:16 GMT
I have a simmilar problem to the user posting at
http://groups.google.com/groups?q=managed+code+register+changed&hl=en&lr=&ie=UTF
-8&oe=UTF-8&selm=AIG1b.816455%243C2.18525716%40news3.calgary.shaw.ca&rnum
=

I have an C++ managed class calling an unmanaged function on an unmanaged C++ class in an unmanaged dll
the function returns false; but the managed code thinks it returned true.  I am afaid this could cause big problemes in other places in my code.  I did a small work around for this case by making my managed class call an unmanged function in the managed dll which then returns the result of the call, but i don't want to have to do that were ever I call an unmanaged dll, i there a better fix for this

Thanks
Michael van der Bokke (Software Developer
www.lookaheaddecisions.co
marcel baumann - 18 Mar 2004 13:36 GMT
Hello Michael
We have exactly the same problem with our mixed mode DLL when returning a bool
One workaround is to use an int return value instead of bool
Since we are using Visual Studio 7.1, we got the linker warnin
LINK : warning LNK4243: DLL containing objects compiled with /clr is not linked with /NOENTRY; image may not run correctly
I followed the instructions in the Visual Studio help topi
'Converting Managed Extensions for C++ Projects from Pure Intermediate Language to Mixed Mode
and the bool was returned correctly
The solution is fine if you call the mixed mode dll from an application
We are calling our mixed mode DLL also from a web service
I asked Ted Pattison for a solution for this problem but i never got an answer
Greetings Marce

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.