Announcement

Collapse
No announcement yet.

How to use an event which is declared in a type library in Delphi

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use an event which is declared in a type library in Delphi

    Hi everyone ,
    I have a C#.dll which I've add it to Delphi 7 (with type library import). I can use all the precedures and functions and properties of this type library successfully .
    my problem is that I have a public event in this dll which I want to use it in Delphi but I don't know how to reach this event.

    this is how I declare a variable as my dll class and use its properties and procedures :

    procedure TForm1.Button1Click(Sender: TObject);
    var
    intrf : ISalesService;
    begin

    intrf := CreateComObject(CLASS_SalesService) as ISalesService;
    intrf.Start(9000,'COM1',4000); //use a procedure
    ShowMessage('end');

    end;

    I can see all the public procedures like Start in the intrf. list ,but I couldn't see any of its public events .

    I'll appretiate any help
    Best Regards
    Shilan

  • #2
    Normally, I'd answer this since Delphi is my *****. But this is hardly the place to ask a question like this as your first post. Why wouldn't you go over to experts-exchange or something? I know the answer is on Google also because I was looking for it a week ago!
    2001 Mustang Convertible Worklog
    Indigo Custom Frontend (Flash/Delphi)
    Blog

    Qube v1.3 Now Available at the mp3Car Store!!!!!!
    The simplest IO controller you'll ever use!

    Comment


    • #3
      Originally posted by colin View Post
      Normally, I'd answer this since Delphi is my *****. But this is hardly the place to ask a question like this as your first post. Why wouldn't you go over to experts-exchange or something? I know the answer is on Google also because I was looking for it a week ago!
      I've googled this but I didn't find any answers that I could work with .
      I'm a beginner in Delphi programming so may be that's why I couldn't make them work !!
      I've written this C# dll which another company must use it in their Delphi application . I used it in VB6 and C++ before but I really have problem using COM events in Delphi Client application . And I'm really in lack of time and my deadline is almost over so I really appreciate it if you could give me any hints or links
      Best Regards

      Comment

      Working...
      X