예제 #1
0
        public static BINDINFO GetBindInfo(IInternetBindInfo pOIBindInfo)
        {
            BINDINFO BindInfo = new BINDINFO();

            BindInfo.cbSize = (UInt32)Marshal.SizeOf(typeof(BINDINFO));
            UInt32 AsyncFlag;

            pOIBindInfo.GetBindInfo(out AsyncFlag, ref BindInfo);
            return(BindInfo);
        }
예제 #2
0
        private int Start(string szUrl, IInternetProtocolSink protocolSink, IInternetBindInfo bindInfo, PI_FLAGS grfPI, uint dwReserved)
        {
            ClearData();

            currentProtocolSink = protocolSink;
            currentUrl          = szUrl;

            BINDINFO bindInfoData = new BINDINFO();

            bindInfoData.cbSize = (uint)Marshal.SizeOf(bindInfoData);
            bindInfo.GetBindInfo(out currentBindFlags, ref bindInfoData);

            if ((grfPI & PI_FLAGS.PI_FORCE_ASYNC) != 0)
            {
                PROTOCOLDATA protocolData = new PROTOCOLDATA();
                protocolData.grfFlags = PI_FLAGS.PI_FORCE_ASYNC;
                protocolSink.Switch(ref protocolData);
                return(NativeConstants.E_PENDING);
            }
            else
            {
                return(DoBind());
            }
        }
        private int Start(string szUrl, IInternetProtocolSink protocolSink, IInternetBindInfo bindInfo, PI_FLAGS grfPI, uint dwReserved)
        {
            ClearData();

            currentProtocolSink = protocolSink;
            currentUrl = szUrl;

            BINDINFO bindInfoData = new BINDINFO();
            bindInfoData.cbSize = (uint)Marshal.SizeOf(bindInfoData);
            bindInfo.GetBindInfo(out currentBindFlags, ref bindInfoData);

            if ((grfPI & PI_FLAGS.PI_FORCE_ASYNC) != 0)
            {
                PROTOCOLDATA protocolData = new PROTOCOLDATA();
                protocolData.grfFlags = PI_FLAGS.PI_FORCE_ASYNC;
                protocolSink.Switch(ref protocolData);
                return NativeConstants.E_PENDING;
            }
            else
            {
                return DoBind();
            }
        }
 private BINDINFO GetBindInfo(IInternetBindInfo pOIBindInfo)
 {
     BINDINFO BindInfo = new BINDINFO();
       BindInfo.cbSize = (UInt32) Marshal.SizeOf (typeof (BINDINFO));
       UInt32 AsyncFlag;
       pOIBindInfo.GetBindInfo (out AsyncFlag, ref BindInfo);
       return BindInfo;
 }