August 2003
Intermediate to advanced
624 pages
15h 3m
English
Since a lot of our resource management issues are made simpler by using smart pointers to MSXML's DOM interfaces, we really need to pay attention to only a few things.
CoInitialize(NULL), returns HRESULT: In every program that uses a COM component the COM library must be initialized using this call. By convention and following the sample code from Microsoft and other authors, I call this early in the main line of the main routine. Values other than NULL can be specified if you are, for example, working with a multi threaded application.
CoUninitialize(), returns void: This closes the COM library. Every CoInitialize call should be matched with a CoUninitialize call. Again, by convention and following the ...