BurSimScriptObject.cpp
/*--- function ReturnVariant -----------------------------------
 *
 *  Set the value of a variant.  Note: there does not appear to be
 *  any direct way to set the value of a variant to anything other
 *  than a string.  If you want the current type to be something 
 *  else, it appears that you must set the string value and then
 *  change the current type.
 *
 *  Entry:  szstring    is a zero-terminated ASCII string, even though
 *                      VARIANTs are internally stored in UNICODE.
 *
 *  Exit:   *myvar      is a variant which now has the value of szstring.
 */
function ReturnVariant
Set the value of a variant.  Note: there does not appear to be
any direct way to set the value of a variant to anything other
than a string.  If you want the current type to be something
else, it appears that you must set the string value and then
change the current type.

szstring    is a zero-terminated ASCII string, even though
VARIANTs are internally stored in UNICODE.

*myvar      is a variant which now has the value of szstring.
function ReturnVariant Set the value of a variant . Note : there does not appear to be any direct way to set the value of a variant to anything other than a string . If you want the current type to be something else it appears that you must set the string value and then change the current type . szstring is a zero - terminated ASCII string even though VARIANTs are internally stored in UNICODE . * myvar is a variant which now has the value of szstring .
void ReturnVariant(const char *szstring, VARIANT *myvar)
{
   _variant_t myvar_t(szstring);
   *myvar = myvar_t.Detach();
}
void ReturnVariant ( const char * szstring , VARIANT * myvar ) { _variant_t myvar_t ( szstring ) ; * myvar = myvar_t . Detach ( ) ; }
function ReturnVariant
  Set the value of a variant.
function ReturnVariant Set the value of a variant .