The HrGetServiceAccountName function obtains the account name for a service.
Header file: | EXCHINST.H |
Library: | EXCHINST.LIB |
HRESULT HrGetServiceAccountName(
LPSTR lpszServiceName,
LPSTR * lppszAccountName
);
The account name has the following format:
DomainName\UserName
If the returned value is .\UserName, the account belongs to the built-in domain. If the returned value is NULL, the service is logged in under the LocalSystem account.
See Return Values.
HrGetServiceCommonName, HrGetServiceDisplayName, HrGetServiceExecutableName, HrGetServiceObjectGUID, HrGetServiceProductGUID, HrGetServiceServerName, HrGetServiceSiteDN