how to fill a Variant with a composed string


D

dev

Dear members,

I must composed a string in this manner:

char szString[256];
sprintf(szString,"first a number: %d;then another string %s",iNumber,
szAnotherString);

well, now I need to put this composed string in a VARIANT, (her bstrval
member).

Well here my questions:

1) How to convert the string szString in a BSTR to put in the VARIANT?
2) How to use a different approach to compose the string, without using char
[] but something more BSTR-oriented?

Thanks to all

Dev
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Variant with BSTR Array 0

Top