Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Using TLB file in Delphi

Posted on 2005-03-05
5
Medium Priority
?
4,070 Views
Last Modified: 2007-12-19
Hi,
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 ?
0
Comment
Question by:jlvill
  • 2
4 Comments
 
LVL 12

Expert Comment

by:esoftbg
ID: 13467700
Example:

interface
 
//........

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

implementation

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

Author Comment

by:jlvill
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
Registry
DLL file
TLB file
Pas file
are linked between them but I don't know how ?

Maybe it's more clear like that,

JL
0
 

Author Comment

by:jlvill
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.


[uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx),
 helpstring("IDLFILE 1.0 Type Library"),
 lcid(0x0C0C),
 version(1.0)
]
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.

JL
0
 

Accepted Solution

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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

571 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