Exemplo n.º 1
0
//UPGRADE_WARNING: Structure UZPVER may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="C429C3A5-5D47-4CD9-8F51-74A1616405DC"'
        private static extern void UzpVersion2(ref UZPVER uzpv);
Exemplo n.º 2
0
        public static int VBUnzip(ref object sZipFileName, ref string sUnzipDirectory, ref short iExtractNewer, ref short iSpaceUnderScore, ref short iPromptOverwrite, ref short iQuiet, ref short iWriteStdOut, ref short iTestZip, ref short iExtractList, ref short iExtractOnlyNewer,
                                  ref short iDisplayComment, ref short iHonorDirectories, ref short iOverwriteFiles, ref short iConvertCR_CRLF, ref short iVerbose, ref short iCaseSensitivty, ref short iPrivilege)
        {
            int functionReturnValue = 0;


            // ERROR: Not supported in C#: OnErrorStatement



            int lRet = 0;

            DCLIST       UZDCL  = default(DCLIST);
            USERFUNCTION UZUSER = default(USERFUNCTION);
            //UPGRADE_WARNING: Arrays in structure UZVER may need to be initialized before they can be used. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"'
            UZPVER UZVER = default(UZPVER);
            //UPGRADE_WARNING: Arrays in structure uExcludeNames may need to be initialized before they can be used. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"'
            UNZIPnames uExcludeNames = default(UNZIPnames);
            //UPGRADE_WARNING: Arrays in structure uZipNames may need to be initialized before they can be used. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"'
            UNZIPnames uZipNames = default(UNZIPnames);

            msOutput = "";

            uExcludeNames.uzFiles[0] = Constants.vbNullString;
            uZipNames.uzFiles[0]     = Constants.vbNullString;

            uZipNumber  = 0;
            uZipMessage = Constants.vbNullString;
            uZipInfo    = Constants.vbNullString;
            uVBSkip     = 0;

            var _with1 = UZDCL;

            _with1.ExtractOnlyNewer  = iExtractOnlyNewer;
            _with1.SpaceToUnderScore = iSpaceUnderScore;
            _with1.PromptToOverwrite = iPromptOverwrite;
            _with1.fQuiet            = iQuiet;
            _with1.ncflag            = iWriteStdOut;
            _with1.ntflag            = iTestZip;
            _with1.nvflag            = iExtractList;
            _with1.nUflag            = iExtractNewer;
            _with1.nzflag            = iDisplayComment;
            _with1.ndflag            = iHonorDirectories;
            _with1.noflag            = iOverwriteFiles;
            _with1.naflag            = iConvertCR_CRLF;
            _with1.nZIflag           = iVerbose;
            _with1.C_flag            = iCaseSensitivty;
            _with1.fPrivilege        = iPrivilege;
            //UPGRADE_WARNING: Couldn't resolve default property of object sZipFileName. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            _with1.Zip        = sZipFileName;
            _with1.ExtractDir = sUnzipDirectory;

            var _with2 = UZUSER;

            //UPGRADE_WARNING: Add a delegate for AddressOf UZDLLPrnt Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="E9E157F7-EF0C-4016-87B7-7D7FBBC6EE08"'
            //.UZDLLPrnt = FnPtr(AddressOf UZDLLPrnt)
            _with2.UZDLLSND = 0;
            //UPGRADE_WARNING: Add a delegate for AddressOf UZDLLRep Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="E9E157F7-EF0C-4016-87B7-7D7FBBC6EE08"'
            //.UZDLLREPLACE = FnPtr(AddressOf UZDLLRep)
            //UPGRADE_WARNING: Add a delegate for AddressOf UZDLLPass Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="E9E157F7-EF0C-4016-87B7-7D7FBBC6EE08"'
            //.UZDLLPASSWORD = FnPtr(AddressOf UZDLLPass)
            //UPGRADE_WARNING: Add a delegate for AddressOf UZReceiveDLLMessage Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="E9E157F7-EF0C-4016-87B7-7D7FBBC6EE08"'
            //.UZDLLMESSAGE = FnPtr(AddressOf UZReceiveDLLMessage)
            //UPGRADE_WARNING: Add a delegate for AddressOf UZDLLServ Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="E9E157F7-EF0C-4016-87B7-7D7FBBC6EE08"'
            //.UZDLLSERVICE = FnPtr(AddressOf UZDLLServ)

            var _with3 = UZVER;

            _with3.structlen    = Strings.Len(UZVER);
            _with3.beta         = Strings.Space(9) + Constants.vbNullChar;
            _with3.date_Renamed = Strings.Space(19) + Constants.vbNullChar;
            _with3.zlib         = Strings.Space(9) + Constants.vbNullChar;

            UzpVersion2(ref UZVER);

            lRet = Wiz_SingleEntryUnzip(0, ref uZipNames, 0, ref uExcludeNames, ref UZDCL, ref UZUSER);
            functionReturnValue = lRet;
            return(functionReturnValue);

vbErrorHandler:



            Err().Raise(Err().Number, "CodeModule::VBUnzip", Err().Description);
            return(functionReturnValue);
        }
Exemplo n.º 3
0
 private static extern void UzpVersion2(ref UZPVER uzpv);