Ignore:
Timestamp:
Jun 9, 2002, 6:37:22 PM (23 years ago)
Author:
sandervl
Message:

Resync with latest Wine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/compobj.c

    r8441 r8620  
    5050#include "ifs.h"
    5151
    52 #include "debugtools.h"
    53 
    54 DEFAULT_DEBUG_CHANNEL(ole);
     52#include "wine/debug.h"
     53
     54WINE_DEFAULT_DEBUG_CHANNEL(ole);
    5555
    5656/****************************************************************************
     
    399399    return S_OK;
    400400}
    401 
    402401#ifndef __WIN32OS2__
    403402/***********************************************************************
     
    413412}
    414413#endif
    415 
    416414/******************************************************************************
    417415 *              CoDisconnectObject      [COMPOBJ.15]
     
    612610  return S_OK;
    613611}
    614 
    615612#ifndef __WIN32OS2__
    616613/******************************************************************************
     
    656653}
    657654#endif
    658 
    659655/******************************************************************************
    660656 *              StringFromCLSID [OLE32.151]
     
    932928        return S_OK;
    933929}
    934 
    935930#ifndef __WIN32OS2__
    936931/* FIXME: this function is not declared in the WINELIB headers. But where should it go ? */
     
    955950        return 0;
    956951}
    957 #endif
     952
    958953/* FIXME: this function is not declared in the WINELIB headers. But where should it go ? */
    959954/***********************************************************************
     
    10131008    return DosDateTimeToFileTime(wDosDate, wDosTime, ft);
    10141009}
    1015 
     1010#endif
    10161011/***
    10171012 * COM_GetRegisteredClassObject
     
    13001295}
    13011296
    1302 static HRESULT WINAPI Remote_CoGetClassObject(
    1303     REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo,
    1304     REFIID iid, LPVOID *ppv
    1305 ) {
    1306   HKEY          key;
    1307   char          buf[200];
    1308   HRESULT       hres = E_UNEXPECTED;
    1309   char          xclsid[80];
    1310   WCHAR         dllName[MAX_PATH+1];
    1311   DWORD         dllNameLen = sizeof(dllName);
    1312   STARTUPINFOW  sinfo;
    1313   PROCESS_INFORMATION   pinfo;
    1314 
    1315   WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
    1316 
    1317   sprintf(buf,"CLSID\\%s\\LocalServer32",xclsid);
    1318   hres = RegOpenKeyExA(HKEY_CLASSES_ROOT, buf, 0, KEY_READ, &key);
    1319 
    1320   if (hres != ERROR_SUCCESS)
    1321       return REGDB_E_CLASSNOTREG;
    1322 
    1323   memset(dllName,0,sizeof(dllName));
    1324   hres= RegQueryValueExW(key,NULL,NULL,NULL,(LPBYTE)dllName,&dllNameLen);
    1325   if (hres)
    1326           return REGDB_E_CLASSNOTREG; /* FIXME: check retval */
    1327   RegCloseKey(key);
    1328 
    1329   TRACE("found LocalServer32 exe %s\n", debugstr_w(dllName));
    1330 
    1331   memset(&sinfo,0,sizeof(sinfo));
    1332   sinfo.cb = sizeof(sinfo);
    1333   if (!CreateProcessW(NULL,dllName,NULL,NULL,FALSE,0,NULL,NULL,&sinfo,&pinfo))
    1334       return E_FAIL;
    1335   return create_marshalled_proxy(rclsid,iid,ppv);
    1336 }
    1337 
    13381297/***********************************************************************
    13391298 *           CoGetClassObject [COMPOBJ.7]
    13401299 *           CoGetClassObject [OLE32.16]
    13411300 *
    1342  * FIXME.  If request allows of several options and there is a failure 
     1301 * FIXME.  If request allows of several options and there is a failure
    13431302 *         with one (other than not being registered) do we try the
    13441303 *         others or return failure?  (E.g. inprocess is registered but
     
    13631322#endif
    13641323    DllGetClassObjectFunc DllGetClassObject;
    1365     HKEY key;
    1366     char buf[200];
    13671324
    13681325    WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
     
    13971354
    13981355      return hres;
    1399     }
    1400 
    1401     if (((CLSCTX_LOCAL_SERVER) & dwClsContext)
    1402         && !((CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER) & dwClsContext))
    1403         return Remote_CoGetClassObject(rclsid,dwClsContext,pServerInfo,iid,ppv);
    1404 
    1405     /* remote servers not supported yet */
    1406     if (     ((CLSCTX_REMOTE_SERVER) & dwClsContext)
    1407         && !((CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER) & dwClsContext)
    1408     ){
    1409         FIXME("CLSCTX_REMOTE_SERVER not supported!\n");
    1410         return E_NOINTERFACE;
    14111356    }
    14121357
     
    14441389        }
    14451390    }
    1446    
    1447 
    1448     /* Finally try out of process */
    1449     /* out of process and remote servers not supported yet */
     1391
     1392
     1393    /* Next try out of process */
    14501394    if (CLSCTX_LOCAL_SERVER & dwClsContext)
    14511395    {
    1452         memset(ProviderName,0,sizeof(ProviderName));
    1453         sprintf(buf,"CLSID\\%s\\LocalServer32",xclsid);
    1454         if (((hres = RegOpenKeyExA(HKEY_CLASSES_ROOT, buf, 0, KEY_READ, &key)) != ERROR_SUCCESS) ||
    1455             ((hres = RegQueryValueExW(key,NULL,NULL,NULL,(LPBYTE)ProviderName,&ProviderNameLen)),
    1456              RegCloseKey (key),
    1457              hres != ERROR_SUCCESS))
    1458         {
    1459             hres = REGDB_E_CLASSNOTREG;
    1460         }
    1461         else
    1462         {
    1463             /* CO_E_APPNOTFOUND if no exe */
    1464             FIXME("CLSCTX_LOCAL_SERVER %s registered but not yet supported!\n",debugstr_w(ProviderName));
    1465             hres = E_ACCESSDENIED;
    1466         }
    1467     }
    1468 
     1396        return create_marshalled_proxy(rclsid,iid,ppv);
     1397    }
     1398
     1399    /* Finally try remote */
    14691400    if (CLSCTX_REMOTE_SERVER & dwClsContext)
    14701401    {
    14711402        FIXME ("CLSCTX_REMOTE_SERVER not supported\n");
    1472         hres = E_ACCESSDENIED;
     1403        hres = E_NOINTERFACE;
    14731404    }
    14741405
     
    15761507    return MK_E_INVALIDEXTENSION;
    15771508}
    1578 #ifndef __WIN32OS2__
    15791509/******************************************************************************
    15801510 *              CoRegisterMessageFilter [COMPOBJ.27]
     
    15871517        return 0;
    15881518}
    1589 #endif
     1519
    15901520/***********************************************************************
    15911521 *           CoCreateInstance [COMPOBJ.13]
Note: See TracChangeset for help on using the changeset viewer.