Subj : Re: XML, DOM and BC++ To : borland.public.cpp.borlandcpp From : "Benjamin Pratt" Date : Wed Oct 29 2003 03:36 pm If you have the latest Platform SDK, this should work: #include int main() { CoInitialize(NULL); // Don't forget this IXMLDOMDocument2* pXMLDoc; HRESULT hr = CoCreateInstance( CLSID_DOMDocument40, // Class identifier of DOMDocument object NULL, // no aggregation CLSCTX_INPROC_SERVER, // run server in process IID_IXMLDOMDocument2, // requested interface of DOMDocument object (void**)&pXMLDoc); // where to put the pointer to the interface // do stuff with pXMLDoc interface // use QueryInterface to get other DOM interfaces if(SUCCEEDED(hr)) pXMLDoc->Release(); // remember to release interfaces when you are finished with them CoUninitialize(); return 0; } The msxml2.h header is self sufficient and will include rpc.h and rpcndr.h (where MIDL_INTERFACE is defined), but only if rpcndr.h is version 440 or higher. The version that comes with BC5 is old and will not work. You need to update the platform SDK. It is availible here http://www.microsoft.com/msdownload/platformsdk/sdkupdate/. Remember to point the project include directory to whereever you install the SDK, otherwise BC5 will continue to use the old headers. Also, remember to link with ole32.lib and msxml2.lib. .