0
나는 오류를 받고 있어요 :왜 오류가 발생합니까 구현이 누락 되었습니까?
다음[DCC Error] Test.pas(10): E2291 Missing implementation of interface method ICoTest64.MyFunc
가 TLB 파일의 코드 조각입니다.
// *********************************************************************//
// Interface: ICoTest64
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {76CF78FE-22A3-4C0B-B1A9-97634A453AE3}
// *********************************************************************//
ICoTest64 = interface(IDispatch)
['{76CF78FE-22A3-4C0B-B1A9-97634A453AE3}']
function MyFunc(const Range: System.OleVariant): System.OleVariant; safecall;
end;
그리고 여기에 내가 델파이 XE2
문제점은 무엇을 사용하고 implementation = interface
을 말할 수있는 지금까지 구현
unit Test;
interface
uses
SysUtils, ComObj, ComServ, ActiveX, Variants, Office2000, Excel2000,
adxAddIn, Test64_TLB,
System.Classes, adxHostAppEvents, Dialogs, StdVcl;
type
TCoTest64 = class(TadxAddin, ICoTest64)
protected
function MyFunc(var Range: System.OleVariant): System.OleVariant; safecall;
end;
implementation
function TCoTest64.MyFunc(var Range: System.OleVariant): System.OleVariant;
begin
Result:= 10;
end;
end.
입니까?
예, 그게 바로 그거야, 그것은 지금 컴파일합니다. 나는 어떤 형태의 실명으로 고통 받고 있다고 생각합니다. 거의 모든 코드가 델파이에 의해 자동 생성된다는 것입니다. 그래서'const'와'var' 선언 사이의 차이점을 알지 못했습니다. – Johan