如何使用Delphi创建IDataObject实例? [英] How can I create a IDataObject instance with Delphi?
问题描述
此 C ++代码显示了如何使用OLE模拟文件拖放到模拟发送到..."操作.这将打开带有所选文件作为附件的标准邮件客户端,这是mailto:协议处理程序的一种非常有趣的替代方法.
This C++ code shows how OLE can be used to simulate a file drag and drop to simulate a 'Send to...' operation. This will open the standard mail client with the selected file(s) as an attachment, a very interesting alternative to the mailto: protocol handler.
在Delphi中创建IDataObject必要实例的最佳方法(简短又安全)是什么?
Which is the best (short and safe) way to create the neccessary instance of IDataObject in Delphi?
我在此处找到了一些代码,但也许有一个更好的解决方案.
I have found some code here but maybe there is a better solution.
推荐答案
将C ++代码移植到Delphi可能不太困难. 从
Porting the C++ code to Delphi probably isn't too difficult. Start with
type
TDataObject = class(TInterfacedObject, IDataObject)
并执行C ++示例中所示的必需方法.
and implement the required methods as shown in the C++ example.
这篇关于如何使用Delphi创建IDataObject实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!