Skip to main content
Version: 16.8.2

GW2GetPolicySettings

The GW2GetPolicySettings function provides a string corresponding to the contents of the policy settings file associated with the supplied session.


#include "glasswall.core2.api.h"

int GW2GetPolicySettings (
Session session,
char **policiesBuffer,
size_t *policiesLength,
Policy_format format);

Parameters

session The ID of the session as returned by GW2OpenSession

policiesBuffer A string pointer output parameter which is populated with the policy settings information. The memory used by this pointer does not need to be freed by the user. In the event of a failure this parameter may be set to nullptr.

policiesLength An output parameter which is populated with the size in bytes of the memory pointed to by policiesBuffer

format The format of the data. This must be PF_XML.

Returns

  Returns an integer indicating whether the function call was successful. Negative numbers indicate a failure. See the Return Types table for an explanation of the return codes.