Skip to main content
Version: 16.8.2

GW2RegisterOutFile

The GW2RegisterOutFile function registers the destination for the managed file produced by Glasswall. Using this function activates the Manage & Protect Process Mode for the session.

Synopsis

For session session the GW2RegisterOutFile function registers the file whose name is the string pointed to by outputFileBuffer as the destination file for the managed file produced by Glasswall. The base name of the path must be different to the base name registered using the GW2RegisterInputFile function. Using this function activates the Manage & Protect Process Mode for the session.


#include "glasswall.core2.api.h"
int GW2RegisterOutFile(Session session, const char *outputFilePath);

Returns

Returns an integer GW2_RetStatus enum value. Negative numbers indicate a failure.

Example


#include "glasswall.core2.api.h"

HANDLE session = GW2OpenSession();
if (!session)
/* deal with error */
else
{
if (GW2RegisterOutFile(session, "managed_file.docx") < 0)
/* deal with error */
else
/* continue processing */
...
}

/* later */
if (GW2CloseSession(session) < 0)
/* error closing session */