∧∧ / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
(,,゚Д゚) <
>>196 のインターフェースはダメだった
Π ̄ ̄ ̄| \
|つ ダメ ()  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
| |___.|
∪∪
**************************************
unit StringsInt;
interface
uses Classes;
type
IStringsInt = interface
['{ヒミチュ}']
procedure SetStringItems(Strings: TStrings);
end;
const
IStringsInt_IID: TGUID =
'{ヒロミチュ}';
implementation
end.
**************************************
unit UseInterface;
interface
type
TUseInterfaceObject = class(TObject, IUnknown)
private
protected
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
public
end;
implementation
{ TUseInterfaceObject }
function TUseInterfaceObject._AddRef: Integer;
begin
Result := -1;
end;
function TUseInterfaceObject._Release: Integer;
begin
Result := -1;
end;
function TUseInterfaceObject.QueryInterface(const IID: TGUID;
out Obj): HResult;
const
E_NOINTERFACE = Hresult($80004002);
begin
if GetInterface(IID, Obj) then
Result := 0
else
Result := E_NOINTERFACE;
end;
end.