|
Boost Users : |
Subject: Re: [Boost-users] wrap native C++ DLL used Boost libs, into .NET
From: David Walthall (walthall_at_[hidden])
Date: 2008-09-10 11:28:58
aidforsoft_at_[hidden] wrote:
> Hello!
>
> I need to use a DLL used Boost, in .NET projects.
> I wrapped this lib, but I cannot use the wrapping, because
> System.BadImageFormatException
> (is not a valid Win32 application. (Exception from HRESULT: 0x800700C1))
> raises at once, if I executing an
> application using the wrap.
>
> Wrap scheme: Native DLL --- .NET Class Library --- .NET Project.
> I'm wrapping every class in native DLL into .NET class. I using some
> principles from the "Expert C++/CLI: .NET for Visual C++ Programmers"
> by Marcus Heege.
>
> When I wrote a small test project, I discovered that if I only include
> anyone Boost header into native DLL, it set the
> System.BadImageFormatException permanently.
> Without Boost wrapping works perfectly.
>
> I use:
> Boost 1.35.0
> Visual Stidio 2005 SP1, 2008 - same results in all cases.
> Windows XP SP2 x86.
>
> I found same problems in Internet - impossible to wrap native DLLs, used
> Boost. All this problems were unsolved.
> Such as: http://objectmix.com/dotnet/121318-not-valid-win32-application-exception-hresult-0x800700c1.html
Just a thought: this may be related to a known issue with Visual Studio
2005 SP1:
http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/73cb0f98-d154-43bb-863b-fa595c8c6b0a/
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=230171
There are two suggested workarounds:
https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=230171
David
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net