|
-
December 3rd, 1998, 04:19 PM
#1
Passing structure from VC++ to VB
I would like to know if there is a way to pass a structure from VC++ to VB.
I created an ActiveX control which can passed parameter by value but I want to
pass an address of a structure back
Thank
-
December 3rd, 1998, 04:29 PM
#2
Re: Passing structure from VC++ to VB
Hi
You can pass a pointer to the struct (like in the GetWindowRect -> LPRECT)
In VB declare this as ....(...., MyVar As MyStruct) ( just as in the GetWindowRect)
VB's default for passing values is ByRef, which is a kind of a pointer.
So it should work. Although you might have some troubles if the struct contains char pointers. VB might have some trouble with that, because the sizeof of the struct is unknown at that point.
Hope it helps
Crazy D
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
|