tip Posted May 10, 2009 Share Posted May 10, 2009 Hello, all. I'm new here, so please take it easy on me. I've read through this thread from the start and despite a couple mentions on the first page starting with rasim, it isn't clear whether these user-defined functions will work with the latest version of 7za.dll (official 7-Zip Library). Rasim links to a rather ancient discussion of problems with a much older version of the DLL. GEOSoft seems to have had some experience with 7za.dll, but doesn't specify which versions or how long ago he's tried. A much more recent mention of the use of the DLL that I found with a google search seems to confirm some difficulties in its "Known Issues" section, yet further down states the following:Personally, I'm just interested in a more recent version than the one linked in rasim's first post which is over two and a half years old.+1 [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center] Link to comment Share on other sites More sharing options...
plastix Posted June 25, 2009 Share Posted June 25, 2009 hi there this is nice. do you know if it works with the latest 7zip DLL etc? cheers Link to comment Share on other sites More sharing options...
GEOSoft Posted June 25, 2009 Share Posted June 25, 2009 hi therethis is nice. do you know if it works with the latest 7zip DLL etc?cheersNone of my 7Zip functions have required changes with the new version so I would imagine the same applies here. There have been some changes in AutoIt that may have broken something with the UDF but I doubt it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
LoranRendel Posted June 30, 2009 Share Posted June 30, 2009 7Zip.au3 (580) : ==> Subscript used with non-Array variable.: Return $aRet[0] Return $aRet^ ERROR Link to comment Share on other sites More sharing options...
LoranRendel Posted June 30, 2009 Share Posted June 30, 2009 Oh, it was just wrong dll) All OK Link to comment Share on other sites More sharing options...
Andon Posted June 30, 2009 Share Posted June 30, 2009 Hi, I've got that error:D:\temp\7Zip.au3 (744) : ==> Variable used without being declared.:If $hArchiveProc Then DllCallbackFree($hArchiveProc)If ^ ERROR$hArchiveProc is in function OnAutoitExit() in 7Zip.au3 filedll is from hereany ideas? do not beat, I'm new Link to comment Share on other sites More sharing options...
Andon Posted June 30, 2009 Share Posted June 30, 2009 Oh, it was just wrong dll) All OK do not beat, I'm new Link to comment Share on other sites More sharing options...
Spacetech Posted July 18, 2009 Share Posted July 18, 2009 (edited) I found the latest version of the dllThe file 7-zip32.dll is originally created by http://www.madobe.net/archiver/index.htmlThe url with the latest info, download, and source is http://www.csdinc.co.jp/archiver/lib/7-zip32.htmlIf you can't understand the text heres a direct link Edited July 18, 2009 by Spacetech Link to comment Share on other sites More sharing options...
nekkutta Posted August 1, 2009 Share Posted August 1, 2009 I'm having a slight problem, I cannot get a size out of the 7ZipGetArcOriginalSize() function, all it is returning is 0, Am I doing it wrong? could someone try this out on a .zip file and see if it works for them. $hgamearc = _7ZipOpenArchive(0, $sDir & $file) $intFileSize = _7ZipGetArcOriginalSize($hgamearc) _7ZipCloseArchive($hgamearc) [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
lsakizada Posted September 7, 2009 Share Posted September 7, 2009 (edited) Hi,i have an extraction problem. I am using the function _7ZIPExtract to extract zip archive. The extraction done but all files are saved under the main folder, e.g. under "Product" dir bellow. I was expecting to see files under subdirectories extracted under the proper dirs. Whats wrong? $retResult = _7ZIPExtract(0, $Package, $DestPath, 0, 1,1) here is the string that sent to 7-zip32.dll: e "C:\SourcePath\Sources.zip" -o"C:\DestPath\Product" -aos -r EDIT: I just found that the example with the callback function (_7ZIPExtractEx) is working while the simple one not. Edited September 7, 2009 by lsakizada Be Green Now or Never (BGNN)! Link to comment Share on other sites More sharing options...
engine Posted September 26, 2009 Share Posted September 26, 2009 rasimYour UDF has a little problem. It's not advisable to use "OnAutoItExit" inside an UDF.That's because when you also want to use "OnAutoItExit" on a script that also includes an UDF that has its own "OnAutoItExit" function, in that case only one of the "OnAutoItExit" functions will run. This is easy to proove. So its better to DllClose() and DllCallBackFree() for each function. My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url] Link to comment Share on other sites More sharing options...
engine Posted September 26, 2009 Share Posted September 26, 2009 (edited) This is what I propose: 7Zip.au3 There is no need for "OnAutoItExit" now. PS: Thanks for this great UDF. Edited September 26, 2009 by engine My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url] Link to comment Share on other sites More sharing options...
ProgAndy Posted September 26, 2009 Share Posted September 26, 2009 (edited) This is easy to proove. So its better to DllClose() and DllCallBackFree() for each function.There is no need to call thise functions It's a better programming style, but AutoIt does it for us on termination.Function Reference - DllClose : Upon termination, AutoIt automatically closes any dlls it opened but calling DllClose is still a good idea.Function Reference - DllCallbackFree: Upon termination, AutoIt automatically closes any handles it opened but calling DllCallbackFree is still a good idea. Edited September 26, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Nhardel Posted November 12, 2009 Share Posted November 12, 2009 Okay, I must be completely blind. I have read this topic something like 4 times and cant seem to figure out what my problem is. I have downloaded the zip from the first post with the .au3s and have dowloaded the 7_zip.dll that is referenced from the first post. I even renamed the the file 7-zip.dll. I keep getting the same error message C:\Program Files\Special\AutoIt3\Include\7Zip.au3 (744) : ==> Variable used without being declared.: If $hArchiveProc Then DllCallbackFree($hArchiveProc) If ^ ERROR And this is from running the _miscExamples.au3 from the original zip. I see people on here say that they also have had the same issue but then reply back that they had the wrong dll. But other than that no link or mention on where they found the correct .dll Could someone please point me in the right direction. Thanks. Link to comment Share on other sites More sharing options...
Nhardel Posted December 1, 2009 Share Posted December 1, 2009 No one remembers using this wonderful udf. That really sucks. Come on, there has to be someone out there that has the dll that work with this udf Link to comment Share on other sites More sharing options...
PnoT Posted December 17, 2009 Share Posted December 17, 2009 (edited) No one remembers using this wonderful udf. That really sucks. Come on, there has to be someone out there that has the dll that work with this udfI'm having the same issue as you and I have also used the dll in the first post and the 3.0.11 version with no luck.*EDIT* The issue is the 7zip.au3 not being able to find the .dll. You can test this by putting your script, the 7zip.au3, and the .dll in the same folder. Everything works like a charm.The only problem I'm having now is when i compile my script and run it elsewhere it can't find the .dll file even thou I've used "FileInstall" and specified to incorporate it into the .exe. Edited December 17, 2009 by PnoT Link to comment Share on other sites More sharing options...
KaFu Posted December 17, 2009 Share Posted December 17, 2009 (edited) Upsa, just didn't read this thread ... I utilize this function in SMF... I don't know what in detail I changed, but I'm using a custom version 7 ... give it a try. Add this to your main script: Global $hDLL_7ZIP = DllOpen(@Scriptdir & "\7-zip32.dll") ; adjust to respective dll location #include<SMF_Func_7Zip_v07.au3> Edit: Oh, and on Exit call _OnAutoitExit7Zip()SMF_Func_7Zip_v07.zip Edited December 17, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
corgano Posted December 17, 2009 Share Posted December 17, 2009 Upsa, just didn't read this thread ... I utilize this function in SMF... I don't know what in detail I changed, but I'm using a custom version 7 ... give it a try. Add this to your main script: Global $hDLL_7ZIP = DllOpen(@Scriptdir & "\7-zip32.dll") ; adjust to respective dll location #include<SMF_Func_7Zip_v07.au3> Edit: Oh, and on Exit call _OnAutoitExit7Zip() Has anyone thought of useing COM with the built in .zip support? expandcollapse popup_ExtractZip(".zip", "dir\folder") ; #FUNCTION# ;=============================================================================== ; ; Name...........: _ExtractZip ; Description ...: Extracts file/folder from ZIP compressed file ; Syntax.........: _ExtractZip($sZipFile, $sDestinationFolder) ; Parameters ....: $sZipFile - full path to the ZIP file to process ; $sDestinationFolder - folder to extract to. Will be created if it does not exsist exist. ; Return values .: Success - Returns 1 ; - Sets @error to 0 ; Failure - Returns 0 sets @error: ; |1 - Shell Object creation failure ; |2 - Destination folder is unavailable ; |3 - Structure within ZIP file is wrong ; |4 - Specified file/folder to extract not existing ; Author ........: trancexx, modifyed by corgano (to extract all files) ; ;========================================================================================== Func _ExtractZip($sZipFile, $sDestinationFolder, $sFolderStructure = "") Local $i Do $i += 1 $sTempZipFolder = @TempDir & "\Temporary Directory " & $i & " for " & StringRegExpReplace($sZipFile, ".*\\", "") Until Not FileExists($sTempZipFolder) ; this folder will be created during extraction Local $oShell = ObjCreate("Shell.Application") If Not IsObj($oShell) Then Return SetError(1, 0, 0) ; highly unlikely but could happen EndIf Local $oDestinationFolder = $oShell.NameSpace($sDestinationFolder) If Not IsObj($oDestinationFolder) Then DirCreate($sDestinationFolder) ;~ Return SetError(2, 0, 0) ; unavailable destionation location EndIf Local $oOriginFolder = $oShell.NameSpace($sZipFile & "\" & $sFolderStructure) ; FolderStructure is overstatement because of the available depth If Not IsObj($oOriginFolder) Then Return SetError(3, 0, 0) ; unavailable location EndIf Local $oOriginFile = $oOriginFolder.Items();get all items If Not IsObj($oOriginFile) Then Return SetError(4, 0, 0) ; no such file in ZIP file EndIf ; copy content of origin to destination $oDestinationFolder.CopyHere($oOriginFile, 20) ; 20 means 4 and 16, replaces files if asked DirRemove($sTempZipFolder, 1) ; clean temp dir Return 1 ; All OK! EndFunc 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
PnoT Posted December 17, 2009 Share Posted December 17, 2009 (edited) Upsa, just didn't read this thread ... I utilize this function in SMF... I don't know what in detail I changed, but I'm using a custom version 7 ... give it a try. Add this to your main script: Global $hDLL_7ZIP = DllOpen(@Scriptdir & "\7-zip32.dll") ; adjust to respective dll location #include<SMF_Func_7Zip_v07.au3> Edit: Oh, and on Exit call _OnAutoitExit7Zip() This is exactly how the original script is setup. I have it running right now but I want to know if there is a way to incorporate the actual 7-zip32.dll file into the compiled exe and have it run. The compiled exe will only work if the .dll is in the proper location on the target machine. Edited December 17, 2009 by PnoT Link to comment Share on other sites More sharing options...
KaFu Posted December 18, 2009 Share Posted December 18, 2009 Use Fileinstall() or try this execellent post Embed DLLs in script and call functions from memory by Ward... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now