|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
declared initial size of array in structurehow can I declared initial size of array in structure. I have below code in c++ and translate this to vb.net. but get this error: "Arrays declared as structure members cannot be declared with an initial size" c++: typedef struct{ prWChar DeviceInternalName[512]; prWChar ModelName[32]; prUInt16 Generation; }prDeviceInfoTable; vb.net: Structure prDeviceInfoTable Dim DeviceInternalName(0 to 511) As Char Dim ModelName(0 to 31) As Char Dim Generation As Integer End Structure how can I? Very thanks "Farsad" <Far***@discussions.microsoft.com> schrieb: \\\> how can I declared initial size of array in structure. I have below code > in > c++ and translate this to vb.net. but get this error: "Arrays declared as > structure members cannot be declared with an initial size" > > c++: > typedef struct{ > prWChar DeviceInternalName[512]; Imports System.Runtime.InteropServices .... <MarshalAs(UnmanagedType.ByValArray, SizeConst:=512)> _ Public DeviceInternalName() As Char /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Windows History Deletion
MDI Forms Herfried K. Wagner - HELP! Return ByRef How to create ForeignKeyConstraint? How-To Parse this data.. Writing to a MS access db from visual studio .net Using Web.config's <system.web><pages><controls><add /></controls></pages></system.web> To Register VB and CCTV The breakpoint will not currently be hit |
|||||||||||||||||||||||