Changeset 291 for trunk/src/ole32/initialise.cpp
- Timestamp:
- Jul 12, 1999, 2:21:37 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/initialise.cpp
r199 r291 1 /* 2 * 1 /* 2 * 3 3 * Project Odin Software License can be found in LICENSE.TXT 4 * 4 * 5 5 */ 6 /* 7 * Win32 OLE stubs for OS/2 8 * 9 * 1998/06/12 10 * 11 * Copyright 1998 Sander van Leeuwen 6 /* 7 * COM/OLE Startup shutdown. 8 * 9 * 1/7/99 10 * 11 * Copyright 1999 David J. Raison 12 * 13 * Some portions from Wine Implementation 14 * Copyright 1995 Martin von Loewis 15 * Copyright 1998 Justin Bradford 16 * Copyright 1999 Francis Beaudet 17 * Copyright 1999 Sylvain St-Germain 12 18 */ 13 19 … … 15 21 16 22 // ---------------------------------------------------------------------- 17 // Local Variables23 // Local data 18 24 // ---------------------------------------------------------------------- 19 static int s_COMLockCount = 0;20 25 21 // ----------------------------------------------------------------------22 // CoInitialize()23 // ----------------------------------------------------------------------24 HRESULT WIN32API CoInitialize(LPVOID lpReserved)25 {26 dprintf(("OLE32.CoInitialize\n"));27 26 28 return CoInitializeEx(lpReserved, COINIT_APARTMENTTHREADED);29 }30 27 31 // ----------------------------------------------------------------------32 // CoInitializeEx()33 // ----------------------------------------------------------------------34 HRESULT WIN32API CoInitializeEx(35 LPVOID lpReserved, // [in] pointer to win32 malloc interface36 DWORD dwCoInit) // [in] A value from COINIT specifies the thread37 {38 HRESULT hr = S_FALSE;39 28 40 dprintf(("OLE32.CoInitializeEx(%p, %lx)\n", lpReserved, dwCoInit));41 42 if (lpReserved != NULL)43 {44 dprintf(("Warning: Bad parameter %p, must be an old Windows Application", lpReserved));45 }46 47 /*48 * Check for unsupported features.49 */50 if (dwCoInit != COINIT_APARTMENTTHREADED)51 {52 dprintf(("Warning: Unsupported flag %lx", dwCoInit));53 /* Hope for the best and continue anyway */54 }55 56 /*57 * Check the lock count.58 * If this is the first time going through the initialize59 * process, we have to initialize the libraries.60 */61 if (s_COMLockCount == 0)62 {63 /*64 * Initialize the various COM libraries and data structures.65 */66 dprintf(("OLE32.CoInitializeEx - Initializing COM libraries"));67 68 // RunningObjectTableImpl_Initialize();69 70 hr = S_OK;71 }72 73 /*74 * Crank-up that lock count.75 */76 s_COMLockCount++;77 78 return hr;79 }80
Note:
See TracChangeset
for help on using the changeset viewer.