Changeset 8620 for trunk/src/ole32/datacache.c
- Timestamp:
- Jun 9, 2002, 6:37:22 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/datacache.c
r8441 r8620 31 31 * - This implementation of the datacache will let your application 32 32 * load documents that have embedded OLE objects in them and it will 33 * also retrieve the metafile representation of those objects. 33 * also retrieve the metafile representation of those objects. 34 34 * - This implementation of the datacache will also allow your 35 35 * application to save new documents with OLE objects in them. 36 * - The main thing that it doesn't do is allow you to activate 36 * - The main thing that it doesn't do is allow you to activate 37 37 * or modify the OLE objects in any way. 38 38 * - I haven't found any good documentation on the real usage of … … 41 41 * "\002OlePresXXX". It appears to just be a counter. 42 42 * - Also, I don't know the real content of the presentation stream 43 * header. I was able to figure-out where the extent of the object 43 * header. I was able to figure-out where the extent of the object 44 44 * was stored and the aspect, but that's about it. 45 45 */ … … 95 95 * List all interface VTables here 96 96 */ 97 ICOM_VTABLE(IDataObject)* lpvtbl1; 97 ICOM_VTABLE(IDataObject)* lpvtbl1; 98 98 ICOM_VTABLE(IUnknown)* lpvtbl2; 99 99 ICOM_VTABLE(IPersistStorage)* lpvtbl3; 100 ICOM_VTABLE(IViewObject2)* lpvtbl4; 100 ICOM_VTABLE(IViewObject2)* lpvtbl4; 101 101 ICOM_VTABLE(IOleCache2)* lpvtbl5; 102 102 ICOM_VTABLE(IOleCacheControl)* lpvtbl6; … … 133 133 134 134 /* 135 * Here, I define utility macros to help with the casting of the 135 * Here, I define utility macros to help with the casting of the 136 136 * "this" parameter. 137 137 * There is a version to accomodate all of the VTables implemented … … 139 139 */ 140 140 #define _ICOM_THIS_From_IDataObject(class,name) class* this = (class*)name; 141 #define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((char*)name)-sizeof(void*)); 142 #define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)); 143 #define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)); 144 #define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((char*)name)-4*sizeof(void*)); 145 #define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)); 141 #define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((char*)name)-sizeof(void*)); 142 #define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)); 143 #define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)); 144 #define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((char*)name)-4*sizeof(void*)); 145 #define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)); 146 146 147 147 /* … … 171 171 REFIID riid, 172 172 void** ppvObject); 173 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 173 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 174 174 IUnknown* iface); 175 static ULONG WINAPI DataCache_NDIUnknown_Release( 175 static ULONG WINAPI DataCache_NDIUnknown_Release( 176 176 IUnknown* iface); 177 177 … … 184 184 REFIID riid, 185 185 void** ppvObject); 186 static ULONG WINAPI DataCache_IDataObject_AddRef( 186 static ULONG WINAPI DataCache_IDataObject_AddRef( 187 187 IDataObject* iface); 188 static ULONG WINAPI DataCache_IDataObject_Release( 188 static ULONG WINAPI DataCache_IDataObject_Release( 189 189 IDataObject* iface); 190 190 static HRESULT WINAPI DataCache_GetData( 191 191 IDataObject* iface, 192 LPFORMATETC pformatetcIn, 192 LPFORMATETC pformatetcIn, 193 193 STGMEDIUM* pmedium); 194 194 static HRESULT WINAPI DataCache_GetDataHere( 195 IDataObject* iface, 195 IDataObject* iface, 196 196 LPFORMATETC pformatetc, 197 197 STGMEDIUM* pmedium); … … 200 200 LPFORMATETC pformatetc); 201 201 static HRESULT WINAPI DataCache_GetCanonicalFormatEtc( 202 IDataObject* iface, 203 LPFORMATETC pformatectIn, 202 IDataObject* iface, 203 LPFORMATETC pformatectIn, 204 204 LPFORMATETC pformatetcOut); 205 205 static HRESULT WINAPI DataCache_IDataObject_SetData( 206 206 IDataObject* iface, 207 LPFORMATETC pformatetc, 208 STGMEDIUM* pmedium, 207 LPFORMATETC pformatetc, 208 STGMEDIUM* pmedium, 209 209 BOOL fRelease); 210 210 static HRESULT WINAPI DataCache_EnumFormatEtc( 211 IDataObject* iface, 211 IDataObject* iface, 212 212 DWORD dwDirection, 213 213 IEnumFORMATETC** ppenumFormatEtc); 214 214 static HRESULT WINAPI DataCache_DAdvise( 215 IDataObject* iface, 216 FORMATETC* pformatetc, 217 DWORD advf, 218 IAdviseSink* pAdvSink, 215 IDataObject* iface, 216 FORMATETC* pformatetc, 217 DWORD advf, 218 IAdviseSink* pAdvSink, 219 219 DWORD* pdwConnection); 220 220 static HRESULT WINAPI DataCache_DUnadvise( … … 233 233 REFIID riid, 234 234 void** ppvObject); 235 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 235 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 236 236 IPersistStorage* iface); 237 static ULONG WINAPI DataCache_IPersistStorage_Release( 237 static ULONG WINAPI DataCache_IPersistStorage_Release( 238 238 IPersistStorage* iface); 239 static HRESULT WINAPI DataCache_GetClassID( 239 static HRESULT WINAPI DataCache_GetClassID( 240 240 IPersistStorage* iface, 241 241 CLSID* pClassID); 242 static HRESULT WINAPI DataCache_IsDirty( 242 static HRESULT WINAPI DataCache_IsDirty( 243 243 IPersistStorage* iface); 244 static HRESULT WINAPI DataCache_InitNew( 245 IPersistStorage* iface, 246 IStorage* pStg); 247 static HRESULT WINAPI DataCache_Load( 244 static HRESULT WINAPI DataCache_InitNew( 248 245 IPersistStorage* iface, 249 246 IStorage* pStg); 250 static HRESULT WINAPI DataCache_ Save(247 static HRESULT WINAPI DataCache_Load( 251 248 IPersistStorage* iface, 252 IStorage* pStg, 249 IStorage* pStg); 250 static HRESULT WINAPI DataCache_Save( 251 IPersistStorage* iface, 252 IStorage* pStg, 253 253 BOOL fSameAsLoad); 254 static HRESULT WINAPI DataCache_SaveCompleted( 255 IPersistStorage* iface, 254 static HRESULT WINAPI DataCache_SaveCompleted( 255 IPersistStorage* iface, 256 256 IStorage* pStgNew); 257 257 static HRESULT WINAPI DataCache_HandsOffStorage( … … 266 266 REFIID riid, 267 267 void** ppvObject); 268 static ULONG WINAPI DataCache_IViewObject2_AddRef( 268 static ULONG WINAPI DataCache_IViewObject2_AddRef( 269 269 IViewObject2* iface); 270 static ULONG WINAPI DataCache_IViewObject2_Release( 270 static ULONG WINAPI DataCache_IViewObject2_Release( 271 271 IViewObject2* iface); 272 272 static HRESULT WINAPI DataCache_Draw( … … 275 275 LONG lindex, 276 276 void* pvAspect, 277 DVTARGETDEVICE* ptd, 278 HDC hdcTargetDev, 277 DVTARGETDEVICE* ptd, 278 HDC hdcTargetDev, 279 279 HDC hdcDraw, 280 280 LPCRECTL lprcBounds, … … 283 283 DWORD dwContinue); 284 284 static HRESULT WINAPI DataCache_GetColorSet( 285 IViewObject2* iface, 286 DWORD dwDrawAspect, 287 LONG lindex, 288 void* pvAspect, 289 DVTARGETDEVICE* ptd, 290 HDC hicTargetDevice, 285 IViewObject2* iface, 286 DWORD dwDrawAspect, 287 LONG lindex, 288 void* pvAspect, 289 DVTARGETDEVICE* ptd, 290 HDC hicTargetDevice, 291 291 LOGPALETTE** ppColorSet); 292 292 static HRESULT WINAPI DataCache_Freeze( … … 294 294 DWORD dwDrawAspect, 295 295 LONG lindex, 296 void* pvAspect, 296 void* pvAspect, 297 297 DWORD* pdwFreeze); 298 298 static HRESULT WINAPI DataCache_Unfreeze( … … 301 301 static HRESULT WINAPI DataCache_SetAdvise( 302 302 IViewObject2* iface, 303 DWORD aspects, 304 DWORD advf, 303 DWORD aspects, 304 DWORD advf, 305 305 IAdviseSink* pAdvSink); 306 306 static HRESULT WINAPI DataCache_GetAdvise( 307 IViewObject2* iface, 308 DWORD* pAspects, 309 DWORD* pAdvf, 307 IViewObject2* iface, 308 DWORD* pAspects, 309 DWORD* pAdvf, 310 310 IAdviseSink** ppAdvSink); 311 311 static HRESULT WINAPI DataCache_GetExtent( 312 IViewObject2* iface, 313 DWORD dwDrawAspect, 314 LONG lindex, 315 DVTARGETDEVICE* ptd, 312 IViewObject2* iface, 313 DWORD dwDrawAspect, 314 LONG lindex, 315 DVTARGETDEVICE* ptd, 316 316 LPSIZEL lpsizel); 317 317 … … 324 324 REFIID riid, 325 325 void** ppvObject); 326 static ULONG WINAPI DataCache_IOleCache2_AddRef( 326 static ULONG WINAPI DataCache_IOleCache2_AddRef( 327 327 IOleCache2* iface); 328 static ULONG WINAPI DataCache_IOleCache2_Release( 328 static ULONG WINAPI DataCache_IOleCache2_Release( 329 329 IOleCache2* iface); 330 330 static HRESULT WINAPI DataCache_Cache( … … 349 349 static HRESULT WINAPI DataCache_UpdateCache( 350 350 IOleCache2* iface, 351 LPDATAOBJECT pDataObject, 351 LPDATAOBJECT pDataObject, 352 352 DWORD grfUpdf, 353 353 LPVOID pReserved); … … 364 364 REFIID riid, 365 365 void** ppvObject); 366 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 366 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 367 367 IOleCacheControl* iface); 368 static ULONG WINAPI DataCache_IOleCacheControl_Release( 368 static ULONG WINAPI DataCache_IOleCacheControl_Release( 369 369 IOleCacheControl* iface); 370 370 static HRESULT WINAPI DataCache_OnRun( … … 461 461 */ 462 462 HRESULT WINAPI CreateDataCache( 463 LPUNKNOWN pUnkOuter, 464 REFCLSID rclsid, 465 REFIID riid, 463 LPUNKNOWN pUnkOuter, 464 REFCLSID rclsid, 465 REFIID riid, 466 466 LPVOID* ppvObj) 467 467 { … … 485 485 * IUnknown pointer can be returned to the outside. 486 486 */ 487 if ( (pUnkOuter!=NULL) && 487 if ( (pUnkOuter!=NULL) && 488 488 (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) != 0) ) 489 489 return CLASS_E_NOAGGREGATION; … … 492 492 * Try to construct a new instance of the class. 493 493 */ 494 newCache = DataCache_Construct(rclsid, 494 newCache = DataCache_Construct(rclsid, 495 495 pUnkOuter); 496 496 … … 528 528 if (newObject==0) 529 529 return newObject; 530 530 531 531 /* 532 532 * Initialize the virtual function table. … … 538 538 newObject->lpvtbl5 = &DataCache_IOleCache2_VTable; 539 539 newObject->lpvtbl6 = &DataCache_IOleCacheControl_VTable; 540 541 /* 542 * Start with one reference count. The caller of this function 540 541 /* 542 * Start with one reference count. The caller of this function 543 543 * must release the interface pointer when it is done. 544 544 */ … … 547 547 /* 548 548 * Initialize the outer unknown 549 * We don't keep a reference on the outer unknown since, the way 549 * We don't keep a reference on the outer unknown since, the way 550 550 * aggregation works, our lifetime is at least as large as it's 551 551 * lifetime. … … 593 593 * DataCache_ReadPresentationData 594 594 * 595 * This method will read information for the requested presentation 595 * This method will read information for the requested presentation 596 596 * into the given structure. 597 597 * … … 796 796 * DataCache_ReadPresentationData 797 797 * 798 * This method will read information for the requested presentation 798 * This method will read information for the requested presentation 799 799 * into the given structure. 800 800 * … … 822 822 */ 823 823 hres = DataCache_OpenPresStream( 824 this, 824 this, 825 825 drawAspect, 826 826 &presStream); … … 853 853 * Allocate a buffer for the metafile bits. 854 854 */ 855 metafileBits = HeapAlloc(GetProcessHeap(), 856 0, 855 metafileBits = HeapAlloc(GetProcessHeap(), 856 0, 857 857 streamInfo.cbSize.s.LowPart); 858 858 … … 911 911 if ( (this==0) || (ppvObject==0) ) 912 912 return E_INVALIDARG; 913 913 914 914 /* 915 915 * Initialize the return parameter. … … 920 920 * Compare the riid with the interface IDs implemented by this object. 921 921 */ 922 if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 922 if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 923 923 { 924 924 *ppvObject = iface; 925 925 } 926 else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 926 else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 927 927 { 928 928 *ppvObject = (IDataObject*)&(this->lpvtbl1); … … 943 943 *ppvObject = (IOleCache2*)&(this->lpvtbl5); 944 944 } 945 else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) 945 else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) 946 946 { 947 947 *ppvObject = (IOleCacheControl*)&(this->lpvtbl6); … … 956 956 return E_NOINTERFACE; 957 957 } 958 958 959 959 /* 960 960 * Query Interface always increases the reference count by one when it is 961 * successful. 961 * successful. 962 962 */ 963 963 IUnknown_AddRef((IUnknown*)*ppvObject); 964 964 965 return S_OK; ;965 return S_OK; 966 966 } 967 967 … … 974 974 * to the outer unknown. 975 975 */ 976 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 976 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 977 977 IUnknown* iface) 978 978 { … … 992 992 * to the outer unknown. 993 993 */ 994 static ULONG WINAPI DataCache_NDIUnknown_Release( 994 static ULONG WINAPI DataCache_NDIUnknown_Release( 995 995 IUnknown* iface) 996 996 { … … 1011 1011 return 0; 1012 1012 } 1013 1013 1014 1014 return this->ref; 1015 1015 } … … 1032 1032 _ICOM_THIS_From_IDataObject(DataCache, iface); 1033 1033 1034 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1034 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1035 1035 } 1036 1036 … … 1040 1040 * See Windows documentation for more details on IUnknown methods. 1041 1041 */ 1042 static ULONG WINAPI DataCache_IDataObject_AddRef( 1042 static ULONG WINAPI DataCache_IDataObject_AddRef( 1043 1043 IDataObject* iface) 1044 1044 { 1045 1045 _ICOM_THIS_From_IDataObject(DataCache, iface); 1046 1046 1047 return IUnknown_AddRef(this->outerUnknown); 1047 return IUnknown_AddRef(this->outerUnknown); 1048 1048 } 1049 1049 … … 1053 1053 * See Windows documentation for more details on IUnknown methods. 1054 1054 */ 1055 static ULONG WINAPI DataCache_IDataObject_Release( 1055 static ULONG WINAPI DataCache_IDataObject_Release( 1056 1056 IDataObject* iface) 1057 1057 { 1058 1058 _ICOM_THIS_From_IDataObject(DataCache, iface); 1059 1059 1060 return IUnknown_Release(this->outerUnknown); 1060 return IUnknown_Release(this->outerUnknown); 1061 1061 } 1062 1062 … … 1070 1070 static HRESULT WINAPI DataCache_GetData( 1071 1071 IDataObject* iface, 1072 LPFORMATETC pformatetcIn, 1072 LPFORMATETC pformatetcIn, 1073 1073 STGMEDIUM* pmedium) 1074 1074 { … … 1168 1168 1169 1169 static HRESULT WINAPI DataCache_GetDataHere( 1170 IDataObject* iface, 1170 IDataObject* iface, 1171 1171 LPFORMATETC pformatetc, 1172 1172 STGMEDIUM* pmedium) … … 1192 1192 */ 1193 1193 static HRESULT WINAPI DataCache_GetCanonicalFormatEtc( 1194 IDataObject* iface, 1195 LPFORMATETC pformatectIn, 1194 IDataObject* iface, 1195 LPFORMATETC pformatectIn, 1196 1196 LPFORMATETC pformatetcOut) 1197 1197 { … … 1209 1209 static HRESULT WINAPI DataCache_IDataObject_SetData( 1210 1210 IDataObject* iface, 1211 LPFORMATETC pformatetc, 1212 STGMEDIUM* pmedium, 1211 LPFORMATETC pformatetc, 1212 STGMEDIUM* pmedium, 1213 1213 BOOL fRelease) 1214 1214 { … … 1227 1227 IOleCache2_Release(oleCache); 1228 1228 1229 return hres; ;1229 return hres; 1230 1230 } 1231 1231 … … 1238 1238 */ 1239 1239 static HRESULT WINAPI DataCache_EnumFormatEtc( 1240 IDataObject* iface, 1240 IDataObject* iface, 1241 1241 DWORD dwDirection, 1242 1242 IEnumFORMATETC** ppenumFormatEtc) … … 1254 1254 */ 1255 1255 static HRESULT WINAPI DataCache_DAdvise( 1256 IDataObject* iface, 1257 FORMATETC* pformatetc, 1258 DWORD advf, 1259 IAdviseSink* pAdvSink, 1256 IDataObject* iface, 1257 FORMATETC* pformatetc, 1258 DWORD advf, 1259 IAdviseSink* pAdvSink, 1260 1260 DWORD* pdwConnection) 1261 1261 { … … 1311 1311 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1312 1312 1313 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1313 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1314 1314 } 1315 1315 … … 1319 1319 * See Windows documentation for more details on IUnknown methods. 1320 1320 */ 1321 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 1321 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 1322 1322 IPersistStorage* iface) 1323 1323 { 1324 1324 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1325 1325 1326 return IUnknown_AddRef(this->outerUnknown); 1326 return IUnknown_AddRef(this->outerUnknown); 1327 1327 } 1328 1328 … … 1332 1332 * See Windows documentation for more details on IUnknown methods. 1333 1333 */ 1334 static ULONG WINAPI DataCache_IPersistStorage_Release( 1334 static ULONG WINAPI DataCache_IPersistStorage_Release( 1335 1335 IPersistStorage* iface) 1336 1336 { 1337 1337 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1338 1338 1339 return IUnknown_Release(this->outerUnknown); 1339 return IUnknown_Release(this->outerUnknown); 1340 1340 } 1341 1341 … … 1347 1347 * See Windows documentation for more details on IPersistStorage methods. 1348 1348 */ 1349 static HRESULT WINAPI DataCache_GetClassID( 1349 static HRESULT WINAPI DataCache_GetClassID( 1350 1350 IPersistStorage* iface, 1351 1351 CLSID* pClassID) … … 1358 1358 * DataCache_IsDirty (IPersistStorage) 1359 1359 * 1360 * Until we actully connect to a running object and retrieve new 1360 * Until we actully connect to a running object and retrieve new 1361 1361 * information to it, we never get dirty. 1362 1362 * 1363 1363 * See Windows documentation for more details on IPersistStorage methods. 1364 1364 */ 1365 static HRESULT WINAPI DataCache_IsDirty( 1365 static HRESULT WINAPI DataCache_IsDirty( 1366 1366 IPersistStorage* iface) 1367 1367 { … … 1379 1379 * See Windows documentation for more details on IPersistStorage methods. 1380 1380 */ 1381 static HRESULT WINAPI DataCache_InitNew( 1382 IPersistStorage* iface, 1383 IStorage* pStg) 1384 { 1385 TRACE("(%p, %p)\n", iface, pStg); 1386 1387 return DataCache_Load(iface, pStg); 1388 } 1389 1390 /************************************************************************ 1391 * DataCache_Load (IPersistStorage) 1392 * 1393 * The data cache implementation of IPersistStorage_Load doesn't 1394 * actually load anything. Instead, it holds on to the storage pointer 1395 * and it will load the presentation information when the 1396 * IDataObject_GetData or IViewObject2_Draw methods are called. 1397 * 1398 * See Windows documentation for more details on IPersistStorage methods. 1399 */ 1400 static HRESULT WINAPI DataCache_Load( 1381 static HRESULT WINAPI DataCache_InitNew( 1401 1382 IPersistStorage* iface, 1402 1383 IStorage* pStg) 1403 1384 { 1385 TRACE("(%p, %p)\n", iface, pStg); 1386 1387 return DataCache_Load(iface, pStg); 1388 } 1389 1390 /************************************************************************ 1391 * DataCache_Load (IPersistStorage) 1392 * 1393 * The data cache implementation of IPersistStorage_Load doesn't 1394 * actually load anything. Instead, it holds on to the storage pointer 1395 * and it will load the presentation information when the 1396 * IDataObject_GetData or IViewObject2_Draw methods are called. 1397 * 1398 * See Windows documentation for more details on IPersistStorage methods. 1399 */ 1400 static HRESULT WINAPI DataCache_Load( 1401 IPersistStorage* iface, 1402 IStorage* pStg) 1403 { 1404 1404 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1405 1405 … … 1423 1423 * DataCache_Save (IPersistStorage) 1424 1424 * 1425 * Until we actully connect to a running object and retrieve new 1425 * Until we actully connect to a running object and retrieve new 1426 1426 * information to it, we never have to save anything. However, it is 1427 1427 * our responsability to copy the information when saving to a new … … 1430 1430 * See Windows documentation for more details on IPersistStorage methods. 1431 1431 */ 1432 static HRESULT WINAPI DataCache_Save( 1432 static HRESULT WINAPI DataCache_Save( 1433 1433 IPersistStorage* iface, 1434 IStorage* pStg, 1434 IStorage* pStg, 1435 1435 BOOL fSameAsLoad) 1436 1436 { … … 1439 1439 TRACE("(%p, %p, %d)\n", iface, pStg, fSameAsLoad); 1440 1440 1441 if ( (!fSameAsLoad) && 1441 if ( (!fSameAsLoad) && 1442 1442 (this->presentationStorage!=NULL) ) 1443 1443 { … … 1460 1460 * See Windows documentation for more details on IPersistStorage methods. 1461 1461 */ 1462 static HRESULT WINAPI DataCache_SaveCompleted( 1463 IPersistStorage* iface, 1462 static HRESULT WINAPI DataCache_SaveCompleted( 1463 IPersistStorage* iface, 1464 1464 IStorage* pStgNew) 1465 1465 { … … 1525 1525 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1526 1526 1527 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1527 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1528 1528 } 1529 1529 … … 1533 1533 * See Windows documentation for more details on IUnknown methods. 1534 1534 */ 1535 static ULONG WINAPI DataCache_IViewObject2_AddRef( 1535 static ULONG WINAPI DataCache_IViewObject2_AddRef( 1536 1536 IViewObject2* iface) 1537 1537 { 1538 1538 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1539 1539 1540 return IUnknown_AddRef(this->outerUnknown); 1540 return IUnknown_AddRef(this->outerUnknown); 1541 1541 } 1542 1542 … … 1546 1546 * See Windows documentation for more details on IUnknown methods. 1547 1547 */ 1548 static ULONG WINAPI DataCache_IViewObject2_Release( 1548 static ULONG WINAPI DataCache_IViewObject2_Release( 1549 1549 IViewObject2* iface) 1550 1550 { 1551 1551 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1552 1552 1553 return IUnknown_Release(this->outerUnknown); 1553 return IUnknown_Release(this->outerUnknown); 1554 1554 } 1555 1555 … … 1567 1567 LONG lindex, 1568 1568 void* pvAspect, 1569 DVTARGETDEVICE* ptd, 1570 HDC hdcTargetDev, 1569 DVTARGETDEVICE* ptd, 1570 HDC hdcTargetDev, 1571 1571 HDC hdcDraw, 1572 1572 LPCRECTL lprcBounds, … … 1586 1586 lindex, 1587 1587 pvAspect, 1588 hdcTargetDev, 1588 hdcTargetDev, 1589 1589 hdcDraw, 1590 1590 lprcBounds, … … 1637 1637 &oldWindowExt); 1638 1638 1639 SetViewportExtEx(hdcDraw, 1639 SetViewportExtEx(hdcDraw, 1640 1640 lprcBounds->right - lprcBounds->left, 1641 1641 lprcBounds->bottom - lprcBounds->top, … … 1654 1654 NULL); 1655 1655 1656 SetViewportExtEx(hdcDraw, 1656 SetViewportExtEx(hdcDraw, 1657 1657 oldViewportExt.cx, 1658 1658 oldViewportExt.cy, … … 1673 1673 1674 1674 static HRESULT WINAPI DataCache_GetColorSet( 1675 IViewObject2* iface, 1676 DWORD dwDrawAspect, 1677 LONG lindex, 1678 void* pvAspect, 1679 DVTARGETDEVICE* ptd, 1680 HDC hicTargetDevice, 1675 IViewObject2* iface, 1676 DWORD dwDrawAspect, 1677 LONG lindex, 1678 void* pvAspect, 1679 DVTARGETDEVICE* ptd, 1680 HDC hicTargetDevice, 1681 1681 LOGPALETTE** ppColorSet) 1682 1682 { … … 1689 1689 DWORD dwDrawAspect, 1690 1690 LONG lindex, 1691 void* pvAspect, 1691 void* pvAspect, 1692 1692 DWORD* pdwFreeze) 1693 1693 { … … 1714 1714 static HRESULT WINAPI DataCache_SetAdvise( 1715 1715 IViewObject2* iface, 1716 DWORD aspects, 1717 DWORD advf, 1716 DWORD aspects, 1717 DWORD advf, 1718 1718 IAdviseSink* pAdvSink) 1719 1719 { … … 1729 1729 IAdviseSink_Release(this->sinkInterface); 1730 1730 this->sinkInterface = NULL; 1731 this->sinkAspects = 0; 1731 this->sinkAspects = 0; 1732 1732 this->sinkAdviseFlag = 0; 1733 1733 } … … 1739 1739 { 1740 1740 this->sinkInterface = pAdvSink; 1741 this->sinkAspects = aspects; 1742 this->sinkAdviseFlag = advf; 1741 this->sinkAspects = aspects; 1742 this->sinkAdviseFlag = advf; 1743 1743 1744 1744 IAdviseSink_AddRef(this->sinkInterface); … … 1762 1762 * DataCache_GetAdvise (IViewObject2) 1763 1763 * 1764 * This method queries the current state of the advise sink 1764 * This method queries the current state of the advise sink 1765 1765 * installed on the data cache. 1766 1766 * … … 1768 1768 */ 1769 1769 static HRESULT WINAPI DataCache_GetAdvise( 1770 IViewObject2* iface, 1771 DWORD* pAspects, 1772 DWORD* pAdvf, 1770 IViewObject2* iface, 1771 DWORD* pAspects, 1772 DWORD* pAdvf, 1773 1773 IAdviseSink** ppAdvSink) 1774 1774 { … … 1788 1788 if (ppAdvSink!=NULL) 1789 1789 { 1790 IAdviseSink_QueryInterface(this->sinkInterface, 1791 &IID_IAdviseSink, 1790 IAdviseSink_QueryInterface(this->sinkInterface, 1791 &IID_IAdviseSink, 1792 1792 (void**)ppAdvSink); 1793 1793 } … … 1804 1804 */ 1805 1805 static HRESULT WINAPI DataCache_GetExtent( 1806 IViewObject2* iface, 1807 DWORD dwDrawAspect, 1808 LONG lindex, 1809 DVTARGETDEVICE* ptd, 1806 IViewObject2* iface, 1807 DWORD dwDrawAspect, 1808 LONG lindex, 1809 DVTARGETDEVICE* ptd, 1810 1810 LPSIZEL lpsizel) 1811 1811 { … … 1815 1815 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1816 1816 1817 TRACE("(%p, %lx, %ld, %p, %p)\n", 1817 TRACE("(%p, %lx, %ld, %p, %p)\n", 1818 1818 iface, dwDrawAspect, lindex, ptd, lpsizel); 1819 1819 … … 1842 1842 if (ptd!=NULL) 1843 1843 FIXME("Unimplemented ptd = %p\n", ptd); 1844 1845 /* 1846 * Get the presentation information from the 1844 1845 /* 1846 * Get the presentation information from the 1847 1847 * cache. 1848 1848 */ … … 1884 1884 _ICOM_THIS_From_IOleCache2(DataCache, iface); 1885 1885 1886 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1886 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1887 1887 } 1888 1888 … … 1892 1892 * See Windows documentation for more details on IUnknown methods. 1893 1893 */ 1894 static ULONG WINAPI DataCache_IOleCache2_AddRef( 1894 static ULONG WINAPI DataCache_IOleCache2_AddRef( 1895 1895 IOleCache2* iface) 1896 1896 { 1897 1897 _ICOM_THIS_From_IOleCache2(DataCache, iface); 1898 1898 1899 return IUnknown_AddRef(this->outerUnknown); 1899 return IUnknown_AddRef(this->outerUnknown); 1900 1900 } 1901 1901 … … 1905 1905 * See Windows documentation for more details on IUnknown methods. 1906 1906 */ 1907 static ULONG WINAPI DataCache_IOleCache2_Release( 1907 static ULONG WINAPI DataCache_IOleCache2_Release( 1908 1908 IOleCache2* iface) 1909 1909 { 1910 1910 _ICOM_THIS_From_IOleCache2(DataCache, iface); 1911 1911 1912 return IUnknown_Release(this->outerUnknown); 1912 return IUnknown_Release(this->outerUnknown); 1913 1913 } 1914 1914 … … 1959 1959 static HRESULT WINAPI DataCache_UpdateCache( 1960 1960 IOleCache2* iface, 1961 LPDATAOBJECT pDataObject, 1961 LPDATAOBJECT pDataObject, 1962 1962 DWORD grfUpdf, 1963 1963 LPVOID pReserved) … … 1993 1993 _ICOM_THIS_From_IOleCacheControl(DataCache, iface); 1994 1994 1995 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1995 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1996 1996 } 1997 1997 … … 2001 2001 * See Windows documentation for more details on IUnknown methods. 2002 2002 */ 2003 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 2003 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 2004 2004 IOleCacheControl* iface) 2005 2005 { 2006 2006 _ICOM_THIS_From_IOleCacheControl(DataCache, iface); 2007 2007 2008 return IUnknown_AddRef(this->outerUnknown); 2008 return IUnknown_AddRef(this->outerUnknown); 2009 2009 } 2010 2010 … … 2014 2014 * See Windows documentation for more details on IUnknown methods. 2015 2015 */ 2016 static ULONG WINAPI DataCache_IOleCacheControl_Release( 2016 static ULONG WINAPI DataCache_IOleCacheControl_Release( 2017 2017 IOleCacheControl* iface) 2018 2018 { 2019 2019 _ICOM_THIS_From_IOleCacheControl(DataCache, iface); 2020 2020 2021 return IUnknown_Release(this->outerUnknown); 2021 return IUnknown_Release(this->outerUnknown); 2022 2022 } 2023 2023
Note:
See TracChangeset
for help on using the changeset viewer.