ivan Posted September 21, 2010 Posted September 21, 2010 @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 Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
ivan Posted September 23, 2010 Posted September 23, 2010 @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 Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
trancexx Posted September 24, 2010 Author Posted September 24, 2010 Excellent. I'm happy for that, really. ♡♡♡ . eMyvnE
ivan Posted September 24, 2010 Posted September 24, 2010 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 1 Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3
HavikTech Posted September 24, 2010 Posted September 24, 2010 WOW ResHacker written in AutoIt. very nice trancexx, i appreciate it...
Saiph Posted November 22, 2012 Posted November 22, 2012 (edited) 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 November 22, 2012 by Saiph
matwachich Posted November 29, 2012 Posted November 29, 2012 Error report: C:UsersXXXAppDataLocalTempRar$DIa0.992ResourcesViewerAndCompiler.au3 (7432) : ==> Array variable subscript badly formatted.: ReDim $hTreeViewExp[$iNumberOfExporedFunctions] ReDim $hTreeViewExp[^ ERROR
trancexx Posted November 29, 2012 Author Posted November 29, 2012 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. ♡♡♡ . eMyvnE
cyberbit Posted July 12, 2013 Posted July 12, 2013 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> [hr] 50% of the time, it works all the time. -PezoFaSho
wraithdu Posted July 12, 2013 Posted July 12, 2013 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.
cyberbit Posted July 12, 2013 Posted July 12, 2013 (edited) Oh! I didn't think of that. 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 July 12, 2013 by cyberbit _ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new> [hr] 50% of the time, it works all the time. -PezoFaSho
trancexx Posted July 12, 2013 Author Posted July 12, 2013 ^^ 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: #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 ♡♡♡ . eMyvnE
wraithdu Posted July 12, 2013 Posted July 12, 2013 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?
trancexx Posted July 13, 2013 Author Posted July 13, 2013 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. ♡♡♡ . eMyvnE
abisoftware Posted August 10, 2014 Posted August 10, 2014 (edited) Can I replace resource in dll file? Edited August 10, 2014 by abisoftware
Osys2010 Posted October 20, 2015 Posted October 20, 2015 @trancexx:problem, It is going wrong in some file
TheDcoder Posted October 20, 2015 Posted October 20, 2015 @Osys2010 Do you realize that the main post was updated *EXACTLY* 6 years ago? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Mobius Posted October 20, 2015 Posted October 20, 2015 @Osys2010 Do you realize that the main post was updated *EXACTLY* 6 years ago? Would you like to explain why that might be relevant to the less informed?
Osys2010 Posted October 20, 2015 Posted October 20, 2015 I am aware and I did not realize that anyone 6 years ?and (sory my english)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now