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;
}