7.2.2 The OLESTREAMVTBL Structure

The OLESTREAMVTBL structure, shown below as defined in OLE.H, points to functions the client DLL uses for load and save operations that result from calling OleLoadFromStream and OleSaveToStream. This structure is allocated and initialized by client applications.

typedef struct _OLESTREAMVTBL

{

DWORD (CALLBACK* Get)(LPOLESTREAM, void FAR*, DWORD);

DWORD (CALLBACK* Put)(LPOLESTREAM, OLE_CONST void FAR*, DWORD);

} OLESTREAMVTBL;

7.2.2.1 OLESTREAMVTBL Structure Members

The following table lists the members of the OLESTREAMVTBL data structure. Each member points to a specific function.

Structure Member Description

Get Gets data from the stream.
Put Puts data into the stream.

The return values for the stream functions may indicate that an error has occurred; however they are capable of indicating the cause of the error. The client application is responsible for any required error-recovery operations.

A client application can use these functions to provide variations on the standard stream procedures; for example, the client could change the permanent storage of some objects so that they were stored in a database instead of the client document.