Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: COM/ActiveX/OLE Help (Read 271 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

COM/ActiveX/OLE Help

Hello. I've been trying unsuccessfully to enable scripting Automation for a component. I believe I have set up most of it, implementing all of the IDispatch and IUnknown interfaces along with the implementation of the available interfaces, the type library and classes and even the registry and the manifest. I cannot get, for example, JSP3 to load it. Whereas JSP3 loads all previously working objects within their respective DLLs (for example, var VUMeter = new ActiveXObject("VUMeter");).

I see that the old version of foo_vis_vumeter.dll from 2013 does this and works. I have it disassembled in Ghidra and can tell that it is only importing/using the following (relevant) functions from Win32: CLSIDFromProgID(), CoInitialize(), CoRegisterClassObject(), CoRevokeClassObject(), CoUnitialize(), IsEqualGUID(), LoadTypeLib(), I've implemented and call those functions where I thought appropriate/equivalent. I've also tried to match the calling parameters for each of these. Other than the type library (TLB) placed under RT_TYPELIB with ID 1 and the use of the functions above, I do not see anything else related to COM/OLE in the disassembly. It also only exports foobar2000_get_interface(), no mention or hint of DllRegisterServer(), DllUnregisterServer(), DllGetClassObject(), DllCanUnloadNow().

Anyone out there have any ideas of what I'm missing or, better yet, a sample implementation of a component I could refer to? Most of the source that I've been able to find implements the other end or seems to assume different contexts. I think I must be missing some fundamental assumption, but unsure what that could be.

Any hints or help would be much appreciated.