Hello,
I would like to call unmanaged code (C++ Library Code) in C# library.
When I Call C++ Function with an "int" parameter.
It seems that there is a Marshalling problem; because when I put 88 as
parameter,
My C++ function receives 1240420
How to keep same parameter value between C# code and VC++ Code ?
To explain my problem, I can send a very simple example.
Mattias Sj?gren - 20 Oct 2004 15:52 GMT
Please post relevant parts of your native and managed code.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mario Cobretti - 21 Oct 2004 08:19 GMT
When u import the function, u must know that int type in C is short in C#. And may be you have to use "ref short myvariable" if it is a pointer to int.
> Hello,
>
[quoted text clipped - 8 lines]
>
> To explain my problem, I can send a very simple example