如何使用Delphi创建IDataObject实例? [英] How can I create a IDataObject instance with Delphi?

查看:161
本文介绍了如何使用Delphi创建IDataObject实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆