Convert char to _variant_t 
Author Message
 Convert char to _variant_t

Hi!
I'm trying to build a COM component using ATL. How can I convert a simple
char to a _variant_t.

regards Tobias



Sun, 03 Aug 2003 22:49:45 GMT  
 Convert char to _variant_t
Assuming you want a variant of type VT_UI1,

char c;
_variant_t var(BYTE(c));

--
With best wishes,
    Igor Tandetnik


Quote:
> Hi!
> I'm trying to build a COM component using ATL. How can I convert a simple
> char to a _variant_t.

> regards Tobias



Mon, 04 Aug 2003 07:14:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Converting char array of literals chars to escape chars

2. How to get (unsigned char *) from _variant_t

3. _variant_t Conversion to char name[512];

4. How to convert _variant_t to any structure that I defined

5. Converting from CTime to _variant_t

6. How _variant_t can convert unicode value?

7. Convert char* to char __gc[]

8. cannot convert from char* to char[4]

9. Convert four chars to a long and a long to four chars

10. Converting unsigned char to signed char invokes UB?

11. converting char to pointer char

12. Convert an 8bit char in a 7bit char!

 

 
Powered by phpBB® Forum Software