Jump to content











Photo
- - - - -

WofCompress tool for Win7 - Win10

compress native compression xpress4k xpress8k xpress16k lzx

  • Please log in to reply
58 replies to this topic

#51 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 11 May 2019 - 08:29 PM

it may be that the handle (from createfile) is never "freed".

i would add a closehandle at the end of each function : 

_WinAPI_CloseHandle($hFile) 

that may fix this issue as one should normally always close a previous opened handle.

 

if not, i'll test it all in one function.

 

https://www.autoitsc...CloseHandle.htm

 

EDIT : i will edit/fix the previous posts.

 

Good solution  :)

Everything working now OK also when Functions are combined

 

Thanks a lot for your help. I will implement your code in the next version of WOF_Compress.

 

:cheers:



#52 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 11 May 2019 - 08:33 PM

Good solution  :)

Everything working now OK also when Functions are combined

 

:cheers:

 

Great!

You might be able to do so that you are no longer depending on wofcompress.exe now.



#53 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 11 May 2019 - 08:45 PM

Great!

You might be able to do so that you are no longer depending on wofcompress.exe now.

 

That would be nice, but for the moment WofCompress.exe gives good info during progress and takes Exclusion list into account ....

 

Some work to be done ....



#54 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 11 May 2019 - 08:56 PM

For the exclusion list, i am 99% convinced this is the API doing so.

I have been working with wim api's in the past and i kinda remember it was managed automatically by the API.

You "only" need to stuff the ini file (in UTF-8 format?) in the same folder as the exe (or system32?).

 

About the progress, you probably refer to the folder case where indeed the binary recurses thru files and folders.

That you would have to code as well in autoit.



#55 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 12 May 2019 - 09:05 AM

WOF_Compress Version 2.0 is on line - Download encrypted with password = bootwimb

 

Credits and Thanks to  :) 
 
erwan.l for making the Core of WOF_Compress being Function  _Wof_Status_  and  _Wof_Uncompress_  and  _Wof_Compress_
 
:cheers:
 

 



#56 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 12 May 2019 - 11:11 AM

it crashes (BSOD) on my wife's asus transformer T100 (uefi gpt). let me try it on my rig as well and I'll tell u about it.

nino



#57 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 12 May 2019 - 11:17 AM

well, it works ok on mine.

nino



#58 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 12 May 2019 - 12:31 PM

slightly updated updated _Wof_Status_ function.

deviceiocontrol expects a pointer, lets give it one to avoid memory leak, etc.

Func _Wof_Status_($sFilePath)
; we could/should create a more meaningful structure but hey, who cares :)
; i know it is 20 bytes because i counted them all on my fingers
Local $outbuffer=DllStructCreate("char[20]")
Local $hFile
Local $IReS
$hFile=_WinAPI_CreateFile ( $sFilePath,2, 2 )
Local $poutbuffer=DllStructGetPtr($outbuffer)
$IReS =_WinAPI_DeviceIoControl ( $hFile, $FSCTL_GET_EXTERNAL_BACKING , 0 , 0 , $poutbuffer ,  20 )
;the return code is what we care about : 1 means compressed, 0 means not compressed
MsgBox(64, "ok", $IReS)
_WinAPI_CloseHandle($hFile)
EndFunc

  • wimb likes this

#59 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 12 May 2019 - 01:17 PM

Thanks Erwan for the Update, I will make changes accordingly in the next version.





Also tagged with one or more of these keywords: compress, native compression, xpress4k, xpress8k, xpress16k, lzx

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users