all groups > dotnet interop > january 2007 >
You're in the

dotnet interop

group:

Marshalling Rectangle to LPRECT?


Marshalling Rectangle to LPRECT? Chris Ashley
1/29/2007 2:36:24 AM
dotnet interop:
I am writing a C++ wrapper and need to marshal a
System::Drawing::Rectangle to an LPRECT. Is this possible, and if so,
how do I go about doing this?

Thanks,

Chris
Re: Marshalling Rectangle to LPRECT? Mattias Sjögren
1/29/2007 8:14:34 PM
[quoted text, click to view]

Well you can't pass a direct pointer since they don't share the same
internal representation. So you have to declare a RECT struct, fill it
with the values from the Rectangle, and then pass the RECT address to
the funtion.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
AddThis Social Bookmark Button