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