Board index » delphi » use of imported .tlb file

use of imported .tlb file

hello, this is a help help from france

we manage to insert a library type called msdisp32.tlb wich contains all
MAPI properties and methods.
But infortunetly we didn't know how to allocate this object, equivalent
'set createobject ' in VB.

here is the code:

unit inter;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,
  StdCtrls,MAPI_TLB;

.......

procedure TForm1.Button3Click(Sender: TObject);
var
    alliance : session;

begin
  alliance.mapiobject := ('MAPI.SESSION');
  alliance.logon := ('Microsoft Outlook');
  alliance.logoff;
end;

 

Re:use of imported .tlb file


Quote
>we manage to insert a library type called msdisp32.tlb wich contains all
>MAPI properties and methods.
>But infortunetly we didn't know how to allocate this object, equivalent
>'set createobject ' in VB.

{ snip }

I'm not sure what you're trying to do with that code, but what's wrong
with the MAPI.pas file included with Delphi? If you just add "mapi" to
your uses clause you can call all of the functions direct. Surely that's
easier?
--
Jeremy Collins
Kansai Business Systems

(return address not altered 'coz I get spammed *whatever* I do!)

Other Threads