Changeset 4274 for trunk/src/ole32/defaulthandler.cpp
- Timestamp:
- Sep 17, 2000, 12:31:07 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/defaulthandler.cpp
r1033 r4274 1 /* $Id: defaulthandler.cpp,v 1. 1 1999-09-24 21:49:43 davidr Exp $ */1 /* $Id: defaulthandler.cpp,v 1.2 2000-09-17 10:31:03 davidr Exp $ */ 2 2 /* 3 3 * OLE 2 default object handler … … 101 101 * Name of the container and object contained 102 102 */ 103 BSTR containerApp;104 BSTR containerObj;103 LPWSTR containerApp; 104 LPWSTR containerObj; 105 105 106 106 }; … … 830 830 * Be sure to cleanup before re-assinging the strings. 831 831 */ 832 if (This->containerApp !=NULL)833 { 834 SysFreeString(This->containerApp);832 if (This->containerApp != NULL) 833 { 834 HeapFree( GetProcessHeap(), 0, This->containerApp ); 835 835 This->containerApp = NULL; 836 836 } 837 837 838 if (This->containerObj !=NULL)839 { 840 SysFreeString(This->containerObj);838 if (This->containerObj != NULL) 839 { 840 HeapFree( GetProcessHeap(), 0, This->containerObj ); 841 841 This->containerObj = NULL; 842 842 } … … 846 846 */ 847 847 if (szContainerApp != NULL) 848 This->containerApp = SysAllocString(szContainerApp); 848 { 849 if ((This->containerApp = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, 850 (lstrlenW(szContainerApp) + 1) * sizeof(WCHAR) )) != NULL) 851 lstrcpyW( This->containerApp, szContainerApp ); 852 } 849 853 850 854 if (szContainerObj != NULL) 851 This->containerObj = SysAllocString(szContainerObj); 852 855 { 856 if ((This->containerObj = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, 857 (lstrlenW(szContainerObj) + 1) * sizeof(WCHAR) )) != NULL) 858 lstrcpyW( This->containerObj, szContainerObj ); 859 } 860 853 861 return S_OK; 854 862 } … … 1307 1315 } 1308 1316 1317 /************************************************************************ 1318 * DefaultHandler_GetData 1319 * 1320 * Get Data from a source dataobject using format pformatetcIn->cfFormat 1321 * See Windows documentation for more details on GetData. 1322 * Default handler's implementation of this method delegates to the cache. 1323 */ 1309 1324 static HRESULT WINAPI DefaultHandler_GetData( 1310 IDataObject* iface, 1311 LPFORMATETC pformatetcIn, 1312 STGMEDIUM* pmedium) 1313 { 1314 FIXME(": Stub\n"); 1315 return E_NOTIMPL; 1325 IDataObject* iface, 1326 LPFORMATETC pformatetcIn, 1327 STGMEDIUM* pmedium) 1328 { 1329 IDataObject* cacheDataObject = NULL; 1330 HRESULT hres; 1331 1332 _ICOM_THIS_From_IDataObject(DefaultHandler, iface); 1333 1334 TRACE("(%p, %p, %p)\n", iface, pformatetcIn, pmedium); 1335 1336 hres = IUnknown_QueryInterface(This->dataCache, 1337 &IID_IDataObject, 1338 (void**)&cacheDataObject); 1339 1340 if (FAILED(hres)) 1341 return E_UNEXPECTED; 1342 1343 hres = IDataObject_GetData(cacheDataObject, 1344 pformatetcIn, 1345 pmedium); 1346 1347 IDataObject_Release(cacheDataObject); 1348 1349 return hres; 1316 1350 } 1317 1351
Note:
See TracChangeset
for help on using the changeset viewer.