Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VARIANT Data Strings & Null Char's

Status
Not open for further replies.

yorklex

Programmer
Dec 27, 2001
3
US
I am writing a communications program that requires transmitting null characters through the comm port. MSComm.ocx wants a Variant for SetOutput. How can I copy or cast null characters into the Variant Data Type for transmitting? I have tryed many different methods without success including modifying the VCTERM program sample.
 
Look into COleVariant. Suppose you needed to pass the Variant as an argument you could:

foo(COleVariant("Hello"),COleVariant(7)...)

FYI: the variant is limited to 255 characters.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top