0

我正在为 Delphi 主机和 .NET 插件使用 Hydra 接口。这是IPlugin.cs。我想在 HydraInterface.pas 和 IPlugin.cs 中添加更多方法和函数。但是当我添加新方法并实现和调试时,它只在 IPlugin.cs 处停止并且没有连接到 HydraInterface.pas。如何同时更新 C# 插件和 Delphi HydraInterface?

 [Guid("B6135CAD-BF01-491B-8BF3-2D5D3059E731")]
public interface IHostInterface : IHYCrossPlatformInterface
{       
    bool WriteByte(string parameterValue, byte value);
    bool WriteString(string parameterValue, string value);
    bool WriteLong(string parameterValue, int value);
}   

这是 Delphi 方面的 HydraInterface.pas。

IHostInterface = interface;
IHostInterface = interface(IHYCrossPlatformInterface)
['{B6135CAD-BF01-491B-8BF3-2D5D3059E731}']
function WriteRegisterByte (const parameterValue:WideString; const value:Byte): boolean; safecall;
function WriteLong(const parameterValue:WideString; const value:integer): boolean;safecall;
function WriteString(const parameterValue:WideString; const value:WideString): boolean;safecall;
4

1 回答 1

0

COM 接口中方法的声明顺序是二进制接口的一部分。方法声明的顺序用于确定 COM 接口 vtable 的布局。接口中方法的声明顺序不匹配,您应该更正该差异。

于 2014-09-03T07:54:26.620 回答