Changeset 6711 for trunk/src/ole32/datacache.c
- Timestamp:
- Sep 15, 2001, 11:32:00 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/datacache.c
r6648 r6711 1 /* $Id: datacache.c,v 1.2 2001-09-05 13:17:08 bird Exp $ */2 1 /* 3 * 2 * OLE 2 Data cache 4 3 * 5 4 * Copyright 1999 Francis Beaudet … … 18 17 * - This implementation of the datacache will let your application 19 18 * load documents that have embedded OLE objects in them and it will 20 * also retrieve the metafile representation of those objects. 19 * also retrieve the metafile representation of those objects. 21 20 * - This implementation of the datacache will also allow your 22 21 * application to save new documents with OLE objects in them. 23 * - The main thing that it doesn't do is allow you to activate 22 * - The main thing that it doesn't do is allow you to activate 24 23 * or modify the OLE objects in any way. 25 24 * - I haven't found any good documentation on the real usage of … … 28 27 * "\002OlePresXXX". It appears to just be a counter. 29 28 * - Also, I don't know the real content of the presentation stream 30 * header. I was able to figure-out where the extent of the object 29 * header. I was able to figure-out where the extent of the object 31 30 * was stored and the aspect, but that's about it. 32 31 */ … … 61 60 typedef struct PresentationDataHeader 62 61 { 63 DWORD unknown1; 64 DWORD unknown2; 65 DWORD unknown3; 62 DWORD unknown1; /* -1 */ 63 DWORD unknown2; /* 3, possibly CF_METAFILEPICT */ 64 DWORD unknown3; /* 4, possibly TYMED_ISTREAM */ 66 65 DVASPECT dvAspect; 67 DWORD unknown5; 66 DWORD unknown5; /* -1 */ 68 67 69 68 DWORD unknown6; 70 DWORD unknown7; 69 DWORD unknown7; /* 0 */ 71 70 DWORD dwObjectExtentX; 72 71 DWORD dwObjectExtentY; … … 82 81 * List all interface VTables here 83 82 */ 84 ICOM_VTABLE(IDataObject)* lpvtbl1; 83 ICOM_VTABLE(IDataObject)* lpvtbl1; 85 84 ICOM_VTABLE(IUnknown)* lpvtbl2; 86 85 ICOM_VTABLE(IPersistStorage)* lpvtbl3; 87 ICOM_VTABLE(IViewObject2)* lpvtbl4; 86 ICOM_VTABLE(IViewObject2)* lpvtbl4; 88 87 ICOM_VTABLE(IOleCache2)* lpvtbl5; 89 88 ICOM_VTABLE(IOleCacheControl)* lpvtbl6; … … 120 119 121 120 /* 122 * Here, I define utility macros to help with the casting of the 121 * Here, I define utility macros to help with the casting of the 123 122 * "this" parameter. 124 123 * There is a version to accomodate all of the VTables implemented … … 126 125 */ 127 126 #define _ICOM_THIS_From_IDataObject(class,name) class* this = (class*)name; 128 #define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((char*)name)-sizeof(void*)); 129 #define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)); 130 #define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)); 131 #define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((char*)name)-4*sizeof(void*)); 132 #define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)); 127 #define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((char*)name)-sizeof(void*)); 128 #define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*)); 129 #define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*)); 130 #define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((char*)name)-4*sizeof(void*)); 131 #define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*)); 133 132 134 133 /* … … 136 135 */ 137 136 static DataCache* DataCache_Construct(REFCLSID clsid, 138 137 LPUNKNOWN pUnkOuter); 139 138 static void DataCache_Destroy(DataCache* ptrToDestroy); 140 139 static HRESULT DataCache_ReadPresentationData(DataCache* this, 141 142 140 DWORD drawAspect, 141 PresentationDataHeader* header); 143 142 static HRESULT DataCache_OpenPresStream(DataCache *this, 144 145 143 DWORD drawAspect, 144 IStream **pStm); 146 145 static HMETAFILE DataCache_ReadPresMetafile(DataCache* this, 147 146 DWORD drawAspect); 148 147 static void DataCache_FireOnViewChange(DataCache* this, 149 150 148 DWORD aspect, 149 LONG lindex); 151 150 152 151 /* … … 158 157 REFIID riid, 159 158 void** ppvObject); 160 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 159 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 161 160 IUnknown* iface); 162 static ULONG WINAPI DataCache_NDIUnknown_Release( 161 static ULONG WINAPI DataCache_NDIUnknown_Release( 163 162 IUnknown* iface); 164 163 … … 171 170 REFIID riid, 172 171 void** ppvObject); 173 static ULONG WINAPI DataCache_IDataObject_AddRef( 172 static ULONG WINAPI DataCache_IDataObject_AddRef( 174 173 IDataObject* iface); 175 static ULONG WINAPI DataCache_IDataObject_Release( 174 static ULONG WINAPI DataCache_IDataObject_Release( 176 175 IDataObject* iface); 177 176 static HRESULT WINAPI DataCache_GetData( 178 179 LPFORMATETC pformatetcIn, 180 177 IDataObject* iface, 178 LPFORMATETC pformatetcIn, 179 STGMEDIUM* pmedium); 181 180 static HRESULT WINAPI DataCache_GetDataHere( 182 IDataObject* iface, 183 184 181 IDataObject* iface, 182 LPFORMATETC pformatetc, 183 STGMEDIUM* pmedium); 185 184 static HRESULT WINAPI DataCache_QueryGetData( 186 187 185 IDataObject* iface, 186 LPFORMATETC pformatetc); 188 187 static HRESULT WINAPI DataCache_GetCanonicalFormatEtc( 189 IDataObject* iface, 190 LPFORMATETC pformatectIn, 191 188 IDataObject* iface, 189 LPFORMATETC pformatectIn, 190 LPFORMATETC pformatetcOut); 192 191 static HRESULT WINAPI DataCache_IDataObject_SetData( 193 194 LPFORMATETC pformatetc, 195 STGMEDIUM* pmedium, 196 192 IDataObject* iface, 193 LPFORMATETC pformatetc, 194 STGMEDIUM* pmedium, 195 BOOL fRelease); 197 196 static HRESULT WINAPI DataCache_EnumFormatEtc( 198 IDataObject* iface, 199 200 197 IDataObject* iface, 198 DWORD dwDirection, 199 IEnumFORMATETC** ppenumFormatEtc); 201 200 static HRESULT WINAPI DataCache_DAdvise( 202 IDataObject* iface, 203 FORMATETC* pformatetc, 204 DWORD advf, 205 IAdviseSink* pAdvSink, 206 201 IDataObject* iface, 202 FORMATETC* pformatetc, 203 DWORD advf, 204 IAdviseSink* pAdvSink, 205 DWORD* pdwConnection); 207 206 static HRESULT WINAPI DataCache_DUnadvise( 208 209 207 IDataObject* iface, 208 DWORD dwConnection); 210 209 static HRESULT WINAPI DataCache_EnumDAdvise( 211 212 210 IDataObject* iface, 211 IEnumSTATDATA** ppenumAdvise); 213 212 214 213 /* … … 220 219 REFIID riid, 221 220 void** ppvObject); 222 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 221 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 223 222 IPersistStorage* iface); 224 static ULONG WINAPI DataCache_IPersistStorage_Release( 223 static ULONG WINAPI DataCache_IPersistStorage_Release( 225 224 IPersistStorage* iface); 226 static HRESULT WINAPI DataCache_GetClassID( 225 static HRESULT WINAPI DataCache_GetClassID( 227 226 IPersistStorage* iface, 228 229 static HRESULT WINAPI DataCache_IsDirty( 227 CLSID* pClassID); 228 static HRESULT WINAPI DataCache_IsDirty( 230 229 IPersistStorage* iface); 231 static HRESULT WINAPI DataCache_InitNew( 230 static HRESULT WINAPI DataCache_InitNew( 231 IPersistStorage* iface, 232 IStorage* pStg); 233 static HRESULT WINAPI DataCache_Load( 232 234 IPersistStorage* iface, 233 234 static HRESULT WINAPI DataCache_ Load(235 IStorage* pStg); 236 static HRESULT WINAPI DataCache_Save( 235 237 IPersistStorage* iface, 236 IStorage* pStg); 237 static HRESULT WINAPI DataCache_Save( 238 IPersistStorage* iface, 239 IStorage* pStg, 240 BOOL fSameAsLoad); 241 static HRESULT WINAPI DataCache_SaveCompleted( 242 IPersistStorage* iface, 243 IStorage* pStgNew); 238 IStorage* pStg, 239 BOOL fSameAsLoad); 240 static HRESULT WINAPI DataCache_SaveCompleted( 241 IPersistStorage* iface, 242 IStorage* pStgNew); 244 243 static HRESULT WINAPI DataCache_HandsOffStorage( 245 244 IPersistStorage* iface); … … 253 252 REFIID riid, 254 253 void** ppvObject); 255 static ULONG WINAPI DataCache_IViewObject2_AddRef( 254 static ULONG WINAPI DataCache_IViewObject2_AddRef( 256 255 IViewObject2* iface); 257 static ULONG WINAPI DataCache_IViewObject2_Release( 256 static ULONG WINAPI DataCache_IViewObject2_Release( 258 257 IViewObject2* iface); 259 258 static HRESULT WINAPI DataCache_Draw( 260 259 IViewObject2* iface, 261 262 263 264 DVTARGETDEVICE* ptd, 265 HDC hdcTargetDev, 266 267 268 269 270 260 DWORD dwDrawAspect, 261 LONG lindex, 262 void* pvAspect, 263 DVTARGETDEVICE* ptd, 264 HDC hdcTargetDev, 265 HDC hdcDraw, 266 LPCRECTL lprcBounds, 267 LPCRECTL lprcWBounds, 268 IVO_ContCallback pfnContinue, 269 DWORD dwContinue); 271 270 static HRESULT WINAPI DataCache_GetColorSet( 272 IViewObject2* iface, 273 DWORD dwDrawAspect, 274 LONG lindex, 275 void* pvAspect, 276 DVTARGETDEVICE* ptd, 277 HDC hicTargetDevice, 278 271 IViewObject2* iface, 272 DWORD dwDrawAspect, 273 LONG lindex, 274 void* pvAspect, 275 DVTARGETDEVICE* ptd, 276 HDC hicTargetDevice, 277 LOGPALETTE** ppColorSet); 279 278 static HRESULT WINAPI DataCache_Freeze( 280 279 IViewObject2* iface, 281 282 283 void* pvAspect, 284 280 DWORD dwDrawAspect, 281 LONG lindex, 282 void* pvAspect, 283 DWORD* pdwFreeze); 285 284 static HRESULT WINAPI DataCache_Unfreeze( 286 285 IViewObject2* iface, 287 286 DWORD dwFreeze); 288 287 static HRESULT WINAPI DataCache_SetAdvise( 289 288 IViewObject2* iface, 290 DWORD aspects, 291 DWORD advf, 292 289 DWORD aspects, 290 DWORD advf, 291 IAdviseSink* pAdvSink); 293 292 static HRESULT WINAPI DataCache_GetAdvise( 294 IViewObject2* iface, 295 DWORD* pAspects, 296 DWORD* pAdvf, 297 293 IViewObject2* iface, 294 DWORD* pAspects, 295 DWORD* pAdvf, 296 IAdviseSink** ppAdvSink); 298 297 static HRESULT WINAPI DataCache_GetExtent( 299 IViewObject2* iface, 300 DWORD dwDrawAspect, 301 LONG lindex, 302 DVTARGETDEVICE* ptd, 303 298 IViewObject2* iface, 299 DWORD dwDrawAspect, 300 LONG lindex, 301 DVTARGETDEVICE* ptd, 302 LPSIZEL lpsizel); 304 303 305 304 /* … … 311 310 REFIID riid, 312 311 void** ppvObject); 313 static ULONG WINAPI DataCache_IOleCache2_AddRef( 312 static ULONG WINAPI DataCache_IOleCache2_AddRef( 314 313 IOleCache2* iface); 315 static ULONG WINAPI DataCache_IOleCache2_Release( 314 static ULONG WINAPI DataCache_IOleCache2_Release( 316 315 IOleCache2* iface); 317 316 static HRESULT WINAPI DataCache_Cache( 318 317 IOleCache2* iface, 319 320 321 318 FORMATETC* pformatetc, 319 DWORD advf, 320 DWORD* pdwConnection); 322 321 static HRESULT WINAPI DataCache_Uncache( 323 324 322 IOleCache2* iface, 323 DWORD dwConnection); 325 324 static HRESULT WINAPI DataCache_EnumCache( 326 325 IOleCache2* iface, 327 326 IEnumSTATDATA** ppenumSTATDATA); 328 327 static HRESULT WINAPI DataCache_InitCache( 329 330 328 IOleCache2* iface, 329 IDataObject* pDataObject); 331 330 static HRESULT WINAPI DataCache_IOleCache2_SetData( 332 331 IOleCache2* iface, 333 334 335 332 FORMATETC* pformatetc, 333 STGMEDIUM* pmedium, 334 BOOL fRelease); 336 335 static HRESULT WINAPI DataCache_UpdateCache( 337 336 IOleCache2* iface, 338 LPDATAOBJECT pDataObject, 339 340 337 LPDATAOBJECT pDataObject, 338 DWORD grfUpdf, 339 LPVOID pReserved); 341 340 static HRESULT WINAPI DataCache_DiscardCache( 342 341 IOleCache2* iface, 343 342 DWORD dwDiscardOptions); 344 343 345 344 /* … … 351 350 REFIID riid, 352 351 void** ppvObject); 353 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 352 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 354 353 IOleCacheControl* iface); 355 static ULONG WINAPI DataCache_IOleCacheControl_Release( 354 static ULONG WINAPI DataCache_IOleCacheControl_Release( 356 355 IOleCacheControl* iface); 357 356 static HRESULT WINAPI DataCache_OnRun( 358 359 357 IOleCacheControl* iface, 358 LPDATAOBJECT pDataObject); 360 359 static HRESULT WINAPI DataCache_OnStop( 361 360 IOleCacheControl* iface); 362 361 363 362 /* … … 448 447 */ 449 448 HRESULT WINAPI CreateDataCache( 450 LPUNKNOWN pUnkOuter, 451 REFCLSID rclsid, 452 REFIID riid, 449 LPUNKNOWN pUnkOuter, 450 REFCLSID rclsid, 451 REFIID riid, 453 452 LPVOID* ppvObj) 454 453 { … … 472 471 * IUnknown pointer can be returned to the outside. 473 472 */ 474 if ( (pUnkOuter!=NULL) && 473 if ( (pUnkOuter!=NULL) && 475 474 (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) != 0) ) 476 475 return CLASS_E_NOAGGREGATION; … … 479 478 * Try to construct a new instance of the class. 480 479 */ 481 newCache = DataCache_Construct(rclsid, 482 480 newCache = DataCache_Construct(rclsid, 481 pUnkOuter); 483 482 484 483 if (newCache == 0) … … 515 514 if (newObject==0) 516 515 return newObject; 517 516 518 517 /* 519 518 * Initialize the virtual function table. … … 525 524 newObject->lpvtbl5 = &DataCache_IOleCache2_VTable; 526 525 newObject->lpvtbl6 = &DataCache_IOleCacheControl_VTable; 527 528 /* 529 * Start with one reference count. The caller of this function 526 527 /* 528 * Start with one reference count. The caller of this function 530 529 * must release the interface pointer when it is done. 531 530 */ … … 534 533 /* 535 534 * Initialize the outer unknown 536 * We don't keep a reference on the outer unknown since, the way 535 * We don't keep a reference on the outer unknown since, the way 537 536 * aggregation works, our lifetime is at least as large as it's 538 537 * lifetime. … … 580 579 * DataCache_ReadPresentationData 581 580 * 582 * This method will read information for the requested presentation 581 * This method will read information for the requested presentation 583 582 * into the given structure. 584 583 * … … 602 601 hres = DataCache_OpenPresStream( 603 602 this, 604 605 603 drawAspect, 604 &presStream); 606 605 607 606 if (FAILED(hres)) … … 614 613 hres = IStream_Read( 615 614 presStream, 616 617 618 615 header, 616 sizeof(PresentationDataHeader), 617 NULL); 619 618 620 619 /* … … 658 657 { 659 658 IAdviseSink_OnViewChange(this->sinkInterface, 660 661 659 aspect, 660 lindex); 662 661 663 662 /* … … 667 666 if ( (this->sinkAdviseFlag & ADVF_ONLYONCE) != 0) 668 667 { 669 670 671 672 673 668 IAdviseSink_Release(this->sinkInterface); 669 670 this->sinkInterface = NULL; 671 this->sinkAspects = 0; 672 this->sinkAdviseFlag = 0; 674 673 } 675 674 } … … 687 686 688 687 return (elem->type == STGTY_STREAM) 689 690 691 692 693 694 688 && (elem->cbSize.s.LowPart >= sizeof(PresentationDataHeader)) 689 && (strlenW(name) == 11) 690 && (strncmpW(name, OlePres, 8) == 0) 691 && (name[8] >= '0') && (name[8] <= '9') 692 && (name[9] >= '0') && (name[9] <= '9') 693 && (name[10] >= '0') && (name[10] <= '9'); 695 694 } 696 695 … … 708 707 * 709 708 * Errors: 710 * S_OK 711 * OLE_E_BLANK 709 * S_OK The requested stream has been opened. 710 * OLE_E_BLANK The requested stream could not be found. 712 711 * Quite a few others I'm too lazy to map correctly. 713 712 * 714 713 * Notes: 715 * Algorithm: 716 * 717 * 714 * Algorithm: Scan the elements of the presentation storage, looking 715 * for presentation streams. For each presentation stream, 716 * load the header and check to see if the aspect maches. 718 717 * 719 718 * If a fallback is desired, just opening the first presentation stream … … 736 735 while ((hr = IEnumSTATSTG_Next(pEnum, 1, &elem, NULL)) == S_OK) 737 736 { 738 if (DataCache_IsPresentationStream(&elem)) 739 { 740 IStream *pStm; 741 742 hr = IStorage_OpenStream(this->presentationStorage, elem.pwcsName, 743 NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, 744 &pStm); 745 if (SUCCEEDED(hr)) 746 { 747 PresentationDataHeader header; 748 ULONG actual_read; 749 750 hr = IStream_Read(pStm, &header, sizeof(header), &actual_read); 751 752 /* can't use SUCCEEDED(hr): S_FALSE counts as an error */ 753 if (hr == S_OK && actual_read == sizeof(header) 754 && header.dvAspect == drawAspect) 755 { 756 /* Rewind the stream before returning it. */ 757 LARGE_INTEGER offset; 758 offset.s.LowPart = 0; 759 offset.s.HighPart = 0; 760 IStream_Seek(pStm, offset, STREAM_SEEK_SET, NULL); 761 762 *ppStm = pStm; 763 764 CoTaskMemFree(elem.pwcsName); 765 IEnumSTATSTG_Release(pEnum); 766 767 return S_OK; 768 } 769 770 IStream_Release(pStm); 771 } 737 if (DataCache_IsPresentationStream(&elem)) 738 { 739 IStream *pStm; 740 741 hr = IStorage_OpenStream(this->presentationStorage, elem.pwcsName, 742 NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, 743 &pStm); 744 if (SUCCEEDED(hr)) 745 { 746 PresentationDataHeader header; 747 ULONG actual_read; 748 749 hr = IStream_Read(pStm, &header, sizeof(header), &actual_read); 750 751 /* can't use SUCCEEDED(hr): S_FALSE counts as an error */ 752 if (hr == S_OK && actual_read == sizeof(header) 753 && header.dvAspect == drawAspect) 754 { 755 /* Rewind the stream before returning it. */ 756 LARGE_INTEGER offset; 757 offset.s.LowPart = 0; 758 offset.s.HighPart = 0; 759 IStream_Seek(pStm, offset, STREAM_SEEK_SET, NULL); 760 761 *ppStm = pStm; 762 763 CoTaskMemFree(elem.pwcsName); 764 IEnumSTATSTG_Release(pEnum); 765 766 return S_OK; 767 } 768 769 IStream_Release(pStm); 770 } 771 } 772 773 CoTaskMemFree(elem.pwcsName); 772 774 } 773 775 774 CoTaskMemFree(elem.pwcsName);775 }776 777 776 IEnumSTATSTG_Release(pEnum); 778 777 … … 783 782 * DataCache_ReadPresentationData 784 783 * 785 * This method will read information for the requested presentation 784 * This method will read information for the requested presentation 786 785 * into the given structure. 787 786 * … … 809 808 */ 810 809 hres = DataCache_OpenPresStream( 811 this, 812 813 810 this, 811 drawAspect, 812 &presStream); 814 813 815 814 if (FAILED(hres)) … … 820 819 */ 821 820 hres = IStream_Stat(presStream, 822 823 821 &streamInfo, 822 STATFLAG_NONAME); 824 823 825 824 /* … … 831 830 hres = IStream_Seek( 832 831 presStream, 833 834 835 832 offset, 833 STREAM_SEEK_SET, 834 NULL); 836 835 837 836 streamInfo.cbSize.s.LowPart -= offset.s.LowPart; … … 840 839 * Allocate a buffer for the metafile bits. 841 840 */ 842 metafileBits = HeapAlloc(GetProcessHeap(), 843 0, 844 841 metafileBits = HeapAlloc(GetProcessHeap(), 842 0, 843 streamInfo.cbSize.s.LowPart); 845 844 846 845 /* … … 848 847 */ 849 848 hres = IStream_Read( 850 851 852 853 849 presStream, 850 metafileBits, 851 streamInfo.cbSize.s.LowPart, 852 NULL); 854 853 855 854 /* … … 898 897 if ( (this==0) || (ppvObject==0) ) 899 898 return E_INVALIDARG; 900 899 901 900 /* 902 901 * Initialize the return parameter. … … 907 906 * Compare the riid with the interface IDs implemented by this object. 908 907 */ 909 if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 908 if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) 910 909 { 911 910 *ppvObject = iface; 912 911 } 913 else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 912 else if (memcmp(&IID_IDataObject, riid, sizeof(IID_IDataObject)) == 0) 914 913 { 915 914 *ppvObject = (IDataObject*)&(this->lpvtbl1); 916 915 } 917 916 else if ( (memcmp(&IID_IPersistStorage, riid, sizeof(IID_IPersistStorage)) == 0) || 918 917 (memcmp(&IID_IPersist, riid, sizeof(IID_IPersist)) == 0) ) 919 918 { 920 919 *ppvObject = (IPersistStorage*)&(this->lpvtbl3); 921 920 } 922 921 else if ( (memcmp(&IID_IViewObject, riid, sizeof(IID_IViewObject)) == 0) || 923 922 (memcmp(&IID_IViewObject2, riid, sizeof(IID_IViewObject2)) == 0) ) 924 923 { 925 924 *ppvObject = (IViewObject2*)&(this->lpvtbl4); 926 925 } 927 926 else if ( (memcmp(&IID_IOleCache, riid, sizeof(IID_IOleCache)) == 0) || 928 927 (memcmp(&IID_IOleCache2, riid, sizeof(IID_IOleCache2)) == 0) ) 929 928 { 930 929 *ppvObject = (IOleCache2*)&(this->lpvtbl5); 931 930 } 932 else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) 931 else if (memcmp(&IID_IOleCacheControl, riid, sizeof(IID_IOleCacheControl)) == 0) 933 932 { 934 933 *ppvObject = (IOleCacheControl*)&(this->lpvtbl6); … … 943 942 return E_NOINTERFACE; 944 943 } 945 944 946 945 /* 947 946 * Query Interface always increases the reference count by one when it is 948 * successful. 947 * successful. 949 948 */ 950 949 IUnknown_AddRef((IUnknown*)*ppvObject); 951 950 952 return S_OK;; 951 return S_OK;; 953 952 } 954 953 … … 961 960 * to the outer unknown. 962 961 */ 963 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 962 static ULONG WINAPI DataCache_NDIUnknown_AddRef( 964 963 IUnknown* iface) 965 964 { … … 979 978 * to the outer unknown. 980 979 */ 981 static ULONG WINAPI DataCache_NDIUnknown_Release( 980 static ULONG WINAPI DataCache_NDIUnknown_Release( 982 981 IUnknown* iface) 983 982 { … … 998 997 return 0; 999 998 } 1000 999 1001 1000 return this->ref; 1002 1001 } … … 1019 1018 _ICOM_THIS_From_IDataObject(DataCache, iface); 1020 1019 1021 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1020 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1022 1021 } 1023 1022 … … 1027 1026 * See Windows documentation for more details on IUnknown methods. 1028 1027 */ 1029 static ULONG WINAPI DataCache_IDataObject_AddRef( 1028 static ULONG WINAPI DataCache_IDataObject_AddRef( 1030 1029 IDataObject* iface) 1031 1030 { 1032 1031 _ICOM_THIS_From_IDataObject(DataCache, iface); 1033 1032 1034 return IUnknown_AddRef(this->outerUnknown); 1033 return IUnknown_AddRef(this->outerUnknown); 1035 1034 } 1036 1035 … … 1040 1039 * See Windows documentation for more details on IUnknown methods. 1041 1040 */ 1042 static ULONG WINAPI DataCache_IDataObject_Release( 1041 static ULONG WINAPI DataCache_IDataObject_Release( 1043 1042 IDataObject* iface) 1044 1043 { 1045 1044 _ICOM_THIS_From_IDataObject(DataCache, iface); 1046 1045 1047 return IUnknown_Release(this->outerUnknown); 1046 return IUnknown_Release(this->outerUnknown); 1048 1047 } 1049 1048 … … 1056 1055 */ 1057 1056 static HRESULT WINAPI DataCache_GetData( 1058 1059 LPFORMATETC pformatetcIn, 1060 1057 IDataObject* iface, 1058 LPFORMATETC pformatetcIn, 1059 STGMEDIUM* pmedium) 1061 1060 { 1062 1061 HRESULT hr = 0; … … 1155 1154 1156 1155 static HRESULT WINAPI DataCache_GetDataHere( 1157 IDataObject* iface, 1158 1159 1156 IDataObject* iface, 1157 LPFORMATETC pformatetc, 1158 STGMEDIUM* pmedium) 1160 1159 { 1161 1160 FIXME("stub\n"); … … 1164 1163 1165 1164 static HRESULT WINAPI DataCache_QueryGetData( 1166 1167 1165 IDataObject* iface, 1166 LPFORMATETC pformatetc) 1168 1167 { 1169 1168 FIXME("stub\n"); … … 1179 1178 */ 1180 1179 static HRESULT WINAPI DataCache_GetCanonicalFormatEtc( 1181 IDataObject* iface, 1182 LPFORMATETC pformatectIn, 1183 1180 IDataObject* iface, 1181 LPFORMATETC pformatectIn, 1182 LPFORMATETC pformatetcOut) 1184 1183 { 1185 1184 TRACE("()\n"); … … 1195 1194 */ 1196 1195 static HRESULT WINAPI DataCache_IDataObject_SetData( 1197 1198 LPFORMATETC pformatetc, 1199 STGMEDIUM* pmedium, 1200 1196 IDataObject* iface, 1197 LPFORMATETC pformatetc, 1198 STGMEDIUM* pmedium, 1199 BOOL fRelease) 1201 1200 { 1202 1201 IOleCache2* oleCache = NULL; … … 1225 1224 */ 1226 1225 static HRESULT WINAPI DataCache_EnumFormatEtc( 1227 IDataObject* iface, 1228 1229 1226 IDataObject* iface, 1227 DWORD dwDirection, 1228 IEnumFORMATETC** ppenumFormatEtc) 1230 1229 { 1231 1230 TRACE("()\n"); … … 1241 1240 */ 1242 1241 static HRESULT WINAPI DataCache_DAdvise( 1243 IDataObject* iface, 1244 FORMATETC* pformatetc, 1245 DWORD advf, 1246 IAdviseSink* pAdvSink, 1247 1242 IDataObject* iface, 1243 FORMATETC* pformatetc, 1244 DWORD advf, 1245 IAdviseSink* pAdvSink, 1246 DWORD* pdwConnection) 1248 1247 { 1249 1248 TRACE("()\n"); … … 1259 1258 */ 1260 1259 static HRESULT WINAPI DataCache_DUnadvise( 1261 1262 1260 IDataObject* iface, 1261 DWORD dwConnection) 1263 1262 { 1264 1263 TRACE("()\n"); … … 1274 1273 */ 1275 1274 static HRESULT WINAPI DataCache_EnumDAdvise( 1276 1277 1275 IDataObject* iface, 1276 IEnumSTATDATA** ppenumAdvise) 1278 1277 { 1279 1278 TRACE("()\n"); … … 1298 1297 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1299 1298 1300 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1299 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1301 1300 } 1302 1301 … … 1306 1305 * See Windows documentation for more details on IUnknown methods. 1307 1306 */ 1308 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 1307 static ULONG WINAPI DataCache_IPersistStorage_AddRef( 1309 1308 IPersistStorage* iface) 1310 1309 { 1311 1310 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1312 1311 1313 return IUnknown_AddRef(this->outerUnknown); 1312 return IUnknown_AddRef(this->outerUnknown); 1314 1313 } 1315 1314 … … 1319 1318 * See Windows documentation for more details on IUnknown methods. 1320 1319 */ 1321 static ULONG WINAPI DataCache_IPersistStorage_Release( 1320 static ULONG WINAPI DataCache_IPersistStorage_Release( 1322 1321 IPersistStorage* iface) 1323 1322 { 1324 1323 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1325 1324 1326 return IUnknown_Release(this->outerUnknown); 1325 return IUnknown_Release(this->outerUnknown); 1327 1326 } 1328 1327 … … 1334 1333 * See Windows documentation for more details on IPersistStorage methods. 1335 1334 */ 1336 static HRESULT WINAPI DataCache_GetClassID( 1335 static HRESULT WINAPI DataCache_GetClassID( 1337 1336 IPersistStorage* iface, 1338 1337 CLSID* pClassID) 1339 1338 { 1340 1339 TRACE("(%p, %p)\n", iface, pClassID); … … 1345 1344 * DataCache_IsDirty (IPersistStorage) 1346 1345 * 1347 * Until we actully connect to a running object and retrieve new 1346 * Until we actully connect to a running object and retrieve new 1348 1347 * information to it, we never get dirty. 1349 1348 * 1350 1349 * See Windows documentation for more details on IPersistStorage methods. 1351 1350 */ 1352 static HRESULT WINAPI DataCache_IsDirty( 1351 static HRESULT WINAPI DataCache_IsDirty( 1353 1352 IPersistStorage* iface) 1354 1353 { … … 1366 1365 * See Windows documentation for more details on IPersistStorage methods. 1367 1366 */ 1368 static HRESULT WINAPI DataCache_InitNew( 1367 static HRESULT WINAPI DataCache_InitNew( 1368 IPersistStorage* iface, 1369 IStorage* pStg) 1370 { 1371 TRACE("(%p, %p)\n", iface, pStg); 1372 1373 return DataCache_Load(iface, pStg); 1374 } 1375 1376 /************************************************************************ 1377 * DataCache_Load (IPersistStorage) 1378 * 1379 * The data cache implementation of IPersistStorage_Load doesn't 1380 * actually load anything. Instead, it holds on to the storage pointer 1381 * and it will load the presentation information when the 1382 * IDataObject_GetData or IViewObject2_Draw methods are called. 1383 * 1384 * See Windows documentation for more details on IPersistStorage methods. 1385 */ 1386 static HRESULT WINAPI DataCache_Load( 1369 1387 IPersistStorage* iface, 1370 IStorage* pStg) 1371 { 1388 IStorage* pStg) 1389 { 1390 _ICOM_THIS_From_IPersistStorage(DataCache, iface); 1391 1372 1392 TRACE("(%p, %p)\n", iface, pStg); 1373 1393 1374 return DataCache_Load(iface, pStg);1375 }1376 1377 /************************************************************************1378 * DataCache_Load (IPersistStorage)1379 *1380 * The data cache implementation of IPersistStorage_Load doesn't1381 * actually load anything. Instead, it holds on to the storage pointer1382 * and it will load the presentation information when the1383 * IDataObject_GetData or IViewObject2_Draw methods are called.1384 *1385 * See Windows documentation for more details on IPersistStorage methods.1386 */1387 static HRESULT WINAPI DataCache_Load(1388 IPersistStorage* iface,1389 IStorage* pStg)1390 {1391 _ICOM_THIS_From_IPersistStorage(DataCache, iface);1392 1393 TRACE("(%p, %p)\n", iface, pStg);1394 1395 1394 if (this->presentationStorage != NULL) 1396 1395 { … … 1410 1409 * DataCache_Save (IPersistStorage) 1411 1410 * 1412 * Until we actully connect to a running object and retrieve new 1411 * Until we actully connect to a running object and retrieve new 1413 1412 * information to it, we never have to save anything. However, it is 1414 1413 * our responsability to copy the information when saving to a new … … 1417 1416 * See Windows documentation for more details on IPersistStorage methods. 1418 1417 */ 1419 static HRESULT WINAPI DataCache_Save( 1418 static HRESULT WINAPI DataCache_Save( 1420 1419 IPersistStorage* iface, 1421 IStorage* pStg, 1422 1420 IStorage* pStg, 1421 BOOL fSameAsLoad) 1423 1422 { 1424 1423 _ICOM_THIS_From_IPersistStorage(DataCache, iface); … … 1426 1425 TRACE("(%p, %p, %d)\n", iface, pStg, fSameAsLoad); 1427 1426 1428 if ( (!fSameAsLoad) && 1427 if ( (!fSameAsLoad) && 1429 1428 (this->presentationStorage!=NULL) ) 1430 1429 { 1431 1430 return IStorage_CopyTo(this->presentationStorage, 1432 1433 1434 1435 1431 0, 1432 NULL, 1433 NULL, 1434 pStg); 1436 1435 } 1437 1436 … … 1447 1446 * See Windows documentation for more details on IPersistStorage methods. 1448 1447 */ 1449 static HRESULT WINAPI DataCache_SaveCompleted( 1450 IPersistStorage* iface, 1451 1448 static HRESULT WINAPI DataCache_SaveCompleted( 1449 IPersistStorage* iface, 1450 IStorage* pStgNew) 1452 1451 { 1453 1452 TRACE("(%p, %p)\n", iface, pStgNew); … … 1512 1511 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1513 1512 1514 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1513 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1515 1514 } 1516 1515 … … 1520 1519 * See Windows documentation for more details on IUnknown methods. 1521 1520 */ 1522 static ULONG WINAPI DataCache_IViewObject2_AddRef( 1521 static ULONG WINAPI DataCache_IViewObject2_AddRef( 1523 1522 IViewObject2* iface) 1524 1523 { 1525 1524 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1526 1525 1527 return IUnknown_AddRef(this->outerUnknown); 1526 return IUnknown_AddRef(this->outerUnknown); 1528 1527 } 1529 1528 … … 1533 1532 * See Windows documentation for more details on IUnknown methods. 1534 1533 */ 1535 static ULONG WINAPI DataCache_IViewObject2_Release( 1534 static ULONG WINAPI DataCache_IViewObject2_Release( 1536 1535 IViewObject2* iface) 1537 1536 { 1538 1537 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1539 1538 1540 return IUnknown_Release(this->outerUnknown); 1539 return IUnknown_Release(this->outerUnknown); 1541 1540 } 1542 1541 … … 1551 1550 static HRESULT WINAPI DataCache_Draw( 1552 1551 IViewObject2* iface, 1553 1554 1555 1556 DVTARGETDEVICE* ptd, 1557 HDC hdcTargetDev, 1558 1559 1560 1561 1562 1552 DWORD dwDrawAspect, 1553 LONG lindex, 1554 void* pvAspect, 1555 DVTARGETDEVICE* ptd, 1556 HDC hdcTargetDev, 1557 HDC hdcDraw, 1558 LPCRECTL lprcBounds, 1559 LPCRECTL lprcWBounds, 1560 IVO_ContCallback pfnContinue, 1561 DWORD dwContinue) 1563 1562 { 1564 1563 PresentationDataHeader presData; … … 1569 1568 1570 1569 TRACE("(%p, %lx, %ld, %p, %x, %x, %p, %p, %p, %lx)\n", 1571 1572 1573 1574 1575 hdcTargetDev, 1576 1577 1578 1579 1580 1570 iface, 1571 dwDrawAspect, 1572 lindex, 1573 pvAspect, 1574 hdcTargetDev, 1575 hdcDraw, 1576 lprcBounds, 1577 lprcWBounds, 1578 pfnContinue, 1579 dwContinue); 1581 1580 1582 1581 /* … … 1591 1590 */ 1592 1591 hres = DataCache_ReadPresentationData(this, 1593 1594 1592 dwDrawAspect, 1593 &presData); 1595 1594 1596 1595 if (FAILED(hres)) … … 1605 1604 */ 1606 1605 presMetafile = DataCache_ReadPresMetafile(this, 1607 1606 dwDrawAspect); 1608 1607 1609 1608 /* … … 1620 1619 1621 1620 SetWindowExtEx(hdcDraw, 1622 1623 1624 1625 1626 SetViewportExtEx(hdcDraw, 1627 1628 1629 1621 presData.dwObjectExtentX, 1622 presData.dwObjectExtentY, 1623 &oldWindowExt); 1624 1625 SetViewportExtEx(hdcDraw, 1626 lprcBounds->right - lprcBounds->left, 1627 lprcBounds->bottom - lprcBounds->top, 1628 &oldViewportExt); 1630 1629 1631 1630 SetViewportOrgEx(hdcDraw, 1632 1633 1634 1631 lprcBounds->left, 1632 lprcBounds->top, 1633 &oldViewportOrg); 1635 1634 1636 1635 PlayMetaFile(hdcDraw, presMetafile); 1637 1636 1638 1637 SetWindowExtEx(hdcDraw, 1639 1640 1641 1642 1643 SetViewportExtEx(hdcDraw, 1644 1645 1646 1638 oldWindowExt.cx, 1639 oldWindowExt.cy, 1640 NULL); 1641 1642 SetViewportExtEx(hdcDraw, 1643 oldViewportExt.cx, 1644 oldViewportExt.cy, 1645 NULL); 1647 1646 1648 1647 SetViewportOrgEx(hdcDraw, 1649 1650 1651 1648 oldViewportOrg.x, 1649 oldViewportOrg.y, 1650 NULL); 1652 1651 1653 1652 SetMapMode(hdcDraw, prevMapMode); … … 1660 1659 1661 1660 static HRESULT WINAPI DataCache_GetColorSet( 1662 IViewObject2* iface, 1663 DWORD dwDrawAspect, 1664 LONG lindex, 1665 void* pvAspect, 1666 DVTARGETDEVICE* ptd, 1667 HDC hicTargetDevice, 1668 1661 IViewObject2* iface, 1662 DWORD dwDrawAspect, 1663 LONG lindex, 1664 void* pvAspect, 1665 DVTARGETDEVICE* ptd, 1666 HDC hicTargetDevice, 1667 LOGPALETTE** ppColorSet) 1669 1668 { 1670 1669 FIXME("stub\n"); … … 1674 1673 static HRESULT WINAPI DataCache_Freeze( 1675 1674 IViewObject2* iface, 1676 1677 1678 void* pvAspect, 1679 1675 DWORD dwDrawAspect, 1676 LONG lindex, 1677 void* pvAspect, 1678 DWORD* pdwFreeze) 1680 1679 { 1681 1680 FIXME("stub\n"); … … 1685 1684 static HRESULT WINAPI DataCache_Unfreeze( 1686 1685 IViewObject2* iface, 1687 1686 DWORD dwFreeze) 1688 1687 { 1689 1688 FIXME("stub\n"); … … 1701 1700 static HRESULT WINAPI DataCache_SetAdvise( 1702 1701 IViewObject2* iface, 1703 DWORD aspects, 1704 DWORD advf, 1705 1702 DWORD aspects, 1703 DWORD advf, 1704 IAdviseSink* pAdvSink) 1706 1705 { 1707 1706 _ICOM_THIS_From_IViewObject2(DataCache, iface); … … 1716 1715 IAdviseSink_Release(this->sinkInterface); 1717 1716 this->sinkInterface = NULL; 1718 this->sinkAspects = 0; 1717 this->sinkAspects = 0; 1719 1718 this->sinkAdviseFlag = 0; 1720 1719 } … … 1726 1725 { 1727 1726 this->sinkInterface = pAdvSink; 1728 this->sinkAspects = aspects; 1729 this->sinkAdviseFlag = advf; 1727 this->sinkAspects = aspects; 1728 this->sinkAdviseFlag = advf; 1730 1729 1731 1730 IAdviseSink_AddRef(this->sinkInterface); … … 1739 1738 { 1740 1739 DataCache_FireOnViewChange(this, 1741 1742 1740 DVASPECT_CONTENT, 1741 -1); 1743 1742 } 1744 1743 … … 1749 1748 * DataCache_GetAdvise (IViewObject2) 1750 1749 * 1751 * This method queries the current state of the advise sink 1750 * This method queries the current state of the advise sink 1752 1751 * installed on the data cache. 1753 1752 * … … 1755 1754 */ 1756 1755 static HRESULT WINAPI DataCache_GetAdvise( 1757 IViewObject2* iface, 1758 DWORD* pAspects, 1759 DWORD* pAdvf, 1760 1756 IViewObject2* iface, 1757 DWORD* pAspects, 1758 DWORD* pAdvf, 1759 IAdviseSink** ppAdvSink) 1761 1760 { 1762 1761 _ICOM_THIS_From_IViewObject2(DataCache, iface); … … 1775 1774 if (ppAdvSink!=NULL) 1776 1775 { 1777 IAdviseSink_QueryInterface(this->sinkInterface, 1778 &IID_IAdviseSink, 1779 1776 IAdviseSink_QueryInterface(this->sinkInterface, 1777 &IID_IAdviseSink, 1778 (void**)ppAdvSink); 1780 1779 } 1781 1780 … … 1791 1790 */ 1792 1791 static HRESULT WINAPI DataCache_GetExtent( 1793 IViewObject2* iface, 1794 DWORD dwDrawAspect, 1795 LONG lindex, 1796 DVTARGETDEVICE* ptd, 1797 1792 IViewObject2* iface, 1793 DWORD dwDrawAspect, 1794 LONG lindex, 1795 DVTARGETDEVICE* ptd, 1796 LPSIZEL lpsizel) 1798 1797 { 1799 1798 PresentationDataHeader presData; … … 1802 1801 _ICOM_THIS_From_IViewObject2(DataCache, iface); 1803 1802 1804 TRACE("(%p, %lx, %ld, %p, %p)\n", 1805 1803 TRACE("(%p, %lx, %ld, %p, %p)\n", 1804 iface, dwDrawAspect, lindex, ptd, lpsizel); 1806 1805 1807 1806 /* … … 1829 1828 if (ptd!=NULL) 1830 1829 FIXME("Unimplemented ptd = %p\n", ptd); 1831 1832 /* 1833 * Get the presentation information from the 1830 1831 /* 1832 * Get the presentation information from the 1834 1833 * cache. 1835 1834 */ 1836 1835 hres = DataCache_ReadPresentationData(this, 1837 1838 1836 dwDrawAspect, 1837 &presData); 1839 1838 1840 1839 if (SUCCEEDED(hres)) … … 1871 1870 _ICOM_THIS_From_IOleCache2(DataCache, iface); 1872 1871 1873 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1872 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1874 1873 } 1875 1874 … … 1879 1878 * See Windows documentation for more details on IUnknown methods. 1880 1879 */ 1881 static ULONG WINAPI DataCache_IOleCache2_AddRef( 1880 static ULONG WINAPI DataCache_IOleCache2_AddRef( 1882 1881 IOleCache2* iface) 1883 1882 { 1884 1883 _ICOM_THIS_From_IOleCache2(DataCache, iface); 1885 1884 1886 return IUnknown_AddRef(this->outerUnknown); 1885 return IUnknown_AddRef(this->outerUnknown); 1887 1886 } 1888 1887 … … 1892 1891 * See Windows documentation for more details on IUnknown methods. 1893 1892 */ 1894 static ULONG WINAPI DataCache_IOleCache2_Release( 1893 static ULONG WINAPI DataCache_IOleCache2_Release( 1895 1894 IOleCache2* iface) 1896 1895 { 1897 1896 _ICOM_THIS_From_IOleCache2(DataCache, iface); 1898 1897 1899 return IUnknown_Release(this->outerUnknown); 1898 return IUnknown_Release(this->outerUnknown); 1900 1899 } 1901 1900 1902 1901 static HRESULT WINAPI DataCache_Cache( 1903 1902 IOleCache2* iface, 1904 1905 1906 1903 FORMATETC* pformatetc, 1904 DWORD advf, 1905 DWORD* pdwConnection) 1907 1906 { 1908 1907 FIXME("stub\n"); … … 1911 1910 1912 1911 static HRESULT WINAPI DataCache_Uncache( 1913 1914 1912 IOleCache2* iface, 1913 DWORD dwConnection) 1915 1914 { 1916 1915 FIXME("stub\n"); … … 1920 1919 static HRESULT WINAPI DataCache_EnumCache( 1921 1920 IOleCache2* iface, 1922 1921 IEnumSTATDATA** ppenumSTATDATA) 1923 1922 { 1924 1923 FIXME("stub\n"); … … 1927 1926 1928 1927 static HRESULT WINAPI DataCache_InitCache( 1929 1930 1928 IOleCache2* iface, 1929 IDataObject* pDataObject) 1931 1930 { 1932 1931 FIXME("stub\n"); … … 1936 1935 static HRESULT WINAPI DataCache_IOleCache2_SetData( 1937 1936 IOleCache2* iface, 1938 1939 1940 1937 FORMATETC* pformatetc, 1938 STGMEDIUM* pmedium, 1939 BOOL fRelease) 1941 1940 { 1942 1941 FIXME("stub\n"); … … 1946 1945 static HRESULT WINAPI DataCache_UpdateCache( 1947 1946 IOleCache2* iface, 1948 LPDATAOBJECT pDataObject, 1949 1950 1947 LPDATAOBJECT pDataObject, 1948 DWORD grfUpdf, 1949 LPVOID pReserved) 1951 1950 { 1952 1951 FIXME("stub\n"); … … 1956 1955 static HRESULT WINAPI DataCache_DiscardCache( 1957 1956 IOleCache2* iface, 1958 1957 DWORD dwDiscardOptions) 1959 1958 { 1960 1959 FIXME("stub\n"); … … 1980 1979 _ICOM_THIS_From_IOleCacheControl(DataCache, iface); 1981 1980 1982 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1981 return IUnknown_QueryInterface(this->outerUnknown, riid, ppvObject); 1983 1982 } 1984 1983 … … 1988 1987 * See Windows documentation for more details on IUnknown methods. 1989 1988 */ 1990 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 1989 static ULONG WINAPI DataCache_IOleCacheControl_AddRef( 1991 1990 IOleCacheControl* iface) 1992 1991 { 1993 1992 _ICOM_THIS_From_IOleCacheControl(DataCache, iface); 1994 1993 1995 return IUnknown_AddRef(this->outerUnknown); 1994 return IUnknown_AddRef(this->outerUnknown); 1996 1995 } 1997 1996 … … 2001 2000 * See Windows documentation for more details on IUnknown methods. 2002 2001 */ 2003 static ULONG WINAPI DataCache_IOleCacheControl_Release( 2002 static ULONG WINAPI DataCache_IOleCacheControl_Release( 2004 2003 IOleCacheControl* iface) 2005 2004 { 2006 2005 _ICOM_THIS_From_IOleCacheControl(DataCache, iface); 2007 2006 2008 return IUnknown_Release(this->outerUnknown); 2007 return IUnknown_Release(this->outerUnknown); 2009 2008 } 2010 2009 2011 2010 static HRESULT WINAPI DataCache_OnRun( 2012 2013 2011 IOleCacheControl* iface, 2012 LPDATAOBJECT pDataObject) 2014 2013 { 2015 2014 FIXME("stub\n"); … … 2018 2017 2019 2018 static HRESULT WINAPI DataCache_OnStop( 2020 2019 IOleCacheControl* iface) 2021 2020 { 2022 2021 FIXME("stub\n");
Note:
See TracChangeset
for help on using the changeset viewer.