Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.interop
Get Pointer (reference) to a structure
tomi
10/21/2007 4:06:00 PM
Help please
Ho can I write following (from C#) thing in VB.NET ?
new IntPtr(&mode)
mode is a instance of some structure.
I cannot find any solution. I need to pass the pointer to a structure
to COM+ object Thanks
Tomas
1 Answer
(Mattias Sjögren)
10/21/2007 9:23:00 PM
0
>Ho can I write following (from C#) thing in VB.NET ?
>
>new IntPtr(&mode)
You can't get the exact equivalent in VB since it doesn't support
pointers. What you can do is allocate a buffer on the native heap and
copy the structure there. Use the Marshal.StructureToPtr method for
that.
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.n...
|
http://www.dotneti...
Please reply only to the newsgroup.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Get Pointer (reference) to a structure
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password