Boost logo

Boost Users :

Subject: Re: [Boost-users] wrap native C++ DLL used Boost libs, into .NET
From: ïÌÅÇ ãÁÒÅ× (zabivator_at_[hidden])
Date: 2008-09-10 09:22:14


2008/9/10 <aidforsoft_at_[hidden]>

>
> > This sounds like the error you get when trying to use a native 32-bit
> > DLL in a 64-bit (or vice-versa) .NET process.
>
> Thanks, I have thought about this. I use WinXP x86 and /MACHINE:X86
> in my Visual Studio projects. In addtition, this assumption fails to
> explain the fact that working of the DLL depend on the using of the
> Boost headers.
>
>
> --
> Best regards,
> Ilya Chumakov mailto:aidforsoft_at_[hidden]
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

I'm using following solution:
__dllimport on function, i want to use into .NET application.
Than declare static method of class in .NET with atribute
"dllimport(dllname,methodname)" (exact syntax lookup in documentation (such
as msdn)).
I have some troubles with marshaling of string from .net application to C++.
.NET has very strange behaviour with marshaling strings - as i undestood,
NET converts string to ASCII-string, if string doesn't have any symbol with
ASCII-code greater than 127, and to unicode strings in other case.

There are two solutions:
To write COM, COM+, or DCOM component, and use interopt techniques on .NET.
In this case .NET generates interopt's object and .NET class for COM
component opaque.

This means, your task looks like that:
Write dll / COM, than using it as described bellow.

Sorry for my english.



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