GW2DetermineFileTypeAndReport
    • PDF

    GW2DetermineFileTypeAndReport

    • PDF

    Article summary

    The GW2DetermineFileTypeAndReport function determines the file type for a given file and produces a report. This is not related to a session.

    Synopsis

    #include "glasswall.core2.api.h"
    GW2DetermineFileTypeAndReport(const char *inputFileBuffer, size_t inputLength, const char *report)

    Not supported in C#

    Synopsis

    public int GW2DetermineFileTypeAndReport(byte[] fileBuffer, String reportFilePath) throws GlasswallException, NullPointerException
    public int GW2DetermineFileTypeAndReport(byte[] fileBuffer, int length, String reportFilePath) throws GlasswallException, NullPointerException

    Description

    The GW2DetermineFileTypeAndReport function determines the file type of the file held in the byte array fileBuffer and writes out a summary XML report to the path specified in reportFilePath. The length of the fileBuffer may optionally be specified.

    Returns

    The GW2DetermineFileTypeAndReport function returns an integer indicating the determined file type. A list of the enumeration constants is in the C source header file filetypes.h. A return value of 0 indicates the file type can't be determined.

    If successful, an XML report will be written to the path specified in reportFilePath.

    A NullPointerException exception will be thrown if fileBuffer or reportFilePath buffers are null or empty.

    A GlasswallException exception will be thrown if fileBuffer cannot be retrieved, or if the reportFilePath could not be converted to UTF-8.

    Not supported in Python

    Not supported in Javascript


    Was this article helpful?