| ▲ | bri3d 3 days ago | ||||||||||||||||||||||||||||||||||||||||||||||
This is quite interesting: it's easy to blame the use of LLM to find the interface, but really this is a matter of needing to understand the COM calling conventions in order to interact with it. I found the interface and a C++ sample in about two minutes of GitHub searching: https://github.com/microsoft/SampleNativeCOMAddin/blob/5512e... https://github.com/microsoft/SampleNativeCOMAddin/blob/5512e... but I don't actually think this would have helped the Rust implementation; the authors already knew they wanted a BSTR and a BSTR*, they just didn't understand the COM conventions for BSTR ownership. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | vintagedave 2 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Every time I read an article on someone understanding COM from interfaces and dispatching, I think: reinventing Delphi, badly. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | bigstrat2003 3 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||
> it's easy to blame the use of LLM to find the interface, but really this is a matter of needing to understand the COM calling conventions in order to interact with it. Sure, but I think that this perfectly illustrates why LLMs are not good at programming (and may well never get good): they don't actually understand anything. An LLM is fundamentally incapable of going "this is COM so let me make sure that the function signature matches the calling conventions", it just generates something based on the code it has seen before. I don't blame the authors for reaching for an LLM given that Microsoft has removed the C++ example code (seriously, what's up with that nonsense?). But it does very nicely highlight why LLMs are such a bad tool. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||