Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: convert c/c++ header to c# Pin
Christian Graus8-Jun-05 16:53
protectorChristian Graus8-Jun-05 16:53 
GeneralRe: convert c/c++ header to c# Pin
savage_8-Jun-05 16:59
savage_8-Jun-05 16:59 
GeneralRe: convert c/c++ header to c# Pin
Christian Graus8-Jun-05 17:11
protectorChristian Graus8-Jun-05 17:11 
GeneralRe: convert c/c++ header to c# Pin
savage_8-Jun-05 17:20
savage_8-Jun-05 17:20 
GeneralRe: convert c/c++ header to c# Pin
Christian Graus8-Jun-05 17:23
protectorChristian Graus8-Jun-05 17:23 
GeneralRe: convert c/c++ header to c# [EDITED] Pin
Dave Kreskowiak9-Jun-05 8:49
mveDave Kreskowiak9-Jun-05 8:49 
GeneralRe: convert c/c++ header to c# [EDITED] Pin
savage_9-Jun-05 11:18
savage_9-Jun-05 11:18 
GeneralRe: convert c/c++ header to c# [EDITED] Pin
Dave Kreskowiak9-Jun-05 15:24
mveDave Kreskowiak9-Jun-05 15:24 
The field offsets are just how many bytes into the structure that field starts. What these values are depends on the original structure. Usually, the field offsets put the field immediately after the last one, accounting for the size (in bytes) of the previous fields.

In your example, the first field is an unsigned char, called messagelength, at, obviously, offset 0 from the start of the structure. Since the C++ char type is usually a single byte, the next field would probably be at offset 1, accounting for the size of the fields before it.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

Questioncan someone explain this to me??? Pin
Serenena8-Jun-05 16:40
Serenena8-Jun-05 16:40 
AnswerRe: can someone explain this to me??? Pin
Christian Graus8-Jun-05 16:54
protectorChristian Graus8-Jun-05 16:54 
GeneralRe: can someone explain this to me??? Pin
Serenena8-Jun-05 18:49
Serenena8-Jun-05 18:49 
GeneralRe: can someone explain this to me??? Pin
Christian Graus8-Jun-05 18:52
protectorChristian Graus8-Jun-05 18:52 
GeneralRe: can someone explain this to me??? Pin
Serenena8-Jun-05 19:16
Serenena8-Jun-05 19:16 
GeneralRe: can someone explain this to me??? Pin
Christian Graus8-Jun-05 19:22
protectorChristian Graus8-Jun-05 19:22 
GeneralRe: can someone explain this to me??? Pin
Serenena8-Jun-05 19:34
Serenena8-Jun-05 19:34 
GeneralRe: can someone explain this to me??? Pin
Christian Graus8-Jun-05 19:36
protectorChristian Graus8-Jun-05 19:36 
GeneralRe: can someone explain this to me??? Pin
Serenena8-Jun-05 20:14
Serenena8-Jun-05 20:14 
GeneralRe: can someone explain this to me??? Pin
Christian Graus9-Jun-05 0:36
protectorChristian Graus9-Jun-05 0:36 
GeneralRe: can someone explain this to me??? Pin
Dave Kreskowiak9-Jun-05 8:55
mveDave Kreskowiak9-Jun-05 8:55 
GeneralRe: can someone explain this to me??? Pin
Christian Graus9-Jun-05 11:19
protectorChristian Graus9-Jun-05 11:19 
GeneralRe: can someone explain this to me??? Pin
Dave Kreskowiak9-Jun-05 15:26
mveDave Kreskowiak9-Jun-05 15:26 
GeneralRe: can someone explain this to me??? Pin
Christian Graus9-Jun-05 15:30
protectorChristian Graus9-Jun-05 15:30 
GeneralRe: can someone explain this to me??? Pin
Dave Kreskowiak9-Jun-05 16:22
mveDave Kreskowiak9-Jun-05 16:22 
GeneralRe: can someone explain this to me??? Pin
Christian Graus9-Jun-05 16:24
protectorChristian Graus9-Jun-05 16:24 
GeneralRe: can someone explain this to me??? Pin
Dave Kreskowiak10-Jun-05 2:40
mveDave Kreskowiak10-Jun-05 2:40 

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.