0
我有一个程序能够通过剪贴板与MS Office应用程序交换数据。使用Word 2010和Windows 7复制和粘贴问题
这工作在Office 2007和Windows Vista/XP罚款,但没有使用Office 2010/Windows 7的
IDataObject *d = NULL;
HRESULT hr = ::OleGetClipboard(&d);
if (hr == S_OK)
{
FORMATETC formatEtc;
formatEtc.cfFormat = ::RegisterClipboardFormat("Native");
formatEtc.ptd = NULL;
formatEtc.dwAspect = DVASPECT_CONTENT;
formatEtc.lindex = -1;
STGMEDIUM stgMedium;
hr = d->QueryGetData(&formatEtc);
接着电话,我返回了一个错误 - 0x8004006a无效的剪贴板格式
我已尝试搜索网页,但没有找到任何相关信息。任何意见/建议将受到感谢。
谢谢。