To open a compound document, a client application should take the following steps:
1.Register the document with the client library.
2.Load the document data from a file.
3.For each object in the document, call the OleLoadFromStream function.
4.List any objects with manual links so that the user can update them. Automatically update any automatic links.
The OleRegisterClientDoc function registers a document with the client library and returns a handle that is used in object-creation functions and document-management functions. (This registration does not involve the registration database.)
A client application should call the OleLoadFromStream function for each
object in the document that will be shown on the screen or otherwise activated.
(It is often not necessary to load every object in a document immediately when the document is opened.) Parameters for this function include a pointer to the OLECLIENT structure, which is used to locate the client's callback function (and which is sometimes used by the client to store private state information for the object), and a pointer to the OLESTREAM structure. The library calls the Get function in the OLESTREAMVTBL structure to load the object.