Example #1
0
        // called by libcurlshim
        private static CURLIOERR IoctlDelegate(CURLIOCMD cmd,
                                               IntPtr parm)
        {
            GCHandle gch  = (GCHandle)parm;
            Easy     easy = (Easy)gch.Target;

            // let's require all of these to be non-null
            if (easy == null || easy.m_pfIoctl == null ||
                easy.m_ioctlData == null)
            {
                return(CURLIOERR.CURLIOE_UNKNOWNCMD);
            }
            return(easy.m_pfIoctl(cmd, easy.m_ioctlData));
        }