Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
CreateOleObject Geçersiz sınıf dizesi hatası
#1
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;
Cevapla
#2
Öncelikle sınıfın baş vurduğu (dll, ocx v.b.) kütüphanesinin Regsvr32 ile kayıt edilmesi gerekiyordur belki.
Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Sistem Bu Uygulamada Yığın Tabanlı Bir Arabelleğin Taştığını Algıladı Hatası sunbeki 0 72 22-03-2023, Saat: 15:25
Son Yorum: sunbeki
Photo RLINK32: Too many resources to handle hatası HuseyinF 4 682 28-02-2023, Saat: 16:20
Son Yorum: COMMANDX
  ClientDataSet ve XML - Kaydetme Hatası nehirnnn 3 271 25-02-2023, Saat: 00:42
Son Yorum: Halil Han BADEM
  CoInitialize oluşturma hatası Bay_Y 2 250 20-02-2023, Saat: 16:20
Son Yorum: Bay_Y
  onkeydown EAbstractError hatası info@guzelceker.com 2 302 08-12-2022, Saat: 20:18
Son Yorum: mrmarman



Konuyu Okuyanlar: 1 Ziyaretçi