HighTechTalks DotNet Forums  

marshalling an array of structs of blittable types

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss marshalling an array of structs of blittable types in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
nickdu
 
Posts: n/a

Default marshalling an array of structs of blittable types - 04-27-2009 , 02:05 PM






I'm trying to call RegisterTraceGuids() from C#. One of the parameters of
this method is an in/out array of structures. Do I need to make this an
IntPtr or can I define the structure in C# and make the array an array of
this structure? By the way, another parameter is the number of array items.
--
Thanks,
Nick

nicknospamdu (AT) community (DOT) nospam
remove "nospam" change community. to msn.com

Reply With Quote
  #2  
Old   
Jialiang Ge [MSFT]
 
Posts: n/a

Default RE: marshalling an array of structs of blittable types - 04-28-2009 , 03:57 AM






Hello Nick

You need to declare the parameter as IntPtr for this In/Out array with
variable length.

Regards,
Jialiang Ge (jialge (AT) online (DOT) microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg (AT) microsoft (DOT) com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.