Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo
Marshalling question (Thursday, December 16, 2004)
 

Found the following interesting discussion in the Newsgroups:

Marshalling question
by:MyAlias

Private Structure WCRANGE
Dim wcLow As Short
Dim cGlyphs As Short
End Structure

Private Structure GLYPHSET
Dim cbThis As Integer
Dim flAccel As Integer
Dim cGlyphsSupported As Integer
Dim cRanges As Integer
-> <MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst:=100)> Dim
ranges() As Integer
End Structure

what marshall parameters to use to declare
ranges() As WCRANGE
instead of
ranges() As Integer
in order to have EXACTLY the same memory contents?

Thanks for taking your time



 Reply:
by:Tom Shelton

 
The current marshaller does not support arrays of structs inside of
structs... So basically you can't substitue WCRANGE for Integer. You'll
have to use the Integer array and then break the integer down into two
shorts manually.

I need to see if the 2005 marshaller supports this...

--
Tom Shelton [MVP]


 Reply:
by:MyAlias

 Thanks for all your answers
and sorry to repeat the subject,
i started this thread before reading your answer to another thread
:)

I also hope that the 2005 NET supports much more stuff than the 2003



Posted by Xander Zelders



 
Previous Posts
    - Help! How do I get MS Access Field Properties in V...
    - Deployment
    - How to a .gz file in an VB.net?
    - VB program and EXE
    - Getting program to wait
    - Excel and vb.net
    - How to get attributes provide by in System.Runtime...
    - DataGrid Issues
    - format listbox
    - Memory Usage and Page File Usage - Help!

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland