class I_FORDELPHI
{
public:
virtual bool __stdcall test() = 0;
};delphi中怎么声明亚,我这么做但是不可以:
unit ForDelphi;interface
uses
Windows, Messages, SysUtils, Variants, Classes;
type I_FORDELPHI = class
private
public
function test :boolean; virtual; stdcall;
end;
implementationend.
{
public:
virtual bool __stdcall test() = 0;
};delphi中怎么声明亚,我这么做但是不可以:
unit ForDelphi;interface
uses
Windows, Messages, SysUtils, Variants, Classes;
type I_FORDELPHI = class
private
public
function test :boolean; virtual; stdcall;
end;
implementationend.
不过在vc中可以将类中的方法导出来,这样在delphi中可以象用普通的DLL那样用vc生成的dll中的函数,而不用知道这个函数是全局的还是类中的如果写的是com组件,则有两中情况,如果实现了自动接口,则在delphi中可以导入类型库或控件,delphi会为你生成封装代码;如果仅仅实现了IUnknown借口,那没办法,就要自己写了