BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do you tell what type a TVariant holds

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
Dean Mitchell
Guest





PostPosted: Thu Jul 01, 2004 6:29 am    Post subject: How do you tell what type a TVariant holds Reply with quote



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





PostPosted: Thu Jul 01, 2004 7:36 am    Post subject: Re: How do you tell what type a TVariant holds Reply with quote




"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





PostPosted: Thu Jul 01, 2004 12:25 pm    Post subject: Re: How do you tell what type a TVariant holds Reply with quote




<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





PostPosted: Thu Jul 01, 2004 5:20 pm    Post subject: Re: How do you tell what type a TVariant holds Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.