Sign in to follow this  
Followers 0
Decipher

7-Zip UDF using MemoryDLL UDF

2 posts in this topic

I updated the UDF by Patric Pendelin to use the MemoryDLL UDF.

There are only two new functions: _SevenZip_Load & _SevenZip_Free

The first function must be called before using any other functions included in the UDF and the other should be called to free memory when the UDF is no longer needed!

The size of binary from the module was excessive so I used the ZLMA UDF to compress it. It will be decompressed at run time before its loaded into memory.

The only advantage of using this UDF is that it removes the need to included any DLLs in your script.

A lot of functions haven't been added yet! :(

For those that dare: The API for the 7-Zip32.dll module is included in the attachment.

These functions work in the same way you would you use the standalone 7za.exe executable so the Help.chm file applies to these functions aswell.

Thats it, Enjoy! ;)

The code below is a sneak peak at the actually UDF, meaning it dosen't work without the other includes and the embed binary. - Download the attachment. :idea:

#include-once
#include "MemoryDLL.au3"
#include "LZMA.au3"
Global $__7ZIPDLL = Default, $__7ZIPINIT = False

#cs ===============================================================================
    Name:       7-Zip.au3
    Version:    1.0
    Datum:      08.07.2008

    Author: Patric Pendelin eMail: <patric.pendelin (a) gmx.de>
    Modified By: Decipher

    Script Function:

     _SevenZip_Load()
     _SevenZip_Extract($s_Archive, $s_Out="", $s_Pass="", $szCmdLine="", $s_Overwrite="", $hwnd=0, $szOutput="NULL", $dwSize=0) Extracts files from an archive
     _SevenZip_Add($s_Archive, $s_Out = "", $s_Typ = "7z32", $i_Comp = 5, $s_Pass = "", $szCmdLine = "", $hwnd = 0, $szOutput = "NULL", $dwSize = 0) Add files to an archive
     _SevenZip_GetVersion() Get 7_zip32.dll Version
     _SevenZip_GetRunning()
     _SevenZip_CheckArchive($s_Archive, $i_iMode = 0)
     _SevenZip_GetArchiveType($s_Archive)
     _SevenZip_GetFileCount($s_Archive)
     _SevenZip_GetUDFVersion() Returns UDF version number
     _SevenZip_Free()
#ce ===============================================================================

Func _SevenZip_Load()
    If Not $__7ZIPINIT Then
        $__7ZIPDLL = MemoryDllOpen(__7ZIPBIN())
        $__7ZIPINIT = True
    EndIf
EndFunc

Func _SevenZip_Free()
    If $__7ZIPINIT Then
        MemoryDllClose($__7ZIPDLL)
        $__7ZIPINIT = False
        $__7ZIPDLL = Default
    EndIf
EndFunc

;===============================================================================
; Function Name:     _SevenZip_Extract
; Description:      Extracts files from an archive
;
; Parameter(s):     $s_Archive:     Fullpath to Archive-File
;                   $s_Out:         Specifies a destination directory where files are to be extracted. (Def. "")
;                   $s_Pass:        Specifies password. (Def. "")
;                   $szCmdLine:     Command Line Commands. (Def. "")
;                   $s_Overwrite:   Specifies the overwrite mode during extraction, to overwrite files already present on disk. (Def. "")
;                               -1: Overwrite All existing files without prompt.
;                               -2: Skip extracting of existing files.
;                               -3: aUto rename extracting file (for example, name.txt will be renamed to name_1.txt).
;                               -4: auto rename existing file (for example, name.txt will be renamed to name_1.txt).
;                   $hwnd:          The window handle of the application which calls 7-zip32.dll. (Def. 0)
;                   $szOutput:      The buffer because 7-zip32.dll returns the result. (Def. "NULL")
;                   $dwSize:        Größe des Puffers. When the result exceeds designated size, it is economized in this size.
;                                   If size is 1 or more, always NULL letter is added lastly.   (Def. 0)
;
; Syntax:            _SevenZip_Extract($s_Archive, $s_Out="", $s_Pass="", $szCmdLine="", $s_Overwrite="", $hwnd=0, $szOutput="NULL", $dwSize=0)
; Return Value(s):      On Success -Return 1
;                                   On Failure -@error
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_Extract($s_Archive, $s_Out = "", $s_Pass = "", $szCmdLine = "", $s_Overwrite = "", $hwnd = 0, $szOutput = "NULL", $dwSize = 0)
    ; Set Output directory
    If $s_Out = "" Then
        Local $as_Res = StringSplit($s_Archive, "\")
        For $i = 1 To $as_Res[0] - 1
            $s_Out &= $as_Res[$i] & "\"
        Next
    EndIf
    ; (Overwrite mode) switch:
    If $s_Overwrite = 1 Then
        $s_Overwrite = "-aoa"; Overwrite All existing files without prompt.
    ElseIf $s_Overwrite = 2 Then
        $s_Overwrite = "-aos"; Skip extracting of existing files.
    ElseIf $s_Overwrite = 3 Then
        $s_Overwrite = "-aou"; Auto rename extracting file (for example, name.txt will be renamed to name_1.txt).
    ElseIf $s_Overwrite = 4 Then
        $s_Overwrite = "-aot"; Auto rename existing file (for example, name.txt will be renamed to name_1.txt).
    EndIf
    If $szCmdLine = "" Then $szCmdLine = ' x "' & $s_Archive & '" ' & $s_Overwrite & ' -o"' & $s_Out & '" -p"' & $s_Pass & '"'
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZip", "hwnd", $hwnd, "str", $szCmdLine, "str", $szOutput, "int", $dwSize)
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_Extract

;===============================================================================
; Function Name:     _SevenZip_Add
; Description:      Extracts files from an archive
;
; Parameter(s):     $s_Archive:     Fullpath to Archive-File
;                   $s_Out:         Specifies a destination directory where files are to be extracted. (Def. "")
;                   $s_Typ:         Specifies the type of archive.
;                   $i_Comp:        Sets level of compression. [0 | 1 | 3 | 5 | 7 | 9 ]
;                   $s_Pass:        Specifies password. (Def. "")
;                   $szCmdLine:     Command Line Commands. (Def. "")
;                   $hwnd:          The window handle of the application which calls 7-zip32.dll. (Def. 0)
;                   $szOutput:      The buffer because 7-zip32.dll returns the result. (Def. "NULL")
;                   $dwSize:        Größe des Puffers. When the result exceeds designated size, it is economized in this size.
;                                   If size is 1 or more, always NULL letter is added lastly.   (Def. 0)
;
; Syntax:            _SevenZip_Add($s_Archive, $s_Out = "", $s_Typ = "7z32", $i_Comp = 5, $s_Pass = "", $szCmdLine = "", $hwnd = 0, $szOutput = "NULL", $dwSize = 0)
; Return Value(s):      On Success -Return 1
;                                   On Failure -@error
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_Add($s_Archive, $s_Out = "", $s_Typ = "7z32", $i_Comp = 5, $s_Pass = "", $szCmdLine = "", $hwnd = 0, $szOutput = "NULL", $dwSize = 0)
    If $szCmdLine = "" Then
        If $s_Pass = "" Then
            $szCmdLine = '-t' & $s_Typ & ' a "' & $s_Archive & '" "' & $s_Out & '" -mx=' & $i_Comp
        Else
            $szCmdLine = '-t' & $s_Typ & ' a "' & $s_Archive & '" "' & $s_Out & '" -p"' & $s_Pass & '" -mhe=on -mx=' & $i_Comp
        EndIf
    EndIf
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZip", "hwnd", $hwnd, "str", $szCmdLine, "str", $szOutput, "int", $dwSize)
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_Add

;===============================================================================
; Function Name:     _SevenZip_GetVersion
; Description:      The version of 7-zip32.dll is returned.
;
; Parameter(s):     None.
;
; Syntax:            _SevenZip_GetVersion()
; Return Value(s):      On Success -Return File Version
;                                   On Failure -@error
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_GetVersion()
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZipGetVersion")
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_GetVersion

;===============================================================================
; Function Name:     _SevenZip_GetRunning
; Description:      Whether or not presently 7-zip32.dll while operating, you obtain.
;                   Application side before executing API which by all means accompanies file access such as compressing/thawing,
;                   it is necessary to check whether because of this feasibility.
;
; Parameter(s):     None.
;
; Syntax:            _SevenZip_GetRunning()
; Return Value(s):      On Success -Return 1(It is in the midst of executing.)
;                                   Return 0(Is not in the midst of executing, (feasibility).)
;                                   On Failure -@error
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_GetRunning()
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZipGetRunning")
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_GetRunning

;===============================================================================
; Function Name:     _SevenZip_CheckArchive
; Description:      Whether or not presently 7-zip32.dll while operating, you obtain.
;                   As the archive file which the designated file supports
;                   It returns whether or not it is correct.
;
; Parameter(s):     $s_Archive:     Fullpath to Archive file
;
; Syntax:            _SevenZip_CheckArchive($s_Archive)
; Return Value(s):      On Success -Return 1 (At the time of correct archive file.)
;                                   Return 0 (When the file is illegitimate.)
;                                   On Failure -@error
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_CheckArchive($s_Archive, $i_iMode = 0)
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZipCheckArchive", "str", $s_Archive, "int", $i_iMode)
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_CheckArchive

;===============================================================================
; Function Name:     _SevenZip_GetArchiveType
; Description:      Type of the archive file
;
; Parameter(s):     $s_Archive:     Fullpath to Archive file
;
; Syntax:            _SevenZip_GetArchiveType($s_Archive)
; Return Value(s):      On Success -Return 1 (ZIP type)
;                                   Return 2 (7z32 type)
;                                   On Failure -@error
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_GetArchiveType($s_Archive)
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZipGetArchiveType", "str", $s_Archive)
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_GetArchiveType

;===============================================================================
; Function Name:     _SevenZip_GetFileCount
; Description:      Type of the archive file
;
; Parameter(s):     $s_Archive:     The number of files in the Archive file.
;
; Syntax:            _SevenZip_GetFileCount($s_Archive)
; Return Value(s):  On Success -Return Numer of files
;                   On Failure -@error 1:   Can´t opens a DLL file for use in MemoryDllCall.
;                               @error 2:   Error in MemoryDllCall
;
; Author(s):        Patric Pendelin <patric.pendelin (a) gmx.de>
;===============================================================================
Func  _SevenZip_GetFileCount($s_Archive)
    Local $aRet = MemoryDllCall($__7ZIPDLL, "int", "SevenZipGetFileCount", "str", $s_Archive)
    Return SetError(@error, "", $aRet[0])
EndFunc   ;==> _SevenZip_GetFileCount

#region ### BINARY ###
Func __7ZIPBIN()
        #cs
    Name:   7-ZIP32 BINARY Version 9.20.00.02
    Requirements:   Windows9x/Me/NT/200x/XP/Vista/7
    Author:     Akita Minoru ( Http://Akky.Xrea.Jp/support.Html )

Download the Library: 7-Zip-Library.7z

Basic Usage:

#include "7-Zip.au3"

_SevenZip_Load()

Dim $sCommandLine = "Accepts Switches and etc"
_SevenZip_Exec($sCommandLine) ; See the included 7-Zip.chm documentation

_SevenZip_Free()

Exit

Spoiler

censored.jpg

 

Share this post


Link to post
Share on other sites



Just a few questions... the _7zip_Exec that you reference in your example does not exist.  So I figured "ok I'll just use _7zip_Add" but when I was reading the documentation for it it says its for extracting files from the archive rather than creating an archive..... is this just a documentation error or am I crazy?


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0

  • Similar Content

    • RTFC
      By RTFC
      Please answer me these questions three, ere the other side you see:
      Are you running a 64-bit machine with a 64-bit Windows operating system? Can your AutoIt scripts cope with having directive #AutoIt3Wrapper_UseX64=Y, and thus @AutoItX64=True? Are you sick and tired of seeing this error message?
      If you (like me) answered "YES" to all three questions, then the _HighMem library may ease your pain (the name commemorates a useful utility from the days when CPUs were still steam-powered). Forget about pathetic boot switches /3GB and /userva; in a full-fledged 64-bit environment, _HighMem can pre-allocate all available physical/virtual RAM you've got (or any smaller size you need), and manage individual allocations therein with four simple functions:
      _HighMem_StartUp( $nSize, $sUnit="GB" ) ; parse size of total region to pre-allocate, e.g. (10,"GB") _HighMem_Allocate( $nSize, $sUnit="B" ) ; returns $pOffset (new allocation's base address) _HighMem_Release( $pOffset ) ; existing allocations are identified by their offset (base address) _HighMem_CleanUp() ; close handles, release all pre-allocated memory Of course, existing AutoIt limitations remain in force (e.g., DllstructCreate() is still limited to 2 GB per call), but the maximum of 2-4 GB of virtual memory per Windows process can (under the right circumstances, in the proper environment) be circumvented. However, this is the first beta release, so glitches are likely, and performance may vary. In fact, it may not work at all for you (if you're running 32-bit, for example). And since this involves your own hardware, it's unlikely I would be able to reproduce your issues in my own work environment. Nevertheless, if you find obvious bugs or mistakes in the code, please do post. And if it works for you, that's also good to hear. My own motivation for developing it was to supercharge my matrix computing environment (Eigen4AutoIt), so it can handle matrices of any size that fit in machine RAM.
      The attached zip contains the library itself (HighMem.au3) and two test examples. HighMem_Test1 performs a dry run stress test of the allocation management system; it does not actually do any memory I/O. By contrast, HighMem_Test2 pre-allocates a 6 GB space, stores 3 x 2GB structs there, performs some basic I/O, and releases the allocations one by one. Obviously, for this to work you'll need at least that much free RAM to begin with (check with Task Manager -> Performance -> Memory if you're unsure). My own test environment has 16 GB of physical RAM, and runs W10Pro/64.
      EDIT: minor edits added to improve user experience (many more status messages if $_HighMem_Verbose=True)
      HighMem.v0.85.7z
      EDIT: from beta version 0.9, HighMem supports shared memory, including mutex negotiation.
      HighMem.v0.9.7z
    • Luigi
      By Luigi
      Greetings, someone can give a exemple, how send a error from a C#'s dll to AutoIt?
      I use this line, to send an error... but, I want get a error code In AutoIt with macro @error, it's possible?
       
      throw new ArgumentException("arquivo map não existe", "value" ); In this way, work, I know ther are error, but, @errror always is zero.
      I don't want this, I want a number as error code.
      Can you help me?
       
      Best regards
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning everyone
      I'm working on a little project, and, I encountered a little strange error when I try to add some data to an array...
      The code I wrote is this:
      Func _WMI_Get_Win32_TemperatureProbe($blnCanUseWMI, $blnCustomArrayDisplay = False, $blnReturnEU = False) If $blnCanUseWMI Then Local $objWMI_QueryResult = $objWMI.ExecQuery("SELECT * FROM Win32_TemperatureProbe", "WQL", 32) If @error Then __ConsoleWrite("Error executing the query on Win32_TemperatureProbe class.", @error, 9999) Else Local $arrWin32_TemperatureProbe[1][3] _ArrayDelete($arrWin32_TemperatureProbe, 0) If @error Then __ConsoleWrite("Error deleting the 0st element $arrWin32_TemperatureProbe array.", @error, 9999) Else Local $objWMI_Variable = Null, $strWMI_QueryResult = "", $i = 0 For $objWMI_Variable In $objWMI_QueryResult $strWMI_QueryResult &= "QUERY RESULT" & "|# " & $i & "|/" & @CRLF & _ "Accuracy" & "|" & $objWMI_Variable.Accuracy & "|" & "[sint32]" & @CRLF & _ "Availability" & "|" & $objWMI_Variable.Availability & "|" & "[uint16]" & @CRLF & _ "Caption" & "|" & $objWMI_Variable.Caption & "|" & "[string]" & @CRLF & _ "ConfigManagerErrorCode" & "|" & $objWMI_Variable.ConfigManagerErrorCode & "|" & "[uint32]" & @CRLF & _ "ConfigManagerUserConfig" & "|" & $objWMI_Variable.ConfigManagerUserConfig & "|" & "[boolean]" & @CRLF & _ "CreationClassName" & "|" & $objWMI_Variable.CreationClassName & "|" & "[string]" & @CRLF & _ "CurrentReading" & "|" & $objWMI_Variable.CurrentReading & "|" & "[sint32]" & @CRLF & _ "Description" & "|" & $objWMI_Variable.Description & "|" & "[string]" & @CRLF & _ "DeviceID" & "|" & $objWMI_Variable.DeviceID & "|" & "[string]" & @CRLF & _ "ErrorCleared" & "|" & $objWMI_Variable.ErrorCleared & "|" & "[boolean]" & @CRLF & _ "ErrorDescription" & "|" & $objWMI_Variable.ErrorDescription & "|" & "[string]" & @CRLF & _ "InstallDate" & "|" & $objWMI_Variable.InstallDate & "|" & "[datetime]" & @CRLF & _ "IsLinear" & "|" & $objWMI_Variable.IsLinear & "|" & "[boolean]" & @CRLF & _ "LastErrorCode" & "|" & $objWMI_Variable.LastErrorCode & "|" & "[uint32]" & @CRLF & _ "LowerThresholdCritical" & "|" & $objWMI_Variable.LowerThresholdCritical & "|" & "[sint32]" & @CRLF & _ "LowerThresholdFatal" & "|" & $objWMI_Variable.LowerThresholdFatal & "|" & "[sint32]" & @CRLF & _ "LowerThresholdNonCritical" & "|" & $objWMI_Variable.LowerThresholdNonCritical & "|" & "[sint32]" & @CRLF & _ "MaxReadable" & "|" & $objWMI_Variable.MaxReadable & "|" & "[sint32]" & @CRLF & _ "MinReadable" & "|" & $objWMI_Variable.MinReadable & "|" & "[sint32]" & @CRLF & _ "Name" & "|" & $objWMI_Variable.Name & "|" & "[string]" & @CRLF & _ "NominalReading" & "|" & $objWMI_Variable.NominalReading & "|" & "[sint32]" & @CRLF & _ "NormalMax" & "|" & $objWMI_Variable.NormalMax & "|" & "[sint32]" & @CRLF & _ "NormalMin" & "|" & $objWMI_Variable.NormalMin & "|" & "[sint32]" & @CRLF & _ "PNPDeviceID" & "|" & $objWMI_Variable.PNPDeviceID & "|" & "[string]" & @CRLF & _ "PowerManagementCapabilities" & "|" & $objWMI_Variable.PowerManagementCapabilities & "|" & "[uint16]" & @CRLF & _ "PowerManagementSupported" & "|" & $objWMI_Variable.PowerManagementSupported & "|" & "[boolean]" & @CRLF & _ "Resolution" & "|" & $objWMI_Variable.Resolution & "|" & "[uint32]" & @CRLF & _ "Status" & "|" & $objWMI_Variable.Status & "|" & "[string]" & @CRLF & _ "StatusInfo" & "|" & $objWMI_Variable.StatusInfo & "|" & "[uint16]" & @CRLF & _ "SystemCreationClassName" & "|" & $objWMI_Variable.SystemCreationClassName & "|" & "[string]" & @CRLF & _ "SystemName" & "|" & $objWMI_Variable.SystemName & "|" & "[string]" & @CRLF & _ "Tolerance" & "|" & $objWMI_Variable.Tolerance & "|" & "[sint32]" & @CRLF & _ "UpperThresholdCritical" & "|" & $objWMI_Variable.UpperThresholdCritical & "|" & "[sint32]" & @CRLF & _ "UpperThresholdFatal" & "|" & $objWMI_Variable.UpperThresholdFatal & "|" & "[sint32]" & @CRLF & _ "UpperThresholdNonCritical" & "|" & $objWMI_Variable.UpperThresholdNonCritical & "|" & "[sint32]" $i+=1 Next ConsoleWrite($strWMI_QueryResult & @CRLF) _ArrayAdd($arrWin32_TemperatureProbe, $strWMI_QueryResult) ; I'll wait for an answer... See you later :) If @error Then __ConsoleWrite("Error inserting item #" & $i & " in the $arrWin32_TemperatureProbe array.", @error, 9999) Else If $blnCustomArrayDisplay Then _ArrayDisplay($arrWin32_TemperatureProbe, "Win32_TemperatureProbe:", "", 64 + 32 + 4, "|", "VARIABLE NAME|ACTUAL VALUE|ENGINEERING UNIT", 350, 0xD3D3D3) If @error Then __ConsoleWrite("Error displaying the $arrWin32_TemperatureProbe array.", @error, 9999) EndIf EndIf If $blnReturnEU = False Then _ArrayColDelete($arrWin32_TemperatureProbe, 2) If @error Then __ConsoleWrite("Error deleting the column #2 of $arrWin32_TemperatureProbe array.") EndIf EndIf If IsArray($arrWin32_TemperatureProbe) Then Return $arrWin32_TemperatureProbe Else Return False EndIf EndIf EndIf EndIf EndIf EndFunc And I get this error ( undocumented in the Help File on _ArrayAdd() function ):
      [15/09/2017 10:24:46] : Error inserting item #4 in the $arrWin32_TemperatureProbe array. > Error: 0 Adding a ConsoleWrite() before the _ArrayAdd() function, I can see the content of $strWMI_QueryResult, and, here it is:
      QUERY RESULT|# 0|/
      Accuracy|32768|[sint32]
      Availability||[uint16]
      Caption|Sensore numerico|[string]
      ConfigManagerErrorCode||[uint32]
      ConfigManagerUserConfig||[boolean]
      CreationClassName|Win32_TemperatureProbe|[string]
      CurrentReading||[sint32]
      Description|CPU Thermal Probe|[string]
      DeviceID|root\cimv2 0|[string]
      ErrorCleared||[boolean]
      ErrorDescription||[string]
      InstallDate||[datetime]
      IsLinear||[boolean]
      LastErrorCode||[uint32]
      LowerThresholdCritical||[sint32]
      LowerThresholdFatal||[sint32]
      LowerThresholdNonCritical||[sint32]
      MaxReadable|1270|[sint32]
      MinReadable|64266|[sint32]
      Name|Sensore numerico|[string]
      NominalReading||[sint32]
      NormalMax||[sint32]
      NormalMin||[sint32]
      PNPDeviceID||[string]
      PowerManagementCapabilities||[uint16]
      PowerManagementSupported||[boolean]
      Resolution|1000|[uint32]
      Status|Unknown|[string]
      StatusInfo||[uint16]
      SystemCreationClassName|Win32_ComputerSystem|[string]
      SystemName|DESKTOP-25LFPVU|[string]
      Tolerance|32768|[sint32]
      UpperThresholdCritical||[sint32]
      UpperThresholdFatal||[sint32]
      UpperThresholdNonCritical||[sint32]QUERY RESULT|# 1|/
      Accuracy|32768|[sint32]
      Availability||[uint16]
      Caption|Sensore numerico|[string]
      ConfigManagerErrorCode||[uint32]
      ConfigManagerUserConfig||[boolean]
      CreationClassName|Win32_TemperatureProbe|[string]
      CurrentReading||[sint32]
      Description|True Ambient Thermal Probe|[string]
      DeviceID|root\cimv2 1|[string]
      ErrorCleared||[boolean]
      ErrorDescription||[string]
      InstallDate||[datetime]
      IsLinear||[boolean]
      LastErrorCode||[uint32]
      LowerThresholdCritical||[sint32]
      LowerThresholdFatal||[sint32]
      LowerThresholdNonCritical||[sint32]
      MaxReadable|1270|[sint32]
      MinReadable|64266|[sint32]
      Name|Sensore numerico|[string]
      NominalReading||[sint32]
      NormalMax||[sint32]
      NormalMin||[sint32]
      PNPDeviceID||[string]
      PowerManagementCapabilities||[uint16]
      PowerManagementSupported||[boolean]
      Resolution|1000|[uint32]
      Status|Unknown|[string]
      StatusInfo||[uint16]
      SystemCreationClassName|Win32_ComputerSystem|[string]
      SystemName|DESKTOP-25LFPVU|[string]
      Tolerance|32768|[sint32]
      UpperThresholdCritical||[sint32]
      UpperThresholdFatal||[sint32]
      UpperThresholdNonCritical||[sint32]QUERY RESULT|# 2|/
      Accuracy|32768|[sint32]
      Availability||[uint16]
      Caption|Sensore numerico|[string]
      ConfigManagerErrorCode||[uint32]
      ConfigManagerUserConfig||[boolean]
      CreationClassName|Win32_TemperatureProbe|[string]
      CurrentReading||[sint32]
      Description|Memory Module Thermal Probe|[string]
      DeviceID|root\cimv2 2|[string]
      ErrorCleared||[boolean]
      ErrorDescription||[string]
      InstallDate||[datetime]
      IsLinear||[boolean]
      LastErrorCode||[uint32]
      LowerThresholdCritical||[sint32]
      LowerThresholdFatal||[sint32]
      LowerThresholdNonCritical||[sint32]
      MaxReadable|1270|[sint32]
      MinReadable|64266|[sint32]
      Name|Sensore numerico|[string]
      NominalReading||[sint32]
      NormalMax||[sint32]
      NormalMin||[sint32]
      PNPDeviceID||[string]
      PowerManagementCapabilities||[uint16]
      PowerManagementSupported||[boolean]
      Resolution|1000|[uint32]
      Status|Unknown|[string]
      StatusInfo||[uint16]
      SystemCreationClassName|Win32_ComputerSystem|[string]
      SystemName|DESKTOP-25LFPVU|[string]
      Tolerance|32768|[sint32]
      UpperThresholdCritical||[sint32]
      UpperThresholdFatal||[sint32]
      UpperThresholdNonCritical||[sint32]QUERY RESULT|# 3|/
      Accuracy|32768|[sint32]
      Availability||[uint16]
      Caption|Sensore numerico|[string]
      ConfigManagerErrorCode||[uint32]
      ConfigManagerUserConfig||[boolean]
      CreationClassName|Win32_TemperatureProbe|[string]
      CurrentReading||[sint32]
      Description|Video Card Thermal Probe|[string]
      DeviceID|root\cimv2 3|[string]
      ErrorCleared||[boolean]
      ErrorDescription||[string]
      InstallDate||[datetime]
      IsLinear||[boolean]
      LastErrorCode||[uint32]
      LowerThresholdCritical||[sint32]
      LowerThresholdFatal||[sint32]
      LowerThresholdNonCritical||[sint32]
      MaxReadable|1270|[sint32]
      MinReadable|64266|[sint32]
      Name|Sensore numerico|[string]
      NominalReading||[sint32]
      NormalMax||[sint32]
      NormalMin||[sint32]
      PNPDeviceID||[string]
      PowerManagementCapabilities||[uint16]
      PowerManagementSupported||[boolean]
      Resolution|1000|[uint32]
      Status|Unknown|[string]
      StatusInfo||[uint16]
      SystemCreationClassName|Win32_ComputerSystem|[string]
      SystemName|DESKTOP-25LFPVU|[string]
      Tolerance|32768|[sint32]
      UpperThresholdCritical||[sint32]
      UpperThresholdFatal||[sint32]
      UpperThresholdNonCritical||[sint32]
       
      Could please anyone help me out? 
      Thanks in advance
      Francesco
    • nss
      By nss
      Hi all,
       
      I am making a program in which I use Bass audio library (with the wrapper for autoit that I found here on forums I think) because of its support for dx effects.
      My problem, though, is that when effects as reverb or echo/delay are added, the channel length is not extended as to fit the tail of the effect, so if the file was really short, you wouldn't even hear the reverb at all.
      I've tried setting the  buffer parameter even to 60k ms, updating the channel length to 60k ms, but nothing makes it so that the effects aren't being cut off.
      I've heard that I could add silence manually to wave files by adding the chr(0) characters, but haven't had any luck doing that, either.
      What I'm doing:
      initialize bass use streamCreateFile to load the wave file with the fx flag and length parameter set to 60000 set the config buffer to 60000 use channel set fx to add dx8 reverb use channel play to play the sound use bass update to update the length to 60000  
      I even tried having only silence in one wave file and tried joining two wave files together, but that didn't work either.
       
      Any help would be very much appreciated.