![]() |
Problem importing a type library
Hello,
I dont know if this is the right place to ask this. I am trying to use a type library on delphi 6. The problem is that delphi6 ask me to choose a file. This is a registered type library that is not inside a exe, dll, tlb, etc. Using Visual Basic I have no problem because the type library shows in the list, but in delphi6 it does not show. the type library is "Messenger API Type Library" Thank You |
Is it possible, the type libary couldn't be used in Delphi?
Greets 1PM |
Hello,
well, if that type library is not inside a exe, dll, tlb, etc., where is it then? Is it a kind of an ActiveX-Library, maybe in an .ocx file? What kind of library is it? Maybe it is just a Unit (.pas / .dcu) which only has to be "written" into the uses-List... Yours, S - tefano |
I dont know.
this is a library that controls the msn messenger 6 from Microsoft. maybe delphi does not support this kind of libraries, because delphi does not show all registered types. with visual basic or visual c, I have no problem, because the library shows in their list of type libraries. I this microsoft is hiding it, so it can not be use with third party software, like delphi, and they work with Microsoft products maybe. |
:?
I don't understand how it is possible that you don't know the type / kind of that library when there are noe problems importing it in visual basic / visual c... Maybe it is helpful for us to know how you import that library in visual basic oder visual c. |
in visual basic or visual c I dont import anything, the library is already in the list.
|
Hmmm...
trying to find a solution a little bit difficult in that case. I have never used visual basic or visual c before. Maybe there is a function for exporting libraries, or a "place" in the settings where the paths to the libraries are saved. So you could find out where the library is located, or if it's probably an ActiveX control. ActiveX controls can be imported via "component->import activex control" in delphi. |
yeah in vb the path is like this
D:\Program File\Messenger\msmsgr.exe\3 when I try to import the library in delphi using this file D:\Program File\Messenger\msmsgr.exe another library appears, but I need another one. |
Is it really 'msmgr.exe' + '\3' ?
Maybe the library you're searching for is compiled into the .exe as a resource which is extracted at runtime. Like for expample the moricons.dll wicht contains many icons. You'll probably be able to get your library out of the .exe by using a kind of resource-manager or something like that... Unfortunately I have no idea how that could be done in detail. Maybe one of the other members are able to help you there... Yours, S - tefano |
Do you have the latest updates on Delphi 6. THe version, that shipped originally, as well as the first update have this bug importing a type library, update 2 should resolve it.
...:cat:... |
Liste der Anhänge anzeigen (Anzahl: 1)
S - tefano:
Yes it is msmsgr.exe + '\3' I am attaching a picture so you can see the path. When I try to import the exe, "Messenger Type Library" appears on Delphi list, but as you can see, I need the one with the "\3" which is "Messenger API Type Library" at the end. Cool, I will try to extract the library as tlb with resource hacker, good idea man :) sakura: I have the update 2 for Delphi6, but I also own Delphi 7 Enterprise, and the same problem occurs. Thank you guys |
Hope you can solve the problem by going that resource way, unfortunately there are no furhter ideas on my side....
Maybe its also just a little too late for thinking on that level. Goodnight, S - tefano |
Liste der Anhänge anzeigen (Anzahl: 1)
Cool :D
It worked!!! I extracted the third typelib file from the msmsgs.exe and then I save it as MessengerAPI.tlb then I imported the tlb and it worked. The only problem now is that I can not create a component from it, so I think I have to edit this pas file manually to create a class and then create the component. The problem I think was that delphi looks for the first .tbl file inside the exe, and ignores the other ones. I am attaching the pas file, it is to control msn messenger 6 Thank You S - tefano |
Hello,
I didn't read that code quite carefully, but it does not seem to be a visual component. So, is it really necessary to build one of it? Before you try to do that, maybe you could try just to get the .pas file without the extension into the uses-list of the unit that has to use this control. Then you can call functions like create, createnative, or access properties and methods of the class IMessenger3. Good luck, S - tefano |
It is not necessary to build one.
I am just gonna use the pas file. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:41 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz