Sm_PolicyApi_GetTrustedHostByName()

Retrieves an existing trusted host object.
sm1252sp1
Retrieves an existing trusted host object.
Type
Agent configuration function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_GetTrustedHostByName (
void*pSessionHandle,
const char* pszTrustedHostName,
Sm_PolicyApi_TrustedHost_t**ppstructTrustedHost
);
Parameter
I/O
Description
pSessionHandle
I
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
pszTrustedHostName
I
Unique name of the trusted host object to retrieve.
ppstructTrustedHost
O
Address of a pointer to a structure that defines the trusted host object. The function allocates the structure.
Returns
  • Sm_PolicyApi_Success. The get operation was successful.
  • Sm_PolicyApi_Failure. Generalized failure.
  • Sm_PolicyApi_NotFound. The unique name does not correspond to a trusted host object.
  • Sm_PolicyApi_NoPrivilege. The caller does not have the privilege to get a trusted host object.
  • Sm_PolicyApi_InvalidHandle. The session pointer is not valid.
  • Sm_PolicyApi_NoSession. The API user is not properly logged in.