SeasideResearch.LibCurlNet.Easy.DebugDelegate C# (CSharp) Method

DebugDelegate() private static method

private static DebugDelegate ( CURLINFOTYPE infoType, IntPtr msgBuf, int msgBufSize, IntPtr parm ) : int
infoType CURLINFOTYPE
msgBuf System.IntPtr
msgBufSize int
parm System.IntPtr
return int
        private static int DebugDelegate(CURLINFOTYPE infoType,
            IntPtr msgBuf, int msgBufSize, IntPtr parm)
        {
            GCHandle gch = (GCHandle)parm;
            Easy easy = (Easy)gch.Target;
            if (easy == null)
                return 0;
            if (easy.m_pfDebug == null)
                return 0;
            String message = Marshal.PtrToStringAnsi(msgBuf, msgBufSize);
            easy.m_pfDebug(infoType, message, easy.m_debugData);
            return 0;
        }