The OleInitialize function initializes the OLE library. You must initialize the library before you can call OLE functions.
WINOLEAPI OleInitialize(
LPVOID pvReserved |
//Reserved |
); |
Parameter
Return Values
This function supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
Remarks
Compound document applications must call OleInitialize before calling any other function in the OLE library. OleInitialize calls the CoInitialize function internally.
Typically, OleInitialize is called only once in the process that uses the OLE library. There can be multiple calls, but subsequent calls return S_FALSE. To close the library gracefully, each successful call to OleInitialize, including those that return S_FALSE, must be balanced by a corresponding call to the OleUninitialize function.
See Also