|
-
Feb 22nd, 2003, 10:19 AM
#1
Thread Starter
Hyperactive Member
Just Need A Simple Answer
I'm converting some C++ code to VB.
I don't understand how part of this declaration works:
#ifndef IGBOOL
#ifdef __WIN32
typedef int IGBOOL;
#else
typedef long IGBOOL;
#endif
#endif
struct NotifyCallbackRecord{
IGBOOL Message; /* The message ID for the notification */
IGBOOL DataStatus; /* The status of the data attached to the notification */
char Data; /* The address of the data attached to the notification */
};
The type IGBOOL is defined as an INT.
I understand that an INT in C++ equals a LONG in VB.
But how can a CHAR be an address?
Isn't a CHAR a single byte?
I need to convert this to VB.
Anyone? Anyone?
-
Feb 22nd, 2003, 04:55 PM
#2
Never mind about the #if things. On 32 bit systems they don't matter.
char Data;
This however looks like a typo. Actually it should probably be
char *Data;
which is a pointer. The corresponding VB datatype is again Long, but you can't use pointers in VB unless you use the API.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 22nd, 2003, 05:16 PM
#3
Thread Starter
Hyperactive Member
Thanks, but I don't think it's a typo.
There are at least 5 other declarations, none of which have the "*".
Of course, I can't guarantee that the Sample code I copied this from works either, but I believe it will.
-
Feb 23rd, 2003, 08:03 AM
#4
Then it could be some sort of index. You would have to look up its usage.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|