R
romi
Hi
I have a problem, I want to convert program in Visual Basic 6 to VC++6.
Program in VB works OK., but in VC++ I don't know how to convert 'VARIANT'
to 'Cstring'.
How to convert 'VARIANT ww' to 'CString pp'
In C++ debug info I have:
ww={???}
ww.vt=8204
pvarVal={VT_NULL}
hr=0
Visual C++
-------------------------------------------------------------
BSTR _name;
_name = SysAllocString(L"Name");
VARIANT ww;
//sdoc->GetItemValue(BSTR pName, VARIANT *pValues)
HRESULT hr = sdoc->GetItemValue(_name, &ww);
CString pp;
pp = ww; // HOW TO MAKE IT WORK ???
-------------------------------------------------------------
Visual Basic:
-------------------------------------------------------------
Dim ww As String
ww = sdoc.GetItemValue("Name")(0)
-------------------------------------------------------------
GREAT THANKS FOR ANY HELP
r.
I have a problem, I want to convert program in Visual Basic 6 to VC++6.
Program in VB works OK., but in VC++ I don't know how to convert 'VARIANT'
to 'Cstring'.
How to convert 'VARIANT ww' to 'CString pp'
In C++ debug info I have:
ww={???}
ww.vt=8204
pvarVal={VT_NULL}
hr=0
Visual C++
-------------------------------------------------------------
BSTR _name;
_name = SysAllocString(L"Name");
VARIANT ww;
//sdoc->GetItemValue(BSTR pName, VARIANT *pValues)
HRESULT hr = sdoc->GetItemValue(_name, &ww);
CString pp;
pp = ww; // HOW TO MAKE IT WORK ???
-------------------------------------------------------------
Visual Basic:
-------------------------------------------------------------
Dim ww As String
ww = sdoc.GetItemValue("Name")(0)
-------------------------------------------------------------
GREAT THANKS FOR ANY HELP
r.