GW2RunSession
    • PDF

    GW2RunSession

    • PDF

    Article Summary

    The GW2RunSession function runs the session, using all the previously registered artifacts.

    Synopsis

    The GW2RunSession function runs session session, using all the previously registered artifacts.

    #include "glasswall.core2.api.h"
    int GW2RunSession(Session session);

    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
        {
            /* ... register other artifacts ... */
            if (GW2RunSession(session) < 0)
                /* error running the session */
        }
    
        /* later */
        if (GW2CloseSession(session) < 0)
            /* error closing session */

    Synopsis

    public int RunSession(int session)

    Returns

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

    Synopsis

    import com.glasswall.core2javabridge.*;
    
    public int GW2RunSession(int session) throws GlasswallException

    Returns

    The GW2RunSession function returns a GW2_RetStatus enumeration converted to int. The value will be negative if an error occurred. 0 or 1 indicates success.

    Please refer to API Overview for Return Types and their details.

    A GlasswallException exception will be thrown if session is invalid.

    Synopsis

    Runs the Glasswall session and begins processing of a file.

    def run_session(self, session):
        """ Runs the Glasswall session and begins processing of a file.
    
        Args:
            session (int): The session to run.
    
        Returns:
            status (int): The status code of the function call.
        """

    Returns

    status (int): The status code of the function call.

    Synopsis

    This function runs the specified session.

    /**
    * @param {number} session The ID of the session to be run.
    */
    
    GW2RunSession(session)

    Returns

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


    Was this article helpful?