-
Hi I was wondering how did you generated the bindings to all of Windows and such (I found out how later), and so I was wondering if there's a chance for a tutorial on how to take regular COM DLLs and generate a higher level binding through this package or a tool inside the win32 or the related pkg for this usecase |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Great question! In this package, we import Windows metadata (.winmd) and generate Dart bindings from it. The metadata comes from Microsoft as part of this project: https://github.com/microsoft/win32metadata. This format was originally introduced for .NET libraries, and then expanded to support WinRT APIs. As a result, it's not commonly available for other COM libraries, unfortunately. However, there is some good news. This package predates the availability of Windows metadata, so in the early days I had to generate COM bindings by scraping C header files. That code still exists; it's not robust, and I don't intend to support it. But if you have COM header files that match the style of the Windows ones, you can probably use it to generate a binding for your needs. The code is here: https://github.com/timsneath/ffigen_com You're welcome to fork or update it. Good luck! |
Beta Was this translation helpful? Give feedback.
Great question!
In this package, we import Windows metadata (.winmd) and generate Dart bindings from it. The metadata comes from Microsoft as part of this project: https://github.com/microsoft/win32metadata.
This format was originally introduced for .NET libraries, and then expanded to support WinRT APIs. As a result, it's not commonly available for other COM libraries, unfortunately.
However, there is some good news. This package predates the availability of Windows metadata, so in the early days I had to generate COM bindings by scraping C header files. That code still exists; it's not robust, and I don't intend to support it. But if you have COM header files that match the style of the…