There are a few ways you can do this. One is call
OpenProcess
and it requires a process identifier as an argument so you have to obtain that first. Generally speaking, that's what needs to happen : you first need get a process identifier and there are a few ways to go about that. If you can locate the process' window then you can get a handle to it and get the ID from that as one option. This page lists the functions available for doing this :
Process and Thread Functions - Win32 apps | Microsoft Docs[
^].