儲存庫 vbox 的更動 56661
- 時間撮記:
- 2015-6-26 下午02:46:12 (10 年 以前)
- svn:sync-xref-src-repo-rev:
- 101302
- 位置:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.cpp
r55571 r56661 82 82 { 83 83 LogFlowFunc(("\t%s\n", arrEntries[i].c_str())); 84 this->lst AllowedFormats.append(arrEntries[i]);84 this->lstFmtSup.append(arrEntries[i]); 85 85 } 86 86 } … … 749 749 setMode(HG); 750 750 751 /* Save all allowed actions. */ 752 this->uAllActions = uAllActions; 753 754 /* 755 * Check if requested formats are compatible with this client. 756 */ 757 LogFlowThisFunc(("Supported formats:\n")); 758 for (size_t i = 0; i < lstFormats.size(); i++) 759 { 760 bool fSupported = false; 761 for (size_t a = 0; a < this->lstAllowedFormats.size(); a++) 762 { 763 LogFlowThisFunc(("\t\"%s\" <=> \"%s\"\n", this->lstAllowedFormats.at(a).c_str(), lstFormats.at(i).c_str())); 764 fSupported = RTStrICmp(this->lstAllowedFormats.at(a).c_str(), lstFormats.at(i).c_str()) == 0; 765 if (fSupported) 751 int rc = VINF_SUCCESS; 752 753 try 754 { 755 /* Save all allowed actions. */ 756 this->uAllActions = uAllActions; 757 758 /* 759 * Check if reported formats from host are compatible with this client. 760 */ 761 size_t cFormatsSup = this->lstFmtSup.size(); 762 size_t cFormatsActive = 0; 763 764 LPFORMATETC pFormatEtc = new FORMATETC[cFormatsSup]; 765 RT_BZERO(pFormatEtc, sizeof(FORMATETC) * cFormatsSup); 766 767 LPSTGMEDIUM pStgMeds = new STGMEDIUM[cFormatsSup]; 768 RT_BZERO(pStgMeds, sizeof(STGMEDIUM) * cFormatsSup); 769 770 LogRel2(("DnD: Reported formats:\n")); 771 for (size_t i = 0; i < lstFormats.size(); i++) 772 { 773 bool fSupported = false; 774 for (size_t a = 0; a < this->lstFmtSup.size(); a++) 766 775 { 767 this->lstFormats.append(lstFormats.at(i)); 768 break; 776 const char *pszFormat = lstFormats.at(i).c_str(); 777 LogFlowThisFunc(("\t\"%s\" <=> \"%s\"\n", this->lstFmtSup.at(a).c_str(), pszFormat)); 778 779 fSupported = RTStrICmp(this->lstFmtSup.at(a).c_str(), pszFormat) == 0; 780 if (fSupported) 781 { 782 this->lstFmtActive.append(lstFormats.at(i)); 783 784 /** @todo Put this into a #define / struct. */ 785 if (!RTStrICmp(pszFormat, "text/uri-list")) 786 { 787 pFormatEtc[cFormatsActive].cfFormat = CF_HDROP; 788 pFormatEtc[cFormatsActive].dwAspect = DVASPECT_CONTENT; 789 pFormatEtc[cFormatsActive].lindex = -1; 790 pFormatEtc[cFormatsActive].tymed = TYMED_HGLOBAL; 791 792 pStgMeds [cFormatsActive].tymed = TYMED_HGLOBAL; 793 cFormatsActive++; 794 } 795 else if ( !RTStrICmp(pszFormat, "text/plain") 796 || !RTStrICmp(pszFormat, "text/html") 797 || !RTStrICmp(pszFormat, "text/plain;charset=utf-8") 798 || !RTStrICmp(pszFormat, "text/plain;charset=utf-16") 799 || !RTStrICmp(pszFormat, "text/plain") 800 || !RTStrICmp(pszFormat, "text/richtext") 801 || !RTStrICmp(pszFormat, "UTF8_STRING") 802 || !RTStrICmp(pszFormat, "TEXT") 803 || !RTStrICmp(pszFormat, "STRING")) 804 { 805 pFormatEtc[cFormatsActive].cfFormat = CF_TEXT; 806 pFormatEtc[cFormatsActive].dwAspect = DVASPECT_CONTENT; 807 pFormatEtc[cFormatsActive].lindex = -1; 808 pFormatEtc[cFormatsActive].tymed = TYMED_HGLOBAL; 809 810 pStgMeds [cFormatsActive].tymed = TYMED_HGLOBAL; 811 cFormatsActive++; 812 } 813 else /* Should never happen. */ 814 AssertReleaseFailedBreak(("Format specification for '%s' not implemented\n", pszFormat)); 815 break; 816 } 769 817 } 770 } 771 772 LogFlowThisFunc(("\t%s: %RTbool\n", lstFormats.at(i).c_str(), fSupported)); 773 } 774 775 /* 776 * Warn in the log if this guest does not accept anything. 777 */ 778 if (!this->lstFormats.size()) 779 LogRel(("DnD: Warning: No supported drag and drop formats on the guest found!\n")); 780 781 /* 782 * Prepare the startup info for DoDragDrop(). 783 */ 784 int rc = VINF_SUCCESS; 785 try 786 { 818 819 LogRel2(("DnD: \t%s: %RTbool\n", lstFormats.at(i).c_str(), fSupported)); 820 } 821 822 /* 823 * Warn in the log if this guest does not accept anything. 824 */ 825 Assert(cFormatsActive <= cFormatsSup); 826 if (cFormatsActive) 827 { 828 LogRel2(("DnD: %RU32 supported formats found:\n", cFormatsActive)); 829 for (size_t i = 0; i < cFormatsActive; i++) 830 LogRel2(("DnD: \t%s\n", this->lstFmtActive.at(i).c_str())); 831 } 832 else 833 LogRel(("DnD: Warning: No supported drag and drop formats on the guest found!\n")); 834 835 /* 836 * Prepare the startup info for DoDragDrop(). 837 */ 838 787 839 /* Translate our drop actions into allowed Windows drop effects. */ 788 840 startupInfo.dwOKEffects = DROPEFFECT_NONE; … … 797 849 } 798 850 851 LogRel2(("DnD: Supported drop actions: 0x%x\n", startupInfo.dwOKEffects)); 852 799 853 startupInfo.pDropSource = new VBoxDnDDropSource(this); 800 startupInfo.pDataObject = new VBoxDnDDataObject(); 854 startupInfo.pDataObject = new VBoxDnDDataObject(pFormatEtc, pStgMeds, cFormatsActive); 855 856 if (pFormatEtc) 857 delete pFormatEtc; 858 if (pStgMeds) 859 delete pStgMeds; 801 860 } 802 861 catch (std::bad_alloc) … … 903 962 if (mState == Dragging) 904 963 { 905 if (lstF ormats.size() >= 1)964 if (lstFmtActive.size() >= 1) 906 965 { 907 966 /** @todo What to do when multiple formats are available? */ 908 mFormatRequested = lstF ormats.at(0);967 mFormatRequested = lstFmtActive.at(0); 909 968 910 969 rc = RTCritSectEnter(&mCritSect); … … 1428 1487 */ 1429 1488 1430 this->lstF ormats.clear();1489 this->lstFmtActive.clear(); 1431 1490 this->uAllActions = DND_IGNORE_ACTION; 1432 1491 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h
r55422 r56661 46 46 public: 47 47 48 VBoxDnDDataObject( FORMATETC *pFormatEtc = NULL, STGMEDIUM *pStgMed = NULL, ULONG cFormats = 0);48 VBoxDnDDataObject(LPFORMATETC pFormatEtc = NULL, LPSTGMEDIUM pStgMed = NULL, ULONG cFormats = 0); 49 49 virtual ~VBoxDnDDataObject(void); 50 50 51 public:52 53 static int CreateDataObject(FORMATETC *pFormatEtc, STGMEDIUM *pStgMeds,54 ULONG cFormats, IDataObject **ppDataObject);55 51 public: /* IUnknown methods. */ 56 52 … … 61 57 public: /* IDataObject methods. */ 62 58 63 STDMETHOD(GetData)( FORMATETC *pFormatEtc, STGMEDIUM *pMedium);64 STDMETHOD(GetDataHere)( FORMATETC *pFormatEtc, STGMEDIUM *pMedium);65 STDMETHOD(QueryGetData)( FORMATETC *pFormatEtc);66 STDMETHOD(GetCanonicalFormatEtc)( FORMATETC *pFormatEct, FORMATETC *pFormatEtcOut);67 STDMETHOD(SetData)( FORMATETC *pFormatEtc, STGMEDIUM *pMedium, BOOL fRelease);59 STDMETHOD(GetData)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium); 60 STDMETHOD(GetDataHere)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium); 61 STDMETHOD(QueryGetData)(LPFORMATETC pFormatEtc); 62 STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pFormatEct, LPFORMATETC pFormatEtcOut); 63 STDMETHOD(SetData)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease); 68 64 STDMETHOD(EnumFormatEtc)(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc); 69 STDMETHOD(DAdvise)( FORMATETC *pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);65 STDMETHOD(DAdvise)(LPFORMATETC pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection); 70 66 STDMETHOD(DUnadvise)(DWORD dwConnection); 71 67 STDMETHOD(EnumDAdvise)(IEnumSTATDATA **ppEnumAdvise); … … 81 77 protected: 82 78 83 bool LookupFormatEtc( FORMATETC *pFormatEtc, ULONG *puIndex);79 bool LookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex); 84 80 static HGLOBAL MemDup(HGLOBAL hMemSource); 85 void RegisterFormat( FORMATETC *pFormatEtc, CLIPFORMAT clipFormat, TYMED tyMed = TYMED_HGLOBAL,81 void RegisterFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat, TYMED tyMed = TYMED_HGLOBAL, 86 82 LONG lindex = -1, DWORD dwAspect = DVASPECT_CONTENT, DVTARGETDEVICE *pTargetDevice = NULL); 87 83 88 Status mStatus;89 LONG mRefCount;90 ULONG mcFormats;91 FORMATETC *mpFormatEtc;92 STGMEDIUM *mpStgMedium;93 RTSEMEVENT mSemEvent;94 RTCString mstrFormat;95 void *mpvData;96 uint32_t mcbData;84 Status mStatus; 85 LONG mRefCount; 86 ULONG mcFormats; 87 LPFORMATETC mpFormatEtc; 88 LPSTGMEDIUM mpStgMedium; 89 RTSEMEVENT mSemEvent; 90 RTCString mstrFormat; 91 void *mpvData; 92 uint32_t mcbData; 97 93 }; 98 94 … … 180 176 public: 181 177 182 VBoxDnDEnumFormatEtc( FORMATETC *pFormatEtc, ULONG cFormats);178 VBoxDnDEnumFormatEtc(LPFORMATETC pFormatEtc, ULONG cFormats); 183 179 virtual ~VBoxDnDEnumFormatEtc(void); 184 180 … … 189 185 STDMETHOD_(ULONG, Release)(void); 190 186 191 STDMETHOD(Next)(ULONG cFormats, FORMATETC *pFormatEtc, ULONG *pcFetched);187 STDMETHOD(Next)(ULONG cFormats, LPFORMATETC pFormatEtc, ULONG *pcFetched); 192 188 STDMETHOD(Skip)(ULONG cFormats); 193 189 STDMETHOD(Reset)(void); 194 STDMETHOD(Clone)(IEnumFORMATETC ** 195 196 public: 197 198 static void CopyFormat( FORMATETC *pFormatDest, FORMATETC *pFormatSource);199 static HRESULT CreateEnumFormatEtc(UINT cFormats, FORMATETC *pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc);190 STDMETHOD(Clone)(IEnumFORMATETC **ppEnumFormatEtc); 191 192 public: 193 194 static void CopyFormat(LPFORMATETC pFormatDest, LPFORMATETC pFormatSource); 195 static HRESULT CreateEnumFormatEtc(UINT cFormats, LPFORMATETC pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc); 200 196 201 197 private: … … 204 200 ULONG m_nIndex; 205 201 ULONG m_nNumFormats; 206 FORMATETC *m_pFormatEtc;202 LPFORMATETC m_pFormatEtc; 207 203 }; 208 204 … … 369 365 * property so that we can selectively allow/forbid 370 366 * certain types later on runtime. */ 371 RTCList<RTCString> lst AllowedFormats;367 RTCList<RTCString> lstFmtSup; 372 368 /** List of formats for the current 373 369 * drag'n drop operation. */ 374 RTCList<RTCString> lstF ormats;370 RTCList<RTCString> lstFmtActive; 375 371 /** Flags of all current drag'n drop 376 372 * actions allowed. */ -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnDDataObject.cpp
r51476 r56661 5 5 6 6 /* 7 * Copyright (C) 2013-201 4Oracle Corporation7 * Copyright (C) 2013-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 41 41 /** @todo Implement IDataObjectAsyncCapability interface? */ 42 42 43 VBoxDnDDataObject::VBoxDnDDataObject(FORMATETC *pFormatEtc, 44 STGMEDIUM *pStgMed, ULONG cFormats) 43 VBoxDnDDataObject::VBoxDnDDataObject(LPFORMATETC pFormatEtc, LPSTGMEDIUM pStgMed, ULONG cFormats) 45 44 : mStatus(Uninitialized), 46 45 mRefCount(1), … … 51 50 HRESULT hr; 52 51 53 /* Make sure that there's enough room for our fixed formats. */54 ULONG cAllFormats = cFormats + 1;52 ULONG cFixedFormats = 1; 53 ULONG cAllFormats = cFormats + cFixedFormats; 55 54 56 55 try … … 61 60 RT_BZERO(mpStgMedium, sizeof(STGMEDIUM) * cAllFormats); 62 61 63 if ( pFormatEtc 64 && pStgMed) 62 /* 63 * Registration of dynamic formats needed? 64 */ 65 LogFlowFunc(("%RU32 dynamic formats\n", cFormats)); 66 if (cFormats) 65 67 { 68 AssertPtr(pFormatEtc); 69 AssertPtr(pStgMed); 70 66 71 for (ULONG i = 0; i < cFormats; i++) 67 72 { … … 85 90 AssertRC(rc2); 86 91 87 /* Most commonly used format. */ 92 /* 93 * Register fixed formats. 94 */ 95 #if 0 96 /* CF_HDROP. */ 88 97 RegisterFormat(&mpFormatEtc[cFormats], CF_HDROP); 89 98 mpStgMedium[cFormats++].tymed = TYMED_HGLOBAL; 90 #if 0 99 91 100 /* IStream. */ 92 101 RegisterFormat(&mpFormatEtc[cFormats++], … … 107 116 #endif 108 117 mcFormats = cFormats; 109 mStatus = Initialized;118 mStatus = Initialized; 110 119 } 111 120 … … 125 134 126 135 LogFlowFunc(("mRefCount=%RI32\n", mRefCount)); 127 }128 129 /* static */130 int VBoxDnDDataObject::CreateDataObject(FORMATETC *pFormatEtc, STGMEDIUM *pStgMeds,131 ULONG cFormats, IDataObject **ppDataObject)132 {133 AssertPtrReturn(pFormatEtc, VERR_INVALID_POINTER);134 AssertPtrReturn(pStgMeds, VERR_INVALID_POINTER);135 AssertPtrReturn(ppDataObject, VERR_INVALID_POINTER);136 137 int rc;138 try139 {140 *ppDataObject = new VBoxDnDDataObject(pFormatEtc, pStgMeds, cFormats);141 rc = VINF_SUCCESS;142 }143 catch(std::bad_alloc &)144 {145 rc = VERR_NO_MEMORY;146 }147 148 return rc;149 136 } 150 137 … … 195 182 * @param pMedium 196 183 */ 197 STDMETHODIMP VBoxDnDDataObject::GetData( FORMATETC *pFormatEtc, STGMEDIUM *pMedium)184 STDMETHODIMP VBoxDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium) 198 185 { 199 186 AssertPtrReturn(pFormatEtc, DV_E_FORMATETC); … … 206 193 return DV_E_FORMATETC; 207 194 208 FORMATETC *pThisFormat = &mpFormatEtc[lIndex];195 LPFORMATETC pThisFormat = &mpFormatEtc[lIndex]; 209 196 AssertPtr(pThisFormat); 210 197 211 STGMEDIUM *pThisMedium = &mpStgMedium[lIndex];198 LPSTGMEDIUM pThisMedium = &mpStgMedium[lIndex]; 212 199 AssertPtr(pThisMedium); 213 200 214 201 LogFlowFunc(("Using pThisFormat=%p, pThisMedium=%p\n", pThisFormat, pThisMedium)); 215 202 216 HRESULT hr = DV_E_FORMATETC; 203 HRESULT hr = DV_E_FORMATETC; /* Play safe. */ 217 204 218 205 LogFlowFunc(("mStatus=%ld\n", mStatus)); … … 226 213 if (mStatus == Dropped) 227 214 { 228 LogFlowFunc(("cfFormat=%RI16, sFormat=%s, tyMed=%RU32, dwAspect=%RU32\n", 229 pThisFormat->cfFormat, VBoxDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat), 230 pThisFormat->tymed, pThisFormat->dwAspect)); 231 LogFlowFunc(("Got strFormat=%s, pvData=%p, cbData=%RU32\n", 232 mstrFormat.c_str(), mpvData, mcbData)); 233 215 LogRel3(("DnD: cfFormat=%RI16, sFormat=%s, tyMed=%RU32, dwAspect=%RU32\n", 216 pThisFormat->cfFormat, VBoxDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat), 217 pThisFormat->tymed, pThisFormat->dwAspect)); 218 LogRel3(("DnD: Got strFormat=%s, pvData=%p, cbData=%RU32\n", 219 mstrFormat.c_str(), mpvData, mcbData)); 220 221 /* 222 * Initialize default values. 223 */ 224 pMedium->tymed = pThisFormat->tymed; 225 pMedium->pUnkForRelease = NULL; 226 227 /* 228 * URI list handling. 229 */ 234 230 if (mstrFormat.equalsIgnoreCase("text/uri-list")) 235 231 { … … 372 368 } 373 369 } 374 } 375 370 /* 371 * Plain text handling. 372 */ 373 else if ( mstrFormat.equalsIgnoreCase("text/plain") 374 || mstrFormat.equalsIgnoreCase("text/html") 375 || mstrFormat.equalsIgnoreCase("text/plain;charset=utf-8") 376 || mstrFormat.equalsIgnoreCase("text/plain;charset=utf-16") 377 || mstrFormat.equalsIgnoreCase("text/plain") 378 || mstrFormat.equalsIgnoreCase("text/richtext") 379 || mstrFormat.equalsIgnoreCase("UTF8_STRING") 380 || mstrFormat.equalsIgnoreCase("TEXT") 381 || mstrFormat.equalsIgnoreCase("STRING")) 382 { 383 pMedium->hGlobal = GlobalAlloc(GHND, mcbData + 1); 384 if (pMedium->hGlobal) 385 { 386 char *pcDst = (char *)GlobalLock(pMedium->hGlobal); 387 memcpy(pcDst, mpvData, mcbData); 388 pcDst[mcbData] = '\0'; 389 GlobalUnlock(pMedium->hGlobal); 390 391 hr = S_OK; 392 } 393 } 394 else 395 LogRel(("DnD: Error: Format '%s' not implemented\n", mstrFormat.c_str())); 396 } 397 398 /* Error handling; at least return some basic data. */ 376 399 if (FAILED(hr)) 377 400 { … … 392 415 pMedium->pUnkForRelease = NULL; 393 416 } 417 418 if (hr == DV_E_FORMATETC) 419 LogRel(("DnD: Error handling format '%s' (%RU32 bytes)\n", mstrFormat.c_str(), mcbData)); 394 420 395 421 LogFlowFunc(("hr=%Rhrc\n", hr)); … … 405 431 * @param pMedium 406 432 */ 407 STDMETHODIMP VBoxDnDDataObject::GetDataHere( FORMATETC *pFormatEtc, STGMEDIUM *pMedium)433 STDMETHODIMP VBoxDnDDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium) 408 434 { 409 435 LogFlowFunc(("\n")); … … 418 444 * @param pFormatEtc 419 445 */ 420 STDMETHODIMP VBoxDnDDataObject::QueryGetData( FORMATETC *pFormatEtc)446 STDMETHODIMP VBoxDnDDataObject::QueryGetData(LPFORMATETC pFormatEtc) 421 447 { 422 448 LogFlowFunc(("\n")); … … 424 450 } 425 451 426 STDMETHODIMP VBoxDnDDataObject::GetCanonicalFormatEtc( FORMATETC *pFormatEct, FORMATETC *pFormatEtcOut)452 STDMETHODIMP VBoxDnDDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEct, LPFORMATETC pFormatEtcOut) 427 453 { 428 454 LogFlowFunc(("\n")); … … 433 459 } 434 460 435 STDMETHODIMP VBoxDnDDataObject::SetData( FORMATETC *pFormatEtc, STGMEDIUM *pMedium, BOOL fRelease)461 STDMETHODIMP VBoxDnDDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease) 436 462 { 437 463 return E_NOTIMPL; … … 455 481 } 456 482 457 STDMETHODIMP VBoxDnDDataObject::DAdvise( FORMATETC *pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)483 STDMETHODIMP VBoxDnDDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) 458 484 { 459 485 return OLE_E_ADVISENOTSUPPORTED; … … 564 590 } 565 591 566 bool VBoxDnDDataObject::LookupFormatEtc( FORMATETC *pFormatEtc, ULONG *puIndex)592 bool VBoxDnDDataObject::LookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex) 567 593 { 568 594 AssertReturn(pFormatEtc, false); … … 575 601 && pFormatEtc->dwAspect == mpFormatEtc[i].dwAspect) 576 602 { 577 Log FlowFunc(("Format found: tyMed=%RI32, cfFormat=%RI16, sFormats=%s, dwAspect=%RI32, ulIndex=%RU32\n",578 579 603 LogRel3(("DnD: Format found: tyMed=%RI32, cfFormat=%RI16, sFormats=%s, dwAspect=%RI32, ulIndex=%RU32\n", 604 pFormatEtc->tymed, pFormatEtc->cfFormat, VBoxDnDDataObject::ClipboardFormatToString(mpFormatEtc[i].cfFormat), 605 pFormatEtc->dwAspect, i)); 580 606 if (puIndex) 581 607 *puIndex = i; … … 584 610 } 585 611 586 #ifdef VBOX_DND_DEBUG_FORMATS 587 LogFlowFunc(("Format NOT found: tyMed=%RI32, cfFormat=%RI16, sFormats=%s, dwAspect=%RI32\n", 588 pFormatEtc->tymed, pFormatEtc->cfFormat, VBoxDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat), 589 pFormatEtc->dwAspect)); 590 #endif 612 LogRel3(("DnD: Format NOT found: tyMed=%RI32, cfFormat=%RI16, sFormats=%s, dwAspect=%RI32\n", 613 pFormatEtc->tymed, pFormatEtc->cfFormat, VBoxDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat), 614 pFormatEtc->dwAspect)); 615 591 616 return false; 592 617 } … … 611 636 } 612 637 613 void VBoxDnDDataObject::RegisterFormat( FORMATETC *pFormatEtc, CLIPFORMAT clipFormat,638 void VBoxDnDDataObject::RegisterFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat, 614 639 TYMED tyMed, LONG lIndex, DWORD dwAspect, 615 640 DVTARGETDEVICE *pTargetDevice) -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnDEnumFormat.cpp
r51469 r56661 5 5 6 6 /* 7 * Copyright (C) 2013 Oracle Corporation7 * Copyright (C) 2013-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 31 31 32 VBoxDnDEnumFormatEtc::VBoxDnDEnumFormatEtc( FORMATETC *pFormatEtc, ULONG cFormats)32 VBoxDnDEnumFormatEtc::VBoxDnDEnumFormatEtc(LPFORMATETC pFormatEtc, ULONG cFormats) 33 33 : m_lRefCount(1), 34 34 m_nIndex(0) … … 112 112 } 113 113 114 STDMETHODIMP VBoxDnDEnumFormatEtc::Next(ULONG cFormats, FORMATETC *pFormatEtc, ULONG *pcFetched)114 STDMETHODIMP VBoxDnDEnumFormatEtc::Next(ULONG cFormats, LPFORMATETC pFormatEtc, ULONG *pcFetched) 115 115 { 116 116 ULONG ulCopied = 0; … … 158 158 159 159 /* static */ 160 void VBoxDnDEnumFormatEtc::CopyFormat( FORMATETC *pDest, FORMATETC *pSource)160 void VBoxDnDEnumFormatEtc::CopyFormat(LPFORMATETC pDest, LPFORMATETC pSource) 161 161 { 162 162 AssertPtrReturnVoid(pDest); … … 173 173 174 174 /* static */ 175 HRESULT VBoxDnDEnumFormatEtc::CreateEnumFormatEtc(UINT nNumFormats, FORMATETC *pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc)175 HRESULT VBoxDnDEnumFormatEtc::CreateEnumFormatEtc(UINT nNumFormats, LPFORMATETC pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc) 176 176 { 177 177 AssertReturn(nNumFormats, E_INVALIDARG);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器