Click here to Skip to main content
15,905,144 members
Home / Discussions / C#
   

C#

 
GeneralPointers and dereferencing Pin
frank29713-Jul-04 8:01
frank29713-Jul-04 8:01 
GeneralRe: Pointers and dereferencing Pin
Heath Stewart13-Jul-04 8:34
protectorHeath Stewart13-Jul-04 8:34 
Generalcapturing events when application closes Pin
vista2713-Jul-04 7:59
vista2713-Jul-04 7:59 
GeneralRe: capturing events when application closes Pin
Heath Stewart13-Jul-04 9:07
protectorHeath Stewart13-Jul-04 9:07 
GeneralArray of Struct within Struct Pin
Uday Shastri13-Jul-04 7:58
Uday Shastri13-Jul-04 7:58 
GeneralRe: Array of Struct within Struct Pin
Heath Stewart13-Jul-04 9:21
protectorHeath Stewart13-Jul-04 9:21 
GeneralRe: Array of Struct within Struct Pin
Uday Shastri13-Jul-04 9:47
Uday Shastri13-Jul-04 9:47 
GeneralRe: Array of Struct within Struct Pin
Heath Stewart13-Jul-04 10:19
protectorHeath Stewart13-Jul-04 10:19 
I wasn't saying that getting rid of unsafe would help, only that it's completely unnecessary and forces you to compile with /unsafe, which means your assembly is unverifiable (which poses additional restrictions depending on the deployment scenario).

While marshaling structs within structs is supported, there are known problems that have been discussed elsewhere on the 'net. Since you can already determine the size of the structs, it is faster to just hard-code the values as consts. Marshal.SizeOf isn't necessary when you know the size of a struct.
public const int _IS3kLineDescriptionSize = 82;
public const int _IS3kShowLinesSize = 1656;
I'd recommend just going that route. It certainly solves the problem and, as I said earlier, is faster than calculating the size of the structs when you already know their size.

 

Microsoft MVP, Visual C#
My Articles
Generalupload files Pin
Steven M Hunt13-Jul-04 7:03
Steven M Hunt13-Jul-04 7:03 
GeneralRe: upload files Pin
Heath Stewart13-Jul-04 9:17
protectorHeath Stewart13-Jul-04 9:17 
GeneralRe: upload files Pin
Steven M Hunt14-Jul-04 14:31
Steven M Hunt14-Jul-04 14:31 
GeneralRe: upload files Pin
Heath Stewart19-Jul-04 2:02
protectorHeath Stewart19-Jul-04 2:02 
Generalstruct question Pin
ConfusedAsHeck13-Jul-04 5:30
sussConfusedAsHeck13-Jul-04 5:30 
GeneralRe: struct question Pin
Tom Larsen13-Jul-04 5:34
Tom Larsen13-Jul-04 5:34 
GeneralRe: struct question Pin
Heath Stewart13-Jul-04 6:11
protectorHeath Stewart13-Jul-04 6:11 
GeneralAccessing Forms Pin
Mehbub13-Jul-04 5:02
Mehbub13-Jul-04 5:02 
GeneralRe: Accessing Forms Pin
Tom Larsen13-Jul-04 5:27
Tom Larsen13-Jul-04 5:27 
GeneralRe: Accessing Forms Pin
Colin Angus Mackay13-Jul-04 6:03
Colin Angus Mackay13-Jul-04 6:03 
GeneralRe: Accessing Forms Pin
Dave Kreskowiak13-Jul-04 12:46
mveDave Kreskowiak13-Jul-04 12:46 
GeneralRe: Accessing Forms Pin
Weiye Chen13-Jul-04 19:36
Weiye Chen13-Jul-04 19:36 
GeneralRe: Accessing Forms Pin
Weiye Chen13-Jul-04 20:52
Weiye Chen13-Jul-04 20:52 
GeneralViewing Exported Functions and Parameters in a DLL Pin
Mr. Rogers13-Jul-04 4:22
Mr. Rogers13-Jul-04 4:22 
GeneralRe: Viewing Exported Functions and Parameters in a DLL Pin
Heath Stewart13-Jul-04 4:33
protectorHeath Stewart13-Jul-04 4:33 
GeneralRe: Viewing Exported Functions and Parameters in a DLL Pin
Mr. Rogers13-Jul-04 4:51
Mr. Rogers13-Jul-04 4:51 
QuestionHow to get the time from a computer Pin
Stuggo13-Jul-04 4:11
Stuggo13-Jul-04 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.