|
-
Oct 12th, 2012, 02:04 AM
#1
[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???
Last edited by opus; Oct 12th, 2012 at 02:45 AM.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Oct 12th, 2012, 03:14 AM
#2
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.
-
Oct 12th, 2012, 11:13 AM
#3
Re: [RESOLVED] Problem Converting C struct to Vb.Net
Sorry for double-posting, maybe it was an age-problem.
Thanks for the solution.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|