Esempio n. 1
0
        //The zip32.dll passes activity messages to the declared byte array.  Decode
        //the byte array to see the message
        protected int ZDLLPrint(ref ZipCBChar msg, uint x)
        {
            string s = string.Empty;

            if (msg.ch[0] == 0)
            {
                return(0);
            }
            s = m_Ascii.GetString(msg.ch, 0, (int)x);

            //Raise this event
            ZipDLLPrintMessageEventArgs e = new ZipDLLPrintMessageEventArgs(s);

            OnReceivePrintMessage(e);

            return(0);
        }
Esempio n. 2
0
        protected short ZDLLPassword(ref ZipCBChar p, int n, ref ZipCBChar m, ref ZipCBChar name)
        {
            if (m_Password == null | m_Password == string.Empty)
            {
                return(1);
            }

            //clear the byte array
            for (int i = 0; i <= n - 1; i++)
            {
                p.ch[i] = 0;
            }

            m_Ascii.GetBytes(m_Password, 0, m_Password.Length, p.ch, 0);

            return(0);
        }
Esempio n. 3
0
        protected short ZDLLComment(ref ZipCBChar msg)
        {
            if (m_Comment == null | m_Comment == string.Empty)
            {
                return(1);
            }

            //clear the byte array
            for (int i = 0; i <= msg.ch.Length - 1; i++)
            {
                msg.ch[i] = 0;
            }

            //set the comment in the zip file
            m_Ascii.GetBytes(m_Comment, 0, m_Comment.Length, msg.ch, 0);

            return(0);
        }
Esempio n. 4
0
        /*
         * DLLSERVICE *ServCallBk  = Callback function designed to be used for
         *        allowing the application to process Windows messages,
         *        or canceling the operation, as well as giving the
         *        option of a progress indicator. If this function
         *        returns a non-zero value, then it will terminate
         *        what it is doing. It provides the application with
         *        the name of the name of the archive member it has
         *        just processed, as well as it's original size.
         *
         * msg.ch = the name of the file being zipped
         * x = The size of the file being zipped
         *
         * */
        protected int ZDLLService(ref ZipCBChar msg, uint x)
        {
            string s = string.Empty;
            int    i = 0;

            for (i = 0; i <= msg.ch.Length; i++)
            {
                if (msg.ch[i] == 0)
                {
                    break;
                }
            }
            s = m_Ascii.GetString(msg.ch, 0, i);

            //Raise this event
            ZipDLLServiceMessageEventArgs e = new ZipDLLServiceMessageEventArgs(s, (int)x);

            OnReceiveServiceMessage(e);

            return(m_Stop);
        }
Esempio n. 5
0
        /*
        DLLSERVICE *ServCallBk  = Callback function designed to be used for
                          allowing the application to process Windows messages,
                          or canceling the operation, as well as giving the
                          option of a progress indicator. If this function
                          returns a non-zero value, then it will terminate
                          what it is doing. It provides the application with
                          the name of the name of the archive member it has
                          just processed, as well as it's original size.

        msg.ch = the name of the file being zipped
        x = The size of the file being zipped

         * */
        protected int ZDLLService(ref ZipCBChar msg, uint x)
        {
            string s = string.Empty;
            int i = 0;

            for (i = 0; i <= msg.ch.Length; i ++)
                if (msg.ch[i] == 0) break;
             s = m_Ascii.GetString(msg.ch,0,i);

            //Raise this event
            ZipDLLServiceMessageEventArgs e = new ZipDLLServiceMessageEventArgs(s, (int)x);
            OnReceiveServiceMessage (e);

            return m_Stop;
        }
Esempio n. 6
0
        //The zip32.dll passes activity messages to the declared byte array.  Decode
        //the byte array to see the message
        protected int ZDLLPrint(ref ZipCBChar msg, uint x)
        {
            string s = string.Empty;

            if (msg.ch[0] == 0) return 0;
            s = m_Ascii.GetString(msg.ch,0, (int)x);

            //Raise this event
            ZipDLLPrintMessageEventArgs e = new ZipDLLPrintMessageEventArgs(s);
            OnReceivePrintMessage(e);

            return 0;
        }
Esempio n. 7
0
        protected short ZDLLPassword(ref ZipCBChar p, int n, ref ZipCBChar m, ref ZipCBChar name)
        {
            if (m_Password == null | m_Password == string.Empty) return 1;

            //clear the byte array
            for (int i = 0; i <= n-1; i ++)
                p.ch[i] = 0;

            m_Ascii.GetBytes(m_Password, 0, m_Password.Length, p.ch, 0);

            return 0;
        }
Esempio n. 8
0
        protected short ZDLLComment(ref ZipCBChar msg)
        {
            if (m_Comment == null | m_Comment == string.Empty) return 1;

            //clear the byte array
            for (int i = 0; i <= msg.ch.Length-1; i ++)
                msg.ch[i] = 0;

            //set the comment in the zip file
            m_Ascii.GetBytes(m_Comment, 0, m_Comment.Length, msg.ch, 0);

            return 0;
        }