| View previous topic :: View next topic |
| Author |
Message |
Dean Mitchell Guest
|
Posted: Thu Jul 01, 2004 6:29 am Post subject: How do you tell what type a TVariant holds |
|
|
Hi,
I was hoping someone could tell me how to tell what type of data is help
within a TVariant, it appears there is no method available.
Thanks in advance
Dean
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Jul 01, 2004 7:36 am Post subject: Re: How do you tell what type a TVariant holds |
|
|
"Dean Mitchell" <not (AT) this (DOT) address> wrote
| Quote: | I was hoping someone could tell me how to tell
what type of data is help within a TVariant
|
TVariant is a wrapper for the VARIANT structure. VARIANT has a vt member
for that exact purpose. The value is a bitmask containing information about
the contained data type and any flags that indicate how to access it
properly.
Gambit
P.S. please do not cross-post. It is against Borland's newsgroup guidelines
([url]http://info.borland.com/newsgroups)[/url]. Only post to the single most
appropriate group.
|
|
| Back to top |
|
 |
Gary Setter Guest
|
Posted: Thu Jul 01, 2004 12:25 pm Post subject: Re: How do you tell what type a TVariant holds |
|
|
<snip>
| Quote: | TVariant is a wrapper for the VARIANT structure. VARIANT has a vt member
for that exact purpose. The value is a bitmask containing information
about
the contained data type and any flags that indicate how to access it
properly.
snip |
the vt member is actually an enum. Minor, minor point. :-)
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Jul 01, 2004 5:20 pm Post subject: Re: How do you tell what type a TVariant holds |
|
|
"Gary Setter" <setterg (AT) worldnet (DOT) att.net> wrote
| Quote: | the vt member is actually an enum.
|
Only in part. The vt member itself is declared as a VARTYPE, which is a
typedef for an unsigned short. The individual values that can be assigned
to VARTYPE are declared as an enum named VARENUM, but VARTYPE itself is not
an enum because it can have multiple values assigned to it at a time, which
an enum cannot do.
Gambit
|
|
| Back to top |
|
 |
|