Skip to main content
Version: 16.8.2

GW2RegisterAnalysisMemory

The GW2RegisterAnalysisMemory registers the memory location to store a analysis report to a session. Using this function activates the Analysis Process for the Session.

Synopsis

The GW2RegisterAnalysisMemory function stores in the object pointed to by analysisFileBuffer a pointer to the analysis report produced by a successful run of API function runSession that used session session. The size of the analysis report, in bytes, is placed in the object pointed to by analysisLength. The format of the analysis report will be in the format requested by format. Using this function activates the Analysis Process Mode for the session.


#include "glasswall.core2.api.h"

int GW2RegisterAnalysisMemory(Session session,
char **analysisFileBuffer,
size_t analysisLength,
Analysis_format format);

Returns

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

Example


#include "glasswall.core2.api.h"

Session_Handle session;
char *analysisReport = NULL;
size_t analysisReportSize = 0;

session = GW2OpenSession();

if (!session)
/* deal with error */
else
{
if (GW2RegisterAnalysisMemory(session, &analysisReport, &analysisReportSize, PF_XML) < 0)
/* deal with error */
else
/* analysisReport points to the analysis report data */
}

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