COleLinkingDoc::Register

Informs the OLE system DLLs that the document is open.

BOOL Register(
   COleObjectFactory* pFactory,
   LPCTSTR lpszPathName 
);

Parameters

  • pFactory
    Pointer to an OLE factory object (can be NULL).

  • lpszPathName
    Pointer to the fully qualified path of the container document.

Return Value

Nonzero if the document is successfully registered; otherwise 0.

Remarks

Call this function when creating or opening a named file to register the document with the OLE system DLLs. There is no need to call this function if the document represents an embedded item.

If you are using COleTemplateServer in your application, Register is called for you by COleLinkingDoc's implementation of OnNewDocument, OnOpenDocument, and OnSaveDocument.

Requirements

Header: afxole.h

See Also

Reference

COleLinkingDoc Class

Hierarchy Chart

COleTemplateServer Class

COleObjectFactory Class

CDocument::OnNewDocument

CDocument::OnOpenDocument

Other Resources

COleLinkingDoc Members