Using TLB file in Delphi

Posted on 2005-03-05
Medium Priority
Last Modified: 2007-12-19
I have a TLB file, I already import into Delphi.
(Not Imported from DLL files but created with IDL file)

I know the DLL link with the IDL file.
 I want use function, but I can't. I suppose than I should absolutely make the link with the Dll.

But how ... Somebody can help me ?
Question by:jlvill
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 12

Expert Comment

ID: 13467700


  function FunctionName(....): Longint; cdecl; external DLLNAME;


function TForm1.Function_Delphi(....): Longint;
  Result := FunctionName(....);

Author Comment

ID: 13468945
Hi Eso,
Probably my question is not clear enough or maybe I don't understant very well the example you gave me...
I know how to link any function with a DLL but I don't know how use mu TLB file. I can read this note into my TLB file.
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You  
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively  
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.

I have the UUID 9X99XXX9-9999X-99X9-....-............ (EXAMPLE) and I presume that
DLL file
TLB file
Pas file
are linked between them but I don't know how ?

Maybe it's more clear like that,


Author Comment

ID: 13483781
Hi Guys!

Let me precise my problem,
I use the MIDL compiler (Microsoft IDL Compiler).
I succeed to compile a IDL file to obtain a TLB file.

 helpstring("IDLFILE 1.0 Type Library"),
library IDLFILE
      * * *
IDL File
      * * *    

I have imported TBL file into Delphi to have TLB.Pas. I have no class or coclass into the TLB file. So how can I use it.

Maybe I didn’t use the good options. So, have you an idea to use the idl file.


Accepted Solution

OzzMod earned 0 total points
ID: 13533632
Closed, 350 points refunded.
Community Support Moderator (Graveyard shift)

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question