Ignore:
Timestamp:
Jul 12, 1999, 2:21:37 AM (26 years ago)
Author:
davidr
Message:

Updated clsid handling to correctly draw textual clsid's
Fixed GUID instansiation.
Moved initialisation to OLE32.CPP
Added many new APIs incl. CoCreateInstance & CoGetClassObject.
Many partially implemented stubs completed and moved to OLE32.CPP
Running Object Table implemented (Moniker.cpp)
IMalloc & Task Memory implemented.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/initialise.cpp

    r199 r291  
    1 /*
    2  *
     1/* 
     2 * 
    33 * Project Odin Software License can be found in LICENSE.TXT
    4  *
     4 * 
    55 */
    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
    1218 */
    1319
     
    1521
    1622// ----------------------------------------------------------------------
    17 // Local Variables
     23// Local data
    1824// ----------------------------------------------------------------------
    19 static int      s_COMLockCount = 0;
    2025
    21 // ----------------------------------------------------------------------
    22 // CoInitialize()
    23 // ----------------------------------------------------------------------
    24 HRESULT WIN32API CoInitialize(LPVOID lpReserved)
    25 {
    26     dprintf(("OLE32.CoInitialize\n"));
    2726
    28     return CoInitializeEx(lpReserved, COINIT_APARTMENTTHREADED);
    29 }
    3027
    31 // ----------------------------------------------------------------------
    32 // CoInitializeEx()
    33 // ----------------------------------------------------------------------
    34 HRESULT WIN32API CoInitializeEx(
    35         LPVOID  lpReserved,     // [in] pointer to win32 malloc interface
    36         DWORD   dwCoInit)       // [in] A value from COINIT specifies the thread
    37 {
    38     HRESULT hr = S_FALSE;
    3928
    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 initialize
    59      * 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.