0

我在剪贴板中有非托管 OLE 对象。我通过下一个代码将其放入剪贴板:

[DllImport("mfc80u.dll", CallingConvention = CallingConvention.ThisCall, EntryPoint = "#1532")]
public static extern void COleClientItem_CopyToClipboard(IntPtr thisClientItem, int bIncludeLink);

我如何知道它是谁的对象(例如 Word、Excel 或图像)以及如何通过 C# 将其保存在文件中?

4

1 回答 1

1

I don't know how you do it in C#. I do know that you need to try and get the CF_OBJECTDISCRIPTOR clipboard format and inspect the resulting OBJECTDESCRIPTOR object's clsid member. From the CLSID, you can see if it matches Word, Excel, etc.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms683735(v=vs.85).aspx

于 2012-06-07T15:21:26.180 回答