FILE: How to Call CoGetClassObjectFromURL() in an MFC AppID: Q174653
|
This Urlobj.exe sample demonstrates how to call the CoGetClassObjectFromURL() function to download, register, and instantiate an object. The sample implements two interfaces necessary to allow the CoGetClassObjectFromURL() function to work properly: IBindStatusCallback and IWindowForBindingUI.
The following file is available for download from the Microsoft Software Library:
Urlobj.exeFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online ServicesThe CoGetClassObjectFromURL() function returns a class factory object for a given CLSID. If the desired object is installed on the system, it is instantiated. Otherwise, the necessary code is downloaded and installed from the specified URL. The sample uses a CFormView to get the value of the CLSID, the URL pointing to the code for the ActiveX object, the major and minor version, and the size of the object for displaying (it assumes that the control will display itself in some manner).
Additional query words: softlib
Keywords : kbfile kbVC500 kbVC600 kbWinInet
Version : WINDOWS:4.0; WINNT:5.0,6.0
Platform :
Issue type :
Last Reviewed: August 3, 1999