Jump to content

idm hex to value how can?


Recommended Posts

  • Developers

Here is a working version, as the build in regread doesn't support "REG_NONE" types.

1. Download _RegFuns.au3 from this topic: 

 

2. Edit the file and comment the line 20:

;~ Global Const $REG_QWORD = 11

Use this script:

#include "_RegFunc.au3"
$kvalue = _RegRead("HKEY_CURRENT_USER\Software\DownloadManager\4705","FileSize",True)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $kvalue = ' & $kvalue & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console;~ "FileSize"=hex(0):f4,c0,bb,7f,00,00,00,00    at Internet Download Manager result : 1,99  GB (2143011060 Bytes)
$hSize = ""
For $x = StringLen($kvalue)-1 to 2 Step -2
    $hSize &= StringMid($kvalue,$x,2)
Next
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : Dec($hSize) = ' & Dec($hSize) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

And out of curiosity, would you be kind enough, to test this :

#include <APIRegConstants.au3>
#include <Array.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIError.au3>
#include <WinAPIReg.au3>

Local $hKey = _WinAPI_RegOpenKey($HKEY_CURRENT_USER, 'Software\DownloadManager\4950')
If @error Then
    MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), @extended, _WinAPI_GetErrorMessage(@extended))
    Exit
EndIf
Local $tData = DllStructCreate('byte string[260]')
_WinAPI_RegQueryValue ($hKey, "FileSize", $tData)
ConsoleWrite ($tData.string & @CRLF)

_WinAPI_RegCloseKey($hKey)

 

Edited by Nine
Link to comment
Share on other sites

7 minutes ago, Nine said:

And out of curiosity, would you be kind enough, to test this :

#include <APIRegConstants.au3>
#include <Array.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIError.au3>
#include <WinAPIReg.au3>

Local $hKey = _WinAPI_RegOpenKey($HKEY_CURRENT_USER, 'Software\DownloadManager\4950')
If @error Then
    MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), @extended, _WinAPI_GetErrorMessage(@extended))
    Exit
EndIf
Local $tData = DllStructCreate('byte string[260]')
_WinAPI_RegQueryValue ($hKey, "FileSize", $tData)
ConsoleWrite ($tData.string & @CRLF)

_WinAPI_RegCloseKey($hKey)

 

thanks i tested.

result:0xF4C0BB7F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Link to comment
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
 Share

  • Recently Browsing   0 members

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