Rex, that may be easy. The SERVICE_STATUS_PROCESS struct filled by QueryServiceStatusEx() contains the member
SERVICE_STATUS_PROCESS::dwProcessId.
I figure you already have that filled struct hanging around.
SERVICE_STATUS_PROCESS::dwProcessId.
I figure you already have that filled struct hanging around.