Changeset 8620 for trunk/src/ole32/compobj.c
- Timestamp:
- Jun 9, 2002, 6:37:22 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/compobj.c
r8441 r8620 50 50 #include "ifs.h" 51 51 52 #include " debugtools.h"53 54 DEFAULT_DEBUG_CHANNEL(ole);52 #include "wine/debug.h" 53 54 WINE_DEFAULT_DEBUG_CHANNEL(ole); 55 55 56 56 /**************************************************************************** … … 399 399 return S_OK; 400 400 } 401 402 401 #ifndef __WIN32OS2__ 403 402 /*********************************************************************** … … 413 412 } 414 413 #endif 415 416 414 /****************************************************************************** 417 415 * CoDisconnectObject [COMPOBJ.15] … … 612 610 return S_OK; 613 611 } 614 615 612 #ifndef __WIN32OS2__ 616 613 /****************************************************************************** … … 656 653 } 657 654 #endif 658 659 655 /****************************************************************************** 660 656 * StringFromCLSID [OLE32.151] … … 932 928 return S_OK; 933 929 } 934 935 930 #ifndef __WIN32OS2__ 936 931 /* FIXME: this function is not declared in the WINELIB headers. But where should it go ? */ … … 955 950 return 0; 956 951 } 957 #endif 952 958 953 /* FIXME: this function is not declared in the WINELIB headers. But where should it go ? */ 959 954 /*********************************************************************** … … 1013 1008 return DosDateTimeToFileTime(wDosDate, wDosTime, ft); 1014 1009 } 1015 1010 #endif 1016 1011 /*** 1017 1012 * COM_GetRegisteredClassObject … … 1300 1295 } 1301 1296 1302 static HRESULT WINAPI Remote_CoGetClassObject(1303 REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo,1304 REFIID iid, LPVOID *ppv1305 ) {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 1338 1297 /*********************************************************************** 1339 1298 * CoGetClassObject [COMPOBJ.7] 1340 1299 * CoGetClassObject [OLE32.16] 1341 1300 * 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 1343 1302 * with one (other than not being registered) do we try the 1344 1303 * others or return failure? (E.g. inprocess is registered but … … 1363 1322 #endif 1364 1323 DllGetClassObjectFunc DllGetClassObject; 1365 HKEY key;1366 char buf[200];1367 1324 1368 1325 WINE_StringFromCLSID((LPCLSID)rclsid,xclsid); … … 1397 1354 1398 1355 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;1411 1356 } 1412 1357 … … 1444 1389 } 1445 1390 } 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 */ 1450 1394 if (CLSCTX_LOCAL_SERVER & dwClsContext) 1451 1395 { 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 */ 1469 1400 if (CLSCTX_REMOTE_SERVER & dwClsContext) 1470 1401 { 1471 1402 FIXME ("CLSCTX_REMOTE_SERVER not supported\n"); 1472 hres = E_ ACCESSDENIED;1403 hres = E_NOINTERFACE; 1473 1404 } 1474 1405 … … 1576 1507 return MK_E_INVALIDEXTENSION; 1577 1508 } 1578 #ifndef __WIN32OS2__1579 1509 /****************************************************************************** 1580 1510 * CoRegisterMessageFilter [COMPOBJ.27] … … 1587 1517 return 0; 1588 1518 } 1589 #endif 1519 1590 1520 /*********************************************************************** 1591 1521 * CoCreateInstance [COMPOBJ.13]
Note:
See TracChangeset
for help on using the changeset viewer.