Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a Variable that gets changed by a DLL
Message
From
20/12/2002 03:59:06
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00734533
Message ID:
00734803
Views:
20
>I don't think that's correct, unless I am misreading his post. A variant is a pretty vanilla VB data type -- the VB equivalent of a struct is a user-defined-type.

A variant is only "vanilla" at the host programming level; at the API level, they are structures. The VB variant is actually a 16 byte structure with an 8 byte header (that identifies the type of the variant). All the possible values are stored as a union in the other 8 bytes.

>In fact, a VB variant is pretty similar to every VFP variable -- it is a data holder of indeterminate type. Not hard-typed like "string" or "integer."

Variants are not indeterminate; they all contain a type field and a value field (or pointer).

A VFP variable is also a "structure", with slots for every possible data type, including a "type" ... as opposed to the "union" employed in VB ... which actually makes a VB variant "shorter" than a VFP variable.

The question is whether or not VFP is actually handling the references call properly in this case. In the past, anything other than one of the basic "primitives" had to be passed as a string when calling by reference (and the result parsed out).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform