Lumaktaw sa pangunahing nilalaman

GW2RegisterInputMemory

Ang function na GW2RegisterInputMemory ay nagrerehistro ng input file na nakaimbak sa memory sa isang session.

Buod

Ang function na GW2RegisterInputMemory ay nagrerehistro ng file na nakaimbak sa buffer na tinutukoy ng inputFileBuffer na may sukat na inputLength bytes, sa session na tinutukoy ng session.

#include "glasswall.core2.api.h"
int GW2RegisterInputMemory(Session session, const char *inputFileBuffer, size_t inputLength);

Ibinabalik

Nagbabalik ng integer na GW2_RetStatus enum value. Ang mga negatibong numero ay nagpapahiwatig ng pagkabigo.

Halimbawa

#include "glasswall.core2.api.h"
...
HANDLE session = GW2OpenSession();
if (!session)
/* deal with error */
else
{
/* ... load file contents into buffer 'buf' and log the file size in 'size' ... */
if (GW2RegisterInputMemory(session, buf, size))
/* deal with error */
else
/* continue processing */
...
}

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