Nasıl create etmem gerekiyor ki geçersiz sınıf dizesi hatasını almayayım?
// *********************************************************************//
// Interface: IEventSubscription
// Flags: (20800) Dual OleAutomation DispatchableSmallint
// GUID: {4A6B0E15-2E38-11D1-9965-00C04FBBB345}
// *********************************************************************//
IEventSubscription = interface(IDispatch)
['{4A6B0E15-2E38-11D1-9965-00C04FBBB345}']
function Get_SubscriptionID: WideString; safecall;
procedure Set_SubscriptionID(const pbstrSubscriptionID: WideString); safecall;
function Get_SubscriptionName: WideString; safecall;
procedure Set_SubscriptionName(const pbstrSubscriptionName: WideString); safecall;
function Get_PublisherID: WideString; safecall;
procedure Set_PublisherID(const pbstrPublisherID: WideString); safecall;
function Get_EventClassID: WideString; safecall;
procedure Set_EventClassID(const pbstrEventClassID: WideString); safecall;
function Get_methodName: WideString; safecall;
procedure Set_methodName(const pbstrMethodName: WideString); safecall;
function Get_SubscriberCLSID: WideString; safecall;
procedure Set_SubscriberCLSID(const pbstrSubscriberCLSID: WideString); safecall;
function Get_SubscriberInterface: IUnknown; safecall;
procedure TForm1.Button1Click(Sender: TObject);
var event : IEventSubscription;
begin
CoInitialize(nil);
event := CreateOleObject('IEventSubscription') As IEventSubscription ;
memo1.Lines.Add(event.SubscriptionName);
event := nil;
CoUnInitialize;
end;
// *********************************************************************//
// Interface: IEventSubscription
// Flags: (20800) Dual OleAutomation DispatchableSmallint
// GUID: {4A6B0E15-2E38-11D1-9965-00C04FBBB345}
// *********************************************************************//
IEventSubscription = interface(IDispatch)
['{4A6B0E15-2E38-11D1-9965-00C04FBBB345}']
function Get_SubscriptionID: WideString; safecall;
procedure Set_SubscriptionID(const pbstrSubscriptionID: WideString); safecall;
function Get_SubscriptionName: WideString; safecall;
procedure Set_SubscriptionName(const pbstrSubscriptionName: WideString); safecall;
function Get_PublisherID: WideString; safecall;
procedure Set_PublisherID(const pbstrPublisherID: WideString); safecall;
function Get_EventClassID: WideString; safecall;
procedure Set_EventClassID(const pbstrEventClassID: WideString); safecall;
function Get_methodName: WideString; safecall;
procedure Set_methodName(const pbstrMethodName: WideString); safecall;
function Get_SubscriberCLSID: WideString; safecall;
procedure Set_SubscriberCLSID(const pbstrSubscriberCLSID: WideString); safecall;
function Get_SubscriberInterface: IUnknown; safecall;
procedure TForm1.Button1Click(Sender: TObject);
var event : IEventSubscription;
begin
CoInitialize(nil);
event := CreateOleObject('IEventSubscription') As IEventSubscription ;
memo1.Lines.Add(event.SubscriptionName);
event := nil;
CoUnInitialize;
end;