Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

ResHacker project


  • Please log in to reply
174 replies to this topic

#161 ivan

ivan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 402 posts

Posted 21 September 2010 - 01:20 AM

@trancexx:
Sorry to dissappoint you, I got lost trying to understand it (...after hours). I think I will go back to my old procedure of building a header .au3 with a hard coded array matching the order of the resources in my .rc file. I did do some research and maybe even got a better understanding of pointers, but this, as I said, goes over my head.

Cheers.
Ivan







#162 ivan

ivan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 402 posts

Posted 23 September 2010 - 10:29 PM

@trancexx:

I followed your script and learned loads on Windows API (MSDN at my side) and solved my problem. This script gave me a good idea of what I needed.

Cheers.
Ivan

#163 trancexx

trancexx

    Queen F. Elizabeth MCXI

  • Active Members
  • PipPipPipPipPipPip
  • 6,122 posts

Posted 24 September 2010 - 06:11 PM

Excellent.
I'm happy for that, really.
Yeah baby!



.
eMyvnE


#164 ivan

ivan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 402 posts

Posted 24 September 2010 - 06:14 PM

Excellent.
I'm happy for that, really.

I'm sure not as grateful as I am for all the support one can get in this forum, and that includes you. As with many of the kids here, I am self-taught.
Thnx.
  • czardas likes this

#165 HavikTech

HavikTech

    Wayfarer

  • Active Members
  • Pip
  • 69 posts

Posted 24 September 2010 - 09:29 PM

WOW
ResHacker written in AutoIt.
very nice trancexx, i appreciate it...

#166 LzY

LzY

    Seeker

  • Active Members
  • 14 posts

Posted 17 October 2010 - 02:30 AM

Thanks very good resources

#167 Saiph

Saiph

    Seeker

  • Normal Members
  • 2 posts

Posted 22 November 2012 - 12:26 AM

Hi,
I know this is an old topic but I find this script very useful but I have a problem.
I made a Dll file with some image but I would to add also version info, I try RT_Manifest and it works in dll but non in Windows property. So I find RT_Version but it is impossible to add with original script so I modified the script but without success, after insertion I don't see my data like normal dll but oriental character.
Can someone help me?

Edited by Saiph, 22 November 2012 - 12:33 AM.


#168 matwachich

matwachich

    Polymath

  • Active Members
  • PipPipPipPip
  • 224 posts

Posted 29 November 2012 - 08:53 PM

Error report:
C:UsersXXXAppDataLocalTempRar$DIa0.992ResourcesViewerAndCompiler.au3 (7432) : ==> Array variable subscript badly formatted.: ReDim $hTreeViewExp[$iNumberOfExporedFunctions] ReDim $hTreeViewExp[^ ERROR


#169 trancexx

trancexx

    Queen F. Elizabeth MCXI

  • Active Members
  • PipPipPipPipPipPip
  • 6,122 posts

Posted 29 November 2012 - 08:59 PM

This is very old script. When I wrote it I didn't know plenty of things I know now, that's the reason you get that error.
...Very old, 100 years or something, probably even more.
Yeah baby!



.
eMyvnE


#170 cyberbit

cyberbit

    Wayfarer

  • Active Members
  • Pip
  • 76 posts

Posted 12 July 2013 - 07:16 PM

Sorry to resurrect.

 

trancexx, what an immense project! I appreciate the work you threw on this.

 

I'm working on one of my projects with the Resources UDF, but I can't figure out how to parse an RT_STRING table. It seems you did something in your code that parses the data, but I can't decipher it. What am I doing wrong?

 

Regards,

cb


_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

 

50% of the time, it works all the time. -PezoFaSho


#171 wraithdu

wraithdu

    this noise inside my head

  • MVPs
  • 2,396 posts

Posted 12 July 2013 - 07:19 PM

I'm working on one of my projects with the Resources UDF, but I can't figure out how to parse an RT_STRING table.

 

You could also take a look at the AutoIt3Wrapper source. I added RT_STRING capability to the resource functions a good while back.



#172 cyberbit

cyberbit

    Wayfarer

  • Active Members
  • Pip
  • 76 posts

Posted 12 July 2013 - 08:29 PM

Oh! I didn't think of that.  :o

 

Maybe I wasn't clear... I'm successful in using the wrapper to get the .ini into my project as a RT_STRING table, but I can't figure out how to read it back into a readable structure. It doesn't have to be elegant, but dumping to an array would be nice.  ^_^

 

cb

 

Edit: Clarity.


Edited by cyberbit, 12 July 2013 - 08:30 PM.

_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

 

50% of the time, it works all the time. -PezoFaSho


#173 trancexx

trancexx

    Queen F. Elizabeth MCXI

  • Active Members
  • PipPipPipPipPipPip
  • 6,122 posts

Posted 12 July 2013 - 09:21 PM

^^ There is nothing spectacular about RT_STRING resource. The only thing to remember is that strings always come packed as 16 of them. Try something like this:

AutoIt         
#include <Array.au3> ; Read your resource as raw. You'll get something like this... $bRT_STRING = "0x0000000000000000000009002800500061007500730065006400290020000C004100750074006F004900740020004500720072006F007200B9014100750074006F004900740020006800610073002000640065007400650063007400650064002000740068006500200073007400610063006B00200068006100730020006200650063006F006D006500200063006F00720072007500700074002E000A000A0053007400610063006B00200063006F007200720075007000740069006F006E0020007400790070006900630061006C006C00790020006F006300630075007200730020007700680065006E00200065006900740068006500720020007400680065002000770072006F006E0067002000630061006C006C0069006E006700200063006F006E00760065006E00740069006F006E002000690073002000750073006500640020006F00720020007700680065006E0020007400680065002000660075006E006300740069006F006E002000690073002000630061006C006C00650064002000770069007400680020007400680065002000770072006F006E00670020006E0075006D0062006500720020006F006600200061007200670075006D0065006E00740073002E000A000A004100750074006F0049007400200073007500700070006F00720074007300200074006800650020005F005F00730074006400630061006C006C0020002800570049004E004100500049002900200061006E00640020005F005F0063006400650063006C002000630061006C006C0069006E006700200063006F006E00760065006E00740069006F006E0073002E002000200054006800650020005F005F00730074006400630061006C006C0020002800570049004E004100500049002900200063006F006E00760065006E00740069006F006E00200069007300200075007300650064002000620079002000640065006600610075006C007400200062007500740020005F005F0063006400650063006C002000630061006E0020006200650020007500730065006400200069006E00730074006500610064002E00200020005300650065002000740068006500200044006C006C00430061006C006C0028002900200064006F00630075006D0065006E0074006100740069006F006E00200066006F0072002000640065007400610069006C00730020006F006E0020006300680061006E00670069006E00670020007400680065002000630061006C006C0069006E006700200063006F006E00760065006E00740069006F006E002E001900220045006E0064005700690074006800220020006D0069007300730069006E00670020002200570069007400680022002E0021004200610064006C007900200066006F0072006D006100740074006500640020002200460075006E00630022002000730074006100740065006D0065006E0074002E00190022005700690074006800220020006D0069007300730069006E0067002000220045006E006400570069007400680022002E0028004D0069007300730069006E006700200072006900670068007400200062007200610063006B00650074002000270029002700200069006E002000650078007000720065007300730069006F006E002E001F004D0069007300730069006E00670020006F00700065007200610074006F007200200069006E002000650078007000720065007300730069006F006E002E00220055006E00620061006C0061006E00630065006400200062007200610063006B00650074007300200069006E002000650078007000720065007300730069006F006E002E0014004500720072006F007200200069006E002000650078007000720065007300730069006F006E002E001C004500720072006F0072002000700061007200730069006E0067002000660075006E006300740069006F006E002000630061006C006C002E00" ; Convert to array $aArray = RT_STRING_ToArray($bRT_STRING) ; Display it _ArrayDisplay($aArray) Func RT_STRING_ToArray($bBinary)     Local $iOffset = 1     Local $sData     Local $iLen     For $i = 1 To 16 ; There is always 16 strings packed together         $iLen = 2 * LittleEndianToInt(BinaryMid($bBinary, $iOffset, 2))         If $iLen = 0 Then             $iOffset += 2             ContinueLoop         EndIf         ; I'll replace some characters to get one-liners for nicer display         $sData &= StringReplace(StringReplace(StringReplace(BinaryToString(BinaryMid($bBinary, $iOffset + 2, $iLen), 2), @LF, "\n"), @CR, "\r"), Chr(0), "\0") & @LF         $iOffset += $iLen + 2     Next     Return StringSplit(StringTrimRight($sData, 1), @LF, 3) EndFunc ; A little helper function Func LittleEndianToInt($iVal)     Local $tUINT64 = DllStructCreate("uint64")     DllStructSetData($tUINT64, 1, $iVal)     Return DllStructGetData($tUINT64, 1) EndFunc

Yeah baby!



.
eMyvnE


#174 wraithdu

wraithdu

    this noise inside my head

  • MVPs
  • 2,396 posts

Posted 12 July 2013 - 11:09 PM

Does he mean FindResource / LoadResource / LockResource? Or does he really mean to read back the binary data, in which case he'll have to parse the PE header?



#175 trancexx

trancexx

    Queen F. Elizabeth MCXI

  • Active Members
  • PipPipPipPipPipPip
  • 6,122 posts

Posted 13 July 2013 - 08:07 AM

Does he mean FindResource / LoadResource / LockResource? Or does he really mean to read back the binary data, in which case he'll have to parse the PE header?

My understanding is that he doesn't have problems locking the string resource, one way or the other. He has issues parsing locked data.

I could be wrong though.


Yeah baby!



.
eMyvnE





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users