Поделиться через


DllGetClassObject callback function

The DllGetClassObject function is the entry point used by C++ file and stream handlers to create an instance of the handler.

Syntax

STDAPI DllGetClassObject(
   const CLSID &rclsid,
   const IID   &riid,
   void        **ppv
);

Parameters

  • rclsid [ref]
    Class identifier of the file or stream handler.

  • riid [ref]
    Interface identifier of the file or stream handler.

  • ppv
    Pointer to a buffer that receives the object of the interface query. If the interface specified in riid is not supported by the object, S_FALSE is returned and the ppvObj parameter used in the IUnknown interface must be set to NULL.

Return value

Returns a handle of an instance of the file or stream handler.

Remarks

DllGetClassObject is the only export function your DLL needs. The OLE component object DLL calls this function to obtain an instance of the stream- or file-handler interface.

Your file or stream handler should ensure that the system requests the correct class identifier before creating an instance of it.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

See also

Custom File and Stream Handlers

Custom File and Stream Handler Functions