Problem in passing a VARIANT to IXMLDOMNodePtr
-
hi everyone, well I gotta say this, I'm not a gr8 fan for programming in ATL/MFC but now I'm in a situation where I have to do this stuff. I'm using MSXML 4.0 in a project where I need to develop an XML log as the functions get called. I'm trying to pass a CString to the nodeTypedValue or NodeValue functions and its giving the error
error C2064: term does not evaluate to a function taking 1 arguments
the Code is given belowCString t = "No Error"; pRetCode->nodeTypedValue(_variant_t(t));
Its also giving this error on thisCString t; t.Format("0x%x",hr); pRetCode->nodeValue(_variant_t(t)); code> Can u plz tell me what to do here??? Thanks in advance Rocky _You can't climb up a ladder with your hands in your pockets._
-
hi everyone, well I gotta say this, I'm not a gr8 fan for programming in ATL/MFC but now I'm in a situation where I have to do this stuff. I'm using MSXML 4.0 in a project where I need to develop an XML log as the functions get called. I'm trying to pass a CString to the nodeTypedValue or NodeValue functions and its giving the error
error C2064: term does not evaluate to a function taking 1 arguments
the Code is given belowCString t = "No Error"; pRetCode->nodeTypedValue(_variant_t(t));
Its also giving this error on thisCString t; t.Format("0x%x",hr); pRetCode->nodeValue(_variant_t(t)); code> Can u plz tell me what to do here??? Thanks in advance Rocky _You can't climb up a ladder with your hands in your pockets._
Have you included comdef.h?
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze
-
Have you included comdef.h?
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze
-
hi everyone, well I gotta say this, I'm not a gr8 fan for programming in ATL/MFC but now I'm in a situation where I have to do this stuff. I'm using MSXML 4.0 in a project where I need to develop an XML log as the functions get called. I'm trying to pass a CString to the nodeTypedValue or NodeValue functions and its giving the error
error C2064: term does not evaluate to a function taking 1 arguments
the Code is given belowCString t = "No Error"; pRetCode->nodeTypedValue(_variant_t(t));
Its also giving this error on thisCString t; t.Format("0x%x",hr); pRetCode->nodeValue(_variant_t(t)); code> Can u plz tell me what to do here??? Thanks in advance Rocky _You can't climb up a ladder with your hands in your pockets._
-
well actualy that problem got solved when i did something like this pTempNode->nodeTypedValue = _T("MixNSplit 12"); pNode->nodeValue = _variant_t(ObjType); Thanks I think that LPCTSTR would also come in useful somewhere for me
Rocky You can't climb up a ladder with your hands in your pockets.
-
hi everyone, well I gotta say this, I'm not a gr8 fan for programming in ATL/MFC but now I'm in a situation where I have to do this stuff. I'm using MSXML 4.0 in a project where I need to develop an XML log as the functions get called. I'm trying to pass a CString to the nodeTypedValue or NodeValue functions and its giving the error
error C2064: term does not evaluate to a function taking 1 arguments
the Code is given belowCString t = "No Error"; pRetCode->nodeTypedValue(_variant_t(t));
Its also giving this error on thisCString t; t.Format("0x%x",hr); pRetCode->nodeValue(_variant_t(t)); code> Can u plz tell me what to do here??? Thanks in advance Rocky _You can't climb up a ladder with your hands in your pockets._
Olen'! when you open first parenthesis - what you see in help tooltip? There is should be enumerate of parametres in function, yes? So, how many parameteres in that function? Actually, I have meet that problem - in MS .NET Studio and MS VS 6.0 count of parametres in MSXML namespace function are dfferents. But don't wory - the absent parametr is result of DWORD types. So, pRetCode->nodeValue(_variant_t(t)); transform to DWORD dw; pRetCode->nodeValue(_variant_t(t), &dw); or some looks like thiat :)
-
Olen'! when you open first parenthesis - what you see in help tooltip? There is should be enumerate of parametres in function, yes? So, how many parameteres in that function? Actually, I have meet that problem - in MS .NET Studio and MS VS 6.0 count of parametres in MSXML namespace function are dfferents. But don't wory - the absent parametr is result of DWORD types. So, pRetCode->nodeValue(_variant_t(t)); transform to DWORD dw; pRetCode->nodeValue(_variant_t(t), &dw); or some looks like thiat :)
template HRESULT _QueryInterface(_InterfacePtr p) throw()
{
HRESULT hr;// Can't QI NULL // if (p != NULL) { // Query for this interface // Interface\* pInterface; hr = p->QueryInterface(GetIID(), reinterpret\_cast(&pInterface));**//Error Statementc:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include\\comip.h(850): error C2227: left of '->QueryInterface' must point to class/struct/union** // Save the interface without AddRef()ing. // Attach(SUCCEEDED(hr)? pInterface: NULL); } else { operator=(static\_cast(NULL)); hr = E\_NOINTERFACE; } return hr; }
I've got another problem now. I sorted that previous one earlier but now its reporting an error here on the variable p. I havent even touched the code in this file and I dont have any idea how this one came about. Can u give me any suggestions for this? Its using typedef to define the _Interface type but I havent foiund any typedef statement for _InterfacePtr. I tried toadd it but to no avail.
Rocky You can't climb up a ladder with your hands in your pockets.
-
template HRESULT _QueryInterface(_InterfacePtr p) throw()
{
HRESULT hr;// Can't QI NULL // if (p != NULL) { // Query for this interface // Interface\* pInterface; hr = p->QueryInterface(GetIID(), reinterpret\_cast(&pInterface));**//Error Statementc:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include\\comip.h(850): error C2227: left of '->QueryInterface' must point to class/struct/union** // Save the interface without AddRef()ing. // Attach(SUCCEEDED(hr)? pInterface: NULL); } else { operator=(static\_cast(NULL)); hr = E\_NOINTERFACE; } return hr; }
I've got another problem now. I sorted that previous one earlier but now its reporting an error here on the variable p. I havent even touched the code in this file and I dont have any idea how this one came about. Can u give me any suggestions for this? Its using typedef to define the _Interface type but I havent foiund any typedef statement for _InterfacePtr. I tried toadd it but to no avail.
Rocky You can't climb up a ladder with your hands in your pockets.