For COM,an interface is specific memory structure containing an array of function pointers. Each array, element contains the address of a function implemented by the component.

Ideas

Regisering COM server from owned machiens to do capture, persistence,

https://docs.microsoft.com/en-us/windows/win32/com/com-clients-and-servers

https://opdhsblobprod04-secondary.blob.core.windows.net/contents/672ff4a2a66944e1beedf884979d3bae/0b5851b6fd6b65cef2e7d69c6bebceb3?skoid=2d004ef0-5468-4cd8-a5b7-14c04c6415bc&sktid=975f013f-7f24-47e8-a7d3-abc4752bf346&skt=2022-06-13T04%3A29%3A32Z&ske=2022-06-20T04%3A34%3A32Z&sks=b&skv=2020-10-02&sv=2020-08-04&se=2022-06-16T02%3A20%3A32Z&sr=b&sp=r&sig=PK2e7Jtxet98RcWJ8wfGhsgau0Zh53o4Kb3vZfFMj9c%3D

https://www.youtube.com/watch?v=dfMuzAZRGm4

After a thread has initialized the COM library, it is safe for the thread to use COM interfaces. To use a COM interface, your program first creates an instance of an object that implements that interface.

In general, there are two ways to create a COM object:

The reason why CoCreateInstance is important

https://docs.microsoft.com/en-us/windows/win32/learnwin32/creating-an-object-in-com#cocreateinstance-a-generic-way-to-create-objects

Prior to COM, they were used in DCE/RPC (Distributed Computing Environment/Remote Procedure Call).

The CoCreateInstance

function has five parameters. The first and fourth parameters are the class identifier and interface identifier. In effect, these parameters tell the function, "Create the Shape object, and give me a pointer to the IDrawable interface."

There are two main types of servers, in-process and out-of-process

In-process servers are implemented in a dynamic linked library (DLL), and out-of-process servers are implemented in an executable file (EXE). Out-of-process servers can reside either on the local computer or on a remote computer. In addition, COM provides a mechanism that allows an in-process server (a DLL) to run in a surrogate EXE process to gain the advantage of being able to run the process on a remote computer. For more information, see DLL Surrogates .

Questions