By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,251 Members | 1,656 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,251 IT Pros & Developers. It's quick & easy.

Marshalling question

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, 26 May 2004 00:26:11 +0100, MyAlias wrote:
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


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]
Nov 20 '05 #2

P: n/a
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

Tom Shelton wrote:
On Wed, 26 May 2004 00:26:11 +0100, MyAlias wrote:

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

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...


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.