cl_debug() private method

private cl_debug ( ) : void
return void
Exemplo n.º 1
0
        /// <summary>
        /// Creates a new ClamAV engine instance.
        /// </summary>
        /// <param name="debug">Enable verbose ClamAV debug logging.</param>
        public ClamEngine(bool debug)
        {
            // Enable debug mode.
            if (debug)
            {
                UnsafeNativeMethods.cl_debug();
            }

            // Initialize ClamAV library.
            Initialize();

            // Create a new instance of the ClamAV engine.
            _engine = UnsafeNativeMethods.cl_engine_new();

            // Handle an error condition.
            if (_engine == IntPtr.Zero)
            {
                int error = _engine.ToInt32();

                throw new ClamException(error, ErrorString(error));
            }
        }