[RESOLVED] Problem Converting C struct to Vb.Net
Hi, I have a DLL written in C which I want to use in my VB.net Application.
In order to use it correctly I need to declare the structures from that DLL also in VB.Net.
Currently I'm stuck with something like this, which I don't really understand.
Code:
struc C_Struc
{
char WhatEver;
//Padding
BYTE :8;
WORD :16;
};
I do understand that BYTE and Word types are ued for padding, but what is set for them a value of 8 and 16, 8 and 16 byte???
Re: Problem Converting C struct to Vb.Net
Duplicate thread has been deleted.
In C you can specify how many bits (not bytes) each member should occupy.
Code:
struct someStruct
{
unsigned char high:4;
unsigned char low:4;
};
The above struct will be stored in a single byte.
Re: [RESOLVED] Problem Converting C struct to Vb.Net
Sorry for double-posting, maybe it was an age-problem.
Thanks for the solution.