VitAl2013 Posted May 5, 2010 Share Posted May 5, 2010 (edited) For some reasons, I can't fine my theme that I made before. That's why I want make new one and retell moreI have just simple 32bit Processor (I don't remember name) on first machine and 64bit Xeon in second. I take one au3, this:expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=beta #AutoIt3Wrapper_Res_File_Add=c:\Temp\res_file.bla, RT_RCDATA, res_f #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Include <WinAPIEx.au3> Local $way = "Z:\HOME\" Local $a = "RES" Local $b = "file" Local $where = $way&StringLower($a)&"_"&StringLower(StringLeft($b, 1))&".bla" Local $what = StringUpper($a)&"_"&StringUpper(StringLeft($b, 1)) MsgBox (64, "$where/what", "$where = "&$where&@CRLF&"$what = "&$what) _ResSaveToFile($where, $what) ; _ResSaveToFile("Z:\HOME\res_f.bla", "RES_F") If @error <> 0 Then MsgBox (64, "error", "@error = "& @error) EndIf Func _ResSaveToFile($sFile, $iRes) Local $hFile, $hInst, $hInfo, $hData, $pData, $tData, $iSize, $iByte $hInst = _WinAPI_GetModuleHandle('') $hInfo = _WinAPI_FindResource($hInst, $iRes, $RT_RCDATA) $hData = _WinAPI_LoadResource($hInst, $hInfo) $iSize = _WinAPI_SizeofResource($hInst, $hInfo) $pData = _WinAPI_LockResource($hData) If @error Then Return SetError(1, 0, 0) EndIf $tData = DllStructCreate('byte[' & $iSize & ']', $pData) $hFile = _WinAPI_CreateFile($sFile, 1) If Not $hFile Then Return SetError(2, 0, 0) EndIf _WinAPI_WriteFile($hFile, DllStructGetPtr($tData), $iSize, $iByte) _WinAPI_CloseHandle($hFile) If $iByte <> $iSize Then Return SetError(3, 0, 0) EndIf Return 1 EndFunc ;==>_ResSaveToFileOn first machine I get ResSave_work.zip and it's work okOn second - ResSave_broken.zip and it's bring error 1Is it error? Is it error of AutoIT or is is my error? What I should do? Edited May 5, 2010 by VitAl2013 Link to comment Share on other sites More sharing options...
99ojo Posted May 5, 2010 Share Posted May 5, 2010 Hi, did you compile your script with 64 Bit? ;-)) Stefan P.S: There's no need to upload a 'suspicous' exe file. Everyone can compile your autoit script by himself. Link to comment Share on other sites More sharing options...
VitAl2013 Posted May 5, 2010 Author Share Posted May 5, 2010 (edited) Everyone can compile your autoit script by himself. I want show that it's different files. They have different size and I assume that different structure. Also I give them for specialists that can say exactly what happened.did you compile your script with 64 Bit? Yes I did. I try did it with 64bit (#AutoIt3Wrapper_UseX64) and without. With UPX (#AutoIt3Wrapper_UseUpx) and without. Edited May 5, 2010 by VitAl2013 Link to comment Share on other sites More sharing options...
VitAl2013 Posted May 6, 2010 Author Share Posted May 6, 2010 I think it's because processor for servers. It's not just simple 64bit processor. Link to comment Share on other sites More sharing options...
KaFu Posted May 6, 2010 Share Posted May 6, 2010 I have Win7-64bit installed at home. Will test the script later, a reason might also be that the WinAPIEx functions you use are not truely 64bit compatible (see help file about 64bit usage). OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
KaFu Posted May 6, 2010 Share Posted May 6, 2010 This works for me compiled to x86 and to x64 too... expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_File_Add=C:\test\res_file_in.jpg, RT_RCDATA, res_f #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPIEx.au3> Local $where = @ScriptDir & "\" & "res_file_out.jpg" Local $what = "res_f" MsgBox(64, "$where/what", "$where = " & $where & @CRLF & "$what = " & $what) _ResSaveToFile($where, $what) If @error <> 0 Then MsgBox(64, "error", "@error = " & @error) EndIf Func _ResSaveToFile($sFile, $iRes) Local $hFile, $hInst, $hInfo, $hData, $pData, $tData, $iSize, $iByte $hInst = _WinAPI_GetModuleHandle('') $hInfo = _WinAPI_FindResource($hInst, $iRes, $RT_RCDATA) $hData = _WinAPI_LoadResource($hInst, $hInfo) $iSize = _WinAPI_SizeofResource($hInst, $hInfo) $pData = _WinAPI_LockResource($hData) If @error Then Return SetError(1, 0, 0) EndIf $tData = DllStructCreate('byte[' & $iSize & ']', $pData) $hFile = _WinAPI_CreateFile($sFile, 1) If Not $hFile Then Return SetError(2, 0, 0) EndIf _WinAPI_WriteFile($hFile, DllStructGetPtr($tData), $iSize, $iByte) _WinAPI_CloseHandle($hFile) If $iByte <> $iSize Then Return SetError(3, 0, 0) EndIf Return 1 EndFunc ;==>_ResSaveToFile OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
VitAl2013 Posted May 7, 2010 Author Share Posted May 7, 2010 KaFuDo you have server's processor (Xeon) ? Or just 64bit processor?see help file about 64bit usageWhere is it? Link to comment Share on other sites More sharing options...
KaFu Posted May 7, 2010 Share Posted May 7, 2010 Standard 64bit, no Xeon. Help-File => AutoIt => Using AutoIt => Running under Windows 64-bit Edition (last section). But as it runs on my CPU I guess it's not related to x64 in general. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
DW1 Posted May 7, 2010 Share Posted May 7, 2010 Perhaps a server OS issue? Maybe not arch at all? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
VitAl2013 Posted May 7, 2010 Author Share Posted May 7, 2010 (edited) I have WinXP64bit OS (not server version). Any ideas more? Normally my computer it's "DELL PRECISION T7500" with downgrade to XP64bit. Processor is "Dual Core Intel® Xeon® Processor E5503, 2.0GHz,4M L3, 4.8GT/s" Edited May 7, 2010 by VitAl2013 Link to comment Share on other sites More sharing options...
VitAl2013 Posted May 17, 2010 Author Share Posted May 17, 2010 I install VitrualBOX and emulate 32bit processor - nothing. Not completely, plus 1 more variant - not open files at all. I download 3300 and 3320 versions. The same mistakes, but each version have different sizes of exe files. We have theoretical tool for compile 64bit exe in 32bit processor, but maybe... Do we have instrument for compile 32bit exe on 64bit processor? Link to comment Share on other sites More sharing options...
KaFu Posted May 17, 2010 Share Posted May 17, 2010 The "Compile" dialog in the SciTE AutoIt Editor lets you choose if you want to compile to x86 or x64 on a 64bit OS. If I've got a program which depents on the OSArch, I compile it twice and use a wrapper to choose the right version per OS... Global $sFilename, $iPID, $timer If Not FileExists(@ScriptDir & "\SSD") Then DirCreate(@ScriptDir & "\SSD") Global $sConfig_Path = @ScriptDir & "\SSD" If @OSArch = "X86" Then $sFilename = $sConfig_Path & "\SSD_32bit.exe" FileInstall("SSD_32bit.exe", $sFilename) Else $sFilename = $sConfig_Path & "\SSD_64bit.exe" FileInstall("SSD_64bit.exe", $sFilename) EndIf If Not FileExists($sFilename) Then _Exit("Could not extract OSArch file to" & @CRLF & @CRLF & $sFilename) Run(FileGetShortName($sFilename) & " " & $CmdLineRaw, $sConfig_Path) Func _Exit($sMsg = "") If $sMsg Then MsgBox(16 + 262144, "SSD Install Error", $sMsg) Exit EndFunc ;==>_Exit OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
VitAl2013 Posted May 18, 2010 Author Share Posted May 18, 2010 This program just make install files by FileInstall. I not help with compilation. Also it not add selective resources. I mean After that I can't select what I want save. Or maybe I don't understand your idea. Here I see just that opened (or saved) resource depends on OS bits. My resources not depend, the just not compiled right. Link to comment Share on other sites More sharing options...
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