/*!
@method QueryInterface
@abstract The IUnknown method for finding an interface on a CFPlugIn type.
@param self
The CFPlugIn type to query.
@param uuid
The UUID of the interface to find.
@param interface
The returned interface or NULL if none was found.
@result An error code indicating success of failure.
*/
HRESULT
(STDMETHODCALLTYPE *QueryInterface)( void* self,
REFIID uuid,
LPVOID* interface);
The API of a COM object is described in a Type Library file (.tlb suffix).
This is is not necessarily available for every COM object.
COM objects intended for use with C++ work without it, because the COM interface is based on calling C++ virtual functions, for which you just need a declaration from a header file.
To discover the API of a COM object without the .idl file or type library, you have to do binary reverse engineering: disassemble the functions linked into the object's vtable.
Don’t forget about the proxy/stub DLLs: if the COM interface was specified using IDL, its metadata is also encoded inside those using a more descriptive format than typelibs.
Modern COM (UWP) uses .NET metadata and is stored in .winmd files.
C#, VB.NET, JS(Chakra), C++/CX can use them directly, while with C++/WinRT a source file generator was introduced that generates the necessary boilerplate to access the objects in a C++17 friendly way.
Microsoft now calls to COM libraries without type libraries, like DirectX, mini-COM.
12 comments
[ 2.8 ms ] story [ 35.0 ms ] threadApple's CoreMediaIO CFPlugIn video capture device plugin interface!
https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10...
[...] BUSTED!https://github.com/lvsti/CoreMediaIO-DAL-Example/blob/0392cb...
[0] https://developer.apple.com/library/archive/documentation/Co...
This is is not necessarily available for every COM object.
COM objects intended for use with C++ work without it, because the COM interface is based on calling C++ virtual functions, for which you just need a declaration from a header file.
To discover the API of a COM object without the .idl file or type library, you have to do binary reverse engineering: disassemble the functions linked into the object's vtable.
Modern COM (UWP) uses .NET metadata and is stored in .winmd files.
C#, VB.NET, JS(Chakra), C++/CX can use them directly, while with C++/WinRT a source file generator was introduced that generates the necessary boilerplate to access the objects in a C++17 friendly way.
Microsoft now calls to COM libraries without type libraries, like DirectX, mini-COM.
You can take a look at the following software (including source code):
RemoteBridge: https://www.nektra.com/products/remotebridge-automation-engi...
Deviare: https://www.nektra.com/products/deviare-api-hook-windows/