2014-09-02 89 views
0

我使用Delphi主机和.NET插件的Hydra界面。这里是IPlugin.cs。我想在HydraInterface.pas和IPlugin.cs中添加更多的方法和函数。但是,当我添加新方法并实施并在调试时,它仅在IPlugin.cs中停止,并且未连接到HydraInterface.pas。我如何更新C#插件和Delphi HydraInterface?如何更新Hydra界面的插件

[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); 
} 

这是德尔福方面的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; 
+1

那么,一开始的方法的顺序不匹配 – 2014-09-02 10:59:38

+0

是的,我做你的建议。它运行良好。谢谢大卫Heffernan。 – PPPA 2014-09-03 01:27:50

回答

0

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