Recent

Author Topic: Type Library Viewer, Importer, and Editor?  (Read 1223 times)

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Type Library Viewer, Importer, and Editor?
« on: June 26, 2022, 02:35:29 pm »
Does Lazarus have a type library viewer for previewing all the type libraries on your computer in the form of converted pascal source code?

Does Lazarus have a type library editor allowing you to define plain COM and automation interfaces, enums, records, and such as IDL? If so does this tool generate and synchronize source code implementing those interfaces either TComObject as TAutoObject respectively?

I am asking because I have been going through an old external backup drive with some of the projects and tools I've written over the years. Simultaneously I am also working on an automation project for AutoCAD. This led me to review a type library viewer and importer utility I wrote some time ago and ...

IF the answer to my above questions is "NO" and ...
IF there is moderate interest from the community

I might add some enhancements to the work I've already completed and create a Lazarus add-in to perform these tasks and abilities based on your feedback.

For reference here is a screen shot of my existing type library viewer and importer. It works by examining the registered COM objects on your computer with supporting type library information and shows your contents as Pascal source code. It has some searching, sorting, and filtering features. With your interest and feedback, I will consider making some modifications including a type library editor and implementing class generator.

https://cache.getlazarus.org/images/showcase/windows.type.libraries.jpg


UamhForever

  • Newbie
  • Posts: 1
Re: Type Library Viewer, Importer, and Editor?
« Reply #1 on: December 04, 2024, 03:12:22 am »
can you share this type library importer source code?

Thaddy

  • Hero Member
  • *****
  • Posts: 16347
  • Censorship about opinions does not belong here.
Re: Type Library Viewer, Importer, and Editor?
« Reply #2 on: December 04, 2024, 08:52:26 am »
Frankly, I do not know. I still use the type library editor(s) from several Delphi versions, mostly because I want to keep Windows code compile on both Delphi and Freepascal. This of course requires sometimes some manual intervention.
I also use vscode for that purpose. Write the idl files.

I would welcome something like the Delphi importer/editor in native Freepascal.
« Last Edit: December 04, 2024, 08:59:50 am by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11985
  • FPC developer.
Re: Type Library Viewer, Importer, and Editor?
« Reply #3 on: December 04, 2024, 09:47:07 am »
Trunk has a importtl typelib importer.

korba812

  • Sr. Member
  • ****
  • Posts: 446
Re: Type Library Viewer, Importer, and Editor?
« Reply #4 on: December 04, 2024, 11:39:38 am »
Trunk has a importtl typelib importer.
Stable release also has this tool although it has some problems, such as #39382.
Lazarus has LazActiveX package, which provides an add-on to IDE with this tool.

As for type library editor, FPC/Lazarus does not have editor like Delphi has. However, in version of Delphi I have (BDS 2006) this editor is extremely buggy and thus useless. So the best type library editor remained Notepad (for creating IDL files).

 

TinyPortal © 2005-2018