CoGetClassObjectFromURLCoGetClassObjectFromURL*
*



Contents  *



Index  *Topic Contents
*Previous Topic: Functions
*Next Topic: CoInternetCombineUrl

CoGetClassObjectFromURL

STDAPI CoGetClassObjectFromURL(
    [in] REFCLSID rclsid,
    [in] LPCWSTR szCodeURL,
    [in] DWORD dwFileVersionMS,
    [in] DWORD dwFileVersionLS,
    [in] LPCWSTR szContentType,
    [in] LPBINDCTX pBindCtx,
    [in] DWORD dwClsContext,
    [in] LPVOID pvReserved,
    [in] REFIID riid,
    [out] VOID ppv * *
);

Returns a factory object for a given CLSID.

rclsid
CLSID of the ActiveX™ object to be installed. If the value is CLSID_NULL, szContentType is used to determine the CLSID.
szCodeURL
URL pointing to the code for the ActiveX object.
dwFileVersionMS
Major version number for the object to be installed. If this value and the value for dwFileVersionLS are both 0xFFFFFFFF, it is assumed that the latest version of the code is always desired. This means that Internet Component Download will always attempt to download new code.
dwFileVersionLS
Minor version number for the object to be installed. If this value and the value for dwFileVersionMS are both 0xFFFFFFFF, it is assumed that the latest version of the code is always desired. This means that Internet Component Download will always attempt to download new code.
szContentType
MIME type to be understood by the installed ActiveX object. If rclsid is CLSID_NULL, this string is used to determine the CLSID of the object to be installed. Note that this parameter is useful only when trying to download a viewer for a particular media type, when the MIME type of media is known but the CLSID is not.
pBindCtx
Bind context to use for downloading/installing component code. Register IBindStatusCallback in this bind context to receive callbacks during the download and installation process.
dwClsContext
Values taken from the CLSCTX enumeration specifying the execution context for the class object.
pvReserved
Reserved. Must be set to NULL.
riid
Interface to obtain on the factory object. Usually, this interface is IClassFactory.
ppv
Upon return for synchronous calls, the pointer in which to store the interface pointer.

If no CLSID is specified (CLSID_NULL), this function chooses the appropriate CLSID for interpreting the Internet mail extensions (MIME) type specified in szContentType. If the desired object is installed on the system, it is instantiated. Otherwise, the necessary code is downloaded and installed from the location specified in szCodeURL.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.