[英]Delphi interface to C++ Builder
I am trying to use a Delphi component and the callback function needs to be implemented as a我正在尝试使用 Delphi 组件,并且需要将回调 function 实现为
typedef System::DelphiInterface<TButtonCallBack> _di_TButtonCallBack;
which is defined in the C++ header file as:在 C++ header 文件中定义为:
__interface TButtonCallBack : public System::IInterface
{
virtual void __fastcall Invoke(TConfirmButton ConfirmButton) = 0;
};
How the heck to do I implement the above Delphi interface in C++ Builder?我该怎么在 C++ Builder 中实现上述 Delphi 接口?
Ok I figured it out.好的,我想通了。
For others if it is helpful, the answer is below:对于其他人,如果它有帮助,答案如下:
class TUniFSConfirmButtonInterface : public TCppInterfacedObject<TButtonCallBack>
{
public:
void __fastcall Invoke(TConfirmButton nButton)
{
}
};
All the best,一切顺利,
Aggie85!阿吉85!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.