c++ com controlling

Hello.
I am learning how to use automation through com controlling.


How can I connect to a running instance of the program?


I can create Application app("CorelDraw.Application), I also manage to create ApplicationPtr app(CorelDraw.Application)
But, at the same time, if several versions are installed on the computer, then the one that is found first in the registry list is launched.
I would not want to unambiguously define the version number to which to connect.
How can I connect to the instance of the application that is currently running.


Can transfer to the dll any parameter (ID) received by the macro in the current instance?
Or you can use the function FindWindows(CorelDraw)?

Thank you.