MprAdminIsServiceInitialized function (mprapi.h)

The MprAdminIsServiceInitialized function checks whether the RRAS service is running on a specified server if the calling process has access.

Syntax

DWORD MprAdminIsServiceInitialized(
  [in] LPWSTR lpwsServerName,
  [in] BOOL   *fIsServiceInitialized
);

Parameters

[in] lpwsServerName

A pointer to a null-terminated Unicode string that specifies the name of the server to query. If this parameter is NULL, the function queries the local machine.

[in] fIsServiceInitialized

On output, a pointer to a BOOL that specifies whether the RRAS service is running on the server in lpwsServerName:

Value Meaning
TRUE
The service is running on the specified server.
FALSE
The service is not running on the specified server and/or the calling process does not have access to the RRAS service.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_INVALID_PARAMETER
The fIsServiceInitialized parameter is NULL.
ERROR_SERVICE_NOT_ACTIVE
The RRAS service is not running on the server.
ERROR_ACCESS_DENIED
The calling application does not have sufficient privileges.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header mprapi.h
Library Mprapi.lib
DLL Mprapi.dll

See also

MprAdminIsServiceRunning

MprConfigBufferFree

Router Administration Functions

Router Management Reference