Below is a simple code that i wrote about VARIANT.
The weird thing is at the end of the code, both vtEmpName and vtDept is "Accounting".
VARIANT vtEmpName;
VARIANT vtDept;
vtEmpName.vt = VT_BSTR;
vtEmpName.bstrVal = _bstr_t("Joe Schmoe");
vtDept.vt = VT_BSTR;
vtDept.bstrVal = _bstr_t("Accounting");
On the other hand, if I replace "Joe Schmoe" with "Joe", everything is ok.
Am I missing something..?