Jump to content

Recommended Posts

  • Moderators
Posted

damian666,

Why would you expect a 7Zip UDF to create normal zip files? ;)

Take a look here if that is what you want. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 1 month later...
Posted

I haven't posted a lot to the forums and am not trying to necro the topic, but saw some things I might put my 2 cents in on.

First, I have no problem creating zip-compatible files using the update or add functions of this UDF, as in they open under WinZip 10 no problem, I believe the key is designating a file with a zip extension.

Second, I have been using the UDF from the below post and the newest custom-built DLL compatible with COM interfaces found at http://www.csdinc.co.jp/archiver/lib/7-zip32.html#download

I would take the time to add more functions to the UDF or design one that uses the standard DLL, but I neither have the time nor the experience necessary at this point.

I would like to fully explore what the DLL can and cannot do as to various formats in the future. I will post here if I find anything further.

Thank you.

Since rasim appears to be gone and he never addressed the issue of using OnAutoItExit in his UDF I took the liberty of rewriting all the functions and adding two of my own, _7ZipStartup() and _7ZipShutdown().

If you use the edited version of the script note that it works slightly different now. The first parameter in each function is now a dll handle followed by the rest of the original parameters.

So it all looks a bit like this.

$7zip = _7ZipStartup()
$extract = _7ZIPExtractEx($7zip,0,"archive.zip","C:pathtoextractionfolder",1)
_7ZipShutdown($7zip)

7Zip.au3

  • 1 month later...
Posted (edited)

took the liberty of rewriting all the functions and adding two of my own, _7ZipStartup() and _7ZipShutdown()

Hooo, I never seen this post until today ... :whistle:

Great idea, but why did you rewrite all the functions ?

it works slightly different now

So, it's not a really good idea !

Why doesn't you make your new functions like TCPStartup and TCPShutdown with 1 or 0 on return? It would have been a much better idea and like that you would not have had to rewrite all the functions. ^^

We can do better, because the function is intended to be integrated and because there is a 64 bit version of the dll, we can manage the fileinstall and the version of the dll by the new _7ZipStartup() function. ;)

If I have the time, I will present my works on it.

Edit : I have play with the UDF, but it seems thats if we use a 7ZipStartup() function, we must rewriting all functions (even those of Delta), because it is necessary to take care about the possibility of the forgetting of the use of startup. In that case if you call a function, you haven't a dll handle, so you have an error ... ^^

Edit 2 : Well, I did my best and I think of having arrived at an UDF more complete with an improved presentation. I have added x64 support and some novelties. Can you test it and give me your impressions?

The archive with UDF, examples and Dlls can be downloaded here (don't forget to read the begining of the UDF to see what's new ^^).

Edited by Tlem

Best Regards.Thierry

Posted (edited)

After one week, no return... It's really frustrating.

I'm surprised that it does not interest more people. Especially 64bit support and an update of the 32 dll that doesn't support some archives. ^^

Edited by Tlem

Best Regards.Thierry

Posted (edited)

Hello UEZ, I doesn't expect support from rasim. The question was for the community. ^^

May be my second edit wasn't clear. I have updated the rasim's UDF to use 64 bit dll and to update de 32 bit dll that doesn't work on some zip archive. I gave the link above to download full UDF updated for testing.

Edited by Tlem

Best Regards.Thierry

Posted

Well Tlem, I did the same thing, wrote an UDF around the latest version of 7-zip32.dll. But I didn't find a 64-bit so thanks for that.

Downloaded your UDF, will be doing some tests soon and let you know. I'll also upload my UDF so that you can check it out.

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Posted

Hello dany. Tanks for your responce.

Just one thing, can you precise what UDF do you talk and where we can find it.

Best Regards.Thierry

Posted

The download link for this UDF isn't working for me. Can someone attach the au3 directly? (...instead of zip files of hyperlinks to broken websites)

Posted

Hello dany. Tanks for your responce.

Just one thing, can you precise what UDF do you talk and where we can find it.

It's on my HD :) haven't released it yet. It's also only using the 32-bit dll, I couldn't find a 64-bit version. I'll try to PM it to you or upload it here if possible.

Thusfar your UDF is working as it should. Tested on Win 7 64-bit and I haven't had any problems with the examples you provided. Nice Job!

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Posted

Hello dany, just to be clear, It's not my UDF. Rasim do it.

I just update some functionality and comments.

I saw your post about using native dll and I'm going to add comment. ;)

Best Regards.Thierry

  • 2 weeks later...
Posted

Hi Tlem, sorry for the long wait.

First here's my edited version of Rasim's original UDF. No testcases and maybe just 5% tested...

7Zip.au3

7ZipConstants.au3

Also thanks for posting in the other thread. I'll address some issues there.

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

  • 1 month later...
Posted

hi Universalist

Nice job

i think there is a small problem with the function _7ZipSetOwnerWindowEx

when i try to use the function together with _7ZipAdd and set $sHide = 1 the progress is shown as a gui ?

  • 4 weeks later...
Posted

Hi Tlem

I have tested nearly all functions and only found one problem until now

Using the example script againt a very big zipped file > 2g and with individual files in the zip file bigger than > 2g

$iFileSize and $iWriteSize return wrong results sometime negative results in the function _ARCHIVERPROC

the error is both at 32 and 64 bit O/S

#include <GuiConstantsEx.au3>

#include <7Zip.au3>

$hGUI = GUICreate("_7ZIPExtractEx demo", 300, 200)

$ctlEdit = GUICtrlCreateEdit("", 10, 10, 280, 100)

$ctlProgress = GUICtrlCreateProgress(10, 130, 280, 20)

$ctlButton_Pack = GUICtrlCreateButton("Unpack!", 10, 167, 75, 23)

$ctlButton_Close = GUICtrlCreateButton("Close", 215, 167, 75, 23)

GUISetState()

$ArcFile = "c:testtest.7z.001"

If @error Then Exit

$sOutput = FileSelectFolder("Select output folder", "", 1, "", $hGUI)

If @error Then Exit

While 1

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE, $ctlButton_Close

Exit

Case $ctlButton_Pack

_7ZipStartup()

$retResult = _7ZipSetOwnerWindowEx($hGUI, "_ARCHIVERPROC")

If $retResult = 0 Then Exit MsgBox(16, "_7ZipAdd demo", "Error occured")

$retResult = _7ZIPExtractEx($hGUI, $ArcFile, $sOutput, 1)

_7ZipShutdown()

If @error = 0 Then

MsgBox(64, "_7ZIPExtractEx demo", "Archive unpacked successfully", 0, $hGUI)

Else

MsgBox(64, "_7ZIPExtractEx demo", "Error occurred", 0, $hGUI)

EndIf

;GUICtrlSetData($ctlProgress, 0)

;GUICtrlSetData($ctlEdit, "")

EndSwitch

WEnd

Func _ARCHIVERPROC($hWnd, $Msg, $nState, $ExInfo)

Local $iFileSize, $iWriteSize, $iPercent = 0

If $nState = 0 Then

Local $EXTRACTINGINFO = DllStructCreate($tagEXTRACTINGINFO, $ExInfo)

GUICtrlSetData($ctlEdit, DllStructGetData($EXTRACTINGINFO, "szSourceFileName") & @CRLF, 1)

$iFileSize = DllStructGetData($EXTRACTINGINFO, "dwFileSize")

$iWriteSize = DllStructGetData($EXTRACTINGINFO, "dwWriteSize")

$iPercent = Int($iWriteSize / $iFileSize * 100)

GUICtrlSetData($ctlProgress, $iPercent)

Return 1

EndIf

If $nState = 2 Then GUICtrlSetData($ctlProgress, 100)

Return 1

EndFunc

Posted

Well, I would say this is not a problem of the UDF, but more of the DLL itself. Looking at the structure, iFileSize and iWriteSize are both returned as a single DWORD each, and afaik this does not allow a representation of larger file sizes... *check*check*google*check*... DWORD max size = 2147483647.

See also this dll api definition here:

http://www.madobe.net/archiver/lib/7-zip32api-en.txt

Posted

Hi Kafu

thanks for your response

i have spend lots of time, looking for a solution.

i now know i have to write another FUNC _ARCHIVERPROC

maybe i can use a combination of DllStructGetData($EXTRACTINGINFO, "szSourceFileName") and _7ZipGetArcOriginalSize

Posted

Hi again

i my program i would like to know if a zipped file is password protected or not

i know the is a Global Const $7ZIP_ATTR_ENCRYPTED but how can i use it in a new function ?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...