JohnOne Posted March 12, 2014 Share Posted March 12, 2014 Regarding to check which os is installed on the ext. disk you can try these steps: load the ext. registry hive using REG LOAD <KeyName> <FileName> (cmdline tool) extract the needed values from the loaded hive using RegRead (<Keyname>HKLMSOFTWAREMicrosoftWindows NTCurrentVersion) unload the hive REG UNLOAD <KeyName> Br, UEZ Interesting. That can really load a registry from non live os drive? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted March 12, 2014 Share Posted March 12, 2014 According to the docu you first need to save the registry to a file. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
JohnOne Posted March 12, 2014 Share Posted March 12, 2014 I thought it already resided in a file AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted March 12, 2014 Share Posted March 12, 2014 I understand that with Reg you can export the Registry of a live OS to a file and then process this file. But you can't add the OS disk to another system and process the Registry from this non boot disk. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
JFX Posted March 12, 2014 Share Posted March 12, 2014 @trashy GetBinaryType() will not work for you. Use the function posted by FireFox in post #6. Link to comment Share on other sites More sharing options...
UEZ Posted March 12, 2014 Share Posted March 12, 2014 (edited) You can try this to get the os version from the loaded reg hive:;proof of concept version #RequireAdmin $sRegHive = @ScriptDir & "\Software" ;replace with your file $sHivePath = "HKLM\Reloaded" If Not FileExists($sRegHive) Then Exit MsgBox(16, "Error", "File not found") RunWait("reg load " & $sHivePath & " " & $sRegHive, "", @SW_HIDE) MsgBox(0, "Test", RegRead($sHivePath & "\Microsoft\Windows NT\CurrentVersion", "ProductName") & " / Error: " & @error) Run("reg unload " & $sHivePath, "", @SW_HIDE)Edit: path to the reg key corrected and tested with the software reg file from my Vista vm -> worked. Br,UEZ Edited March 12, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
trashy Posted March 12, 2014 Author Share Posted March 12, 2014 (edited) Searched the forum for GetBinarytype and only found 3 or 4 entries, this one worked. The script is very similar to the one UEZ posted above and both posts made by KaFu. I know I've got alot to learn, I'm trying, but from that I came up with this and with a little modification should work. $file = ("E:\windows\system32\winver.exe") Local $stType = DllStructCreate("dword;") $aRet = DllCall("kernel32.dll", "hwnd", "GetBinaryType", "str", $file, "ptr", DllStructGetPtr($stType)) Switch DllStructGetData($stType, 1) Case 0 $file = "A 32-bit Windows-based application" Case 1 $file = "An MS-DOS – based application" Case 2 $file = "A 16-bit Windows-based application" Case 3 $file = "A PIF file that executes an MS-DOS – based application" Case 4 $file = "A POSIX – based application" Case 5 $file = "A 16-bit OS/2-based application" Case 6 $file = "A 64-bit Windows-based application" EndSwitch MsgBox(0, "OSArch", $file) Trying to avoid the registry but there would've been several options. Please look over what I did for any errors Thanks all for your advice and patience Edited March 12, 2014 by trashy Link to comment Share on other sites More sharing options...
JohnOne Posted March 12, 2014 Share Posted March 12, 2014 Searched the forum for GetBinarytype and only found 3 or 4 entries, this one worked. The script is very similar to the one UEZ posted above and both posts made by KaFu. well it's not similar, it's the exact same code. the exact same code linked in first reply that you rejected as not working. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trashy Posted March 12, 2014 Author Share Posted March 12, 2014 Sorry JohnOne, had searched forum prior to ever posting my topic and probably looked at 25 or 30 posts. Got cataracts on both eyes and if I don't pay close attention. Untill I narrowed my search to GetBinarytype with only 3 or 4 result did I notice the difference. Already blind in my left eye and right eye not very good. No insurance and surgery $4,000 an eye. My problem now is trying to merge this into the rest of my script. If any one could help I'd appreciate. expandcollapse popup#region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Best Driver Import.ico #AutoIt3Wrapper_Res_Fileversion=1.5.0.0 #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Tidy_Stop_OnError=n #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> #include <WinAPI.au3> Import() Func Import() $Form1 = GUICreate("Import all Drivers", 400, 400, 600, -1, BitOR($WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU), BitOR($WS_EX_OVERLAPPEDWINDOW, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE)) GUISetBkColor(0xABCDFF) $ListView = GUICtrlCreateListView("FileSystem | Drive | ", 50, 40, 300, 190) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $aDrives = DriveGetDrive("Fixed") For $i = 1 To UBound($aDrives) - 1 $sData = DriveGetFileSystem($aDrives[$i]) & " | " & StringUpper($aDrives[$i]) & "" & DriveGetLabel($aDrives[$i]) GUICtrlCreateListViewItem($sData, $ListView) Next $Label1 = GUICtrlCreateLabel("List of Available Drives to Import From", 60, 20, 275, 24) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Select Drive from dropdown list below", 65, 230, 275, 24) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Combo1 = GUICtrlCreateCombo("", 100, 260, 200, 20, $CBS_DROPDOWNLIST) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("OK", 100, 350, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("Cancel", 220, 350, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) For $i = 10 To 99 If DriveStatus(Chr($i) & ':') = 'READY' Then If DriveGetType(Chr($i) & ":") = 'FIXED' Then GUICtrlSetData($Combo1, Chr($i) & ':') EndIf Next While 1 Switch GUIGetMsg() ; I think part of my problem is 2 switches Case $GUI_EVENT_CLOSE, $Button2 Exit Case $Button1 $version = StringLeft(FileGetVersion(GUICtrlRead($Combo1) & "\Windows\system32\WinVer.exe"), 3) If StringLeft($version, 3) = "6.1" Then $version = "WIN7" ElseIf StringLeft($version, 3) = "6.0" Then $version = "VISTA" ElseIf StringLeft($version, 3) = "5.1" Then $version = "XP" EndIf ; this is new part I,m trying To add $arch = (GUICtrlRead($Combo1) & @SystemDir & "\winver.exe") Local $stType = DllStructCreate("dword;") $aRet = DllCall("kernel32.dll", "hwnd", "GetBinaryType", "str", $arch, "ptr", DllStructGetPtr($stType)) Switch DllStructGetData($stType, 1) ; second switch Case 0 $arch = "_x86" Case 1 $arch = "_x64" ;;;;;;;;;;;;;;;;;; $1 = MsgBox(262144 + 4 + 32, "OSVersion & Arch", (GUICtrlRead($Combo1) & $version & $arch) & @CRLF & "Do you wish to continue?") If $1 = 6 Then $hGUI = GUICreate("Test", 400, 40, -1, -1, $WS_POPUP, $WS_EX_TOPMOST, $WS_EX_LAYERED) GUISetBkColor(0xABCDFF) $Label3 = GUICtrlCreateLabel("Importing Drivers Please be Patient", 20, 0, 275, 24) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $idProgress = GUICtrlCreateProgress(0, 18, 400, 20, BitOR($PBS_MARQUEE, $PBS_SMOOTH)) $hProgress = GUICtrlGetHandle($idProgress) _SendMessage($hProgress, $PBM_SETMARQUEE, True, 20) ; final parameter is update time in ms GUISetState() Do RunWait("Dpinst.exe /path " & (GUICtrlRead($Combo1) & "\Windows")) Exit Until GUIGetMsg() = $GUI_EVENT_CLOSE Exit EndIf EndSwitch ;### Tidy Error -> "wend" is closing previous "case" on line 45 WEnd ;### Tidy Error -> "endfunc" is closing previous "switch" on line 44 EndFunc ;==>Import ;### Tidy Error -> while is never closed in your script. ;### Tidy Error -> while is never closed in your script. Link to comment Share on other sites More sharing options...
Solution trashy Posted March 13, 2014 Author Solution Share Posted March 13, 2014 I'd like to appologize to everyone, I don't know weather to blame it on my poor eyesight or just plain ignorance. If I don't pay close attention I tend overlook things. Thanks for all your help and be patient, I'm learning. I was overlooking vital information I left out of the original script. Look at lines 60 thru 66, there was my answer. expandcollapse popup#region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Best Driver Import.ico #AutoIt3Wrapper_Res_Fileversion=1.5.0.0 #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Tidy_Stop_OnError=n #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> #include <WinAPI.au3> Import() Func Import() $Form1 = GUICreate("Import all Drivers", 400, 400, 600, -1, BitOR($WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU), BitOR($WS_EX_OVERLAPPEDWINDOW, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE)) GUISetBkColor(0xABCDFF) $ListView = GUICtrlCreateListView("FileSystem | Drive | ", 50, 40, 300, 190) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $aDrives = DriveGetDrive("Fixed") For $i = 1 To UBound($aDrives) - 1 $sData = DriveGetFileSystem($aDrives[$i]) & " | " & StringUpper($aDrives[$i]) & "" & DriveGetLabel($aDrives[$i]) GUICtrlCreateListViewItem($sData, $ListView) Next $Label1 = GUICtrlCreateLabel("List of Available Drives to Import From", 60, 20, 275, 24) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Select Drive from dropdown list below", 65, 230, 275, 24) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Combo1 = GUICtrlCreateCombo("", 100, 260, 200, 20, $CBS_DROPDOWNLIST) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("OK", 100, 350, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("Cancel", 220, 350, 75, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) For $i = 10 To 99 If DriveStatus(Chr($i) & ':') = 'READY' Then If DriveGetType(Chr($i) & ":") = 'FIXED' Then GUICtrlSetData($Combo1, Chr($i) & ':') EndIf Next While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Button2 Exit Case $Button1 $version = StringLeft(FileGetVersion(GUICtrlRead($Combo1) & "\Windows\system32\WinVer.exe"), 3) If StringLeft($version, 3) = "6.1" Then $version = "WIN7" ElseIf StringLeft($version, 3) = "6.0" Then $version = "VISTA" ElseIf StringLeft($version, 3) = "5.1" Then $version = "XP" EndIf $arch = (GUICtrlRead($Combo1) & "\Windows\system32\WinVer.exe") Local $stType = DllStructCreate("dword;") $aRet = DllCall("kernel32.dll", "hwnd", "GetBinaryType", "str", $arch, "ptr", DllStructGetPtr($stType)) ; Local Const $SCS_32BIT_BINARY = 0 ; A 32-bit Windows-based application ; Local Const $SCS_DOS_BINARY = 1 ; An MS-DOS – based application ; Local Const $SCS_WOW_BINARY = 2 ; A 16-bit Windows-based application ; Local Const $SCS_PIF_BINARY = 3 ; A PIF file that executes an MS-DOS – based application ; Local Const $SCS_POSIX_BINARY = 4 ; A POSIX – based application ; Local Const $SCS_OS216_BINARY = 5 ; A 16-bit OS/2-based application ; Local Const $SCS_64BIT_BINARY = 6 ; A 64-bit Windows-based application If DllStructGetData($stType, 1) = "0" Then $arch = "_x32" ElseIf DllStructGetData($stType, 1) = "6" Then $arch = "_x64" EndIf $1 = MsgBox(262144 + 4 + 32, "OSVersion & Arch", (GUICtrlRead($Combo1) & $version & $arch) & @CRLF & "Do you wish to continue?") If $1 = 6 Then $hGUI = GUICreate("Test", 400, 40, -1, -1, $WS_POPUP, $WS_EX_TOPMOST, $WS_EX_LAYERED) GUISetBkColor(0xABCDFF) $Label3 = GUICtrlCreateLabel("Importing Drivers Please be Patient", 20, 0, 275, 24) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $idProgress = GUICtrlCreateProgress(0, 18, 400, 20, BitOR($PBS_MARQUEE, $PBS_SMOOTH)) $hProgress = GUICtrlGetHandle($idProgress) _SendMessage($hProgress, $PBM_SETMARQUEE, True, 20) ; final parameter is update time in ms GUISetState() Do RunWait("Dpinst.exe /path " & (GUICtrlRead($Combo1) & "\Windows")) Exit Until GUIGetMsg() = $GUI_EVENT_CLOSE Exit EndIf EndSwitch WEnd EndFunc ;==>Import Link to comment Share on other sites More sharing options...
trashy Posted March 13, 2014 Author Share Posted March 13, 2014 These 2 scripts although very similar are not identical. Taken as is this one when I run the script does nothing. This one does Link to comment Share on other sites More sharing options...
JohnOne Posted March 13, 2014 Share Posted March 13, 2014 Do you understand why? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trashy Posted March 13, 2014 Author Share Posted March 13, 2014 Yes I think I do now. No file input $file = ("your file goes here") and a msgbox to return the info. Thanks for your help Link to comment Share on other sites More sharing options...
JohnOne Posted March 13, 2014 Share Posted March 13, 2014 ace. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
DXRW4E Posted March 14, 2014 Share Posted March 14, 2014 (edited) expandcollapse popupGlobal Const $_LOADED_IMAGE = "PTR ModuleName;PTR hFile;PTR MappedAddress;PTR FileHeader;PTR LastRvaSection;ULONG NumberOfSections;PTR Sections;ULONG Characteristics;BOOLEAN fSystemImage;BOOLEAN fDOSImage;BOOLEAN fReadOnly;UBYTE Version;BYTE Links[8];ULONG SizeOfImage" ;;Global Const $t_IMAGE_FILE_HEADER = "WORD Machine;WORD NumberOfSections;DWORD TimeDateStamp;DWORD PointerToSymbolTable;DWORD NumberOfSymbols;WORD SizeOfOptionalHeader;WORD Characteristics" ;;Global Const $t_IMAGE_OPTIONAL_HEADER = "WORD Magic;UBYTE MajorLinkerVersion;UBYTE MinorLinkerVersion;DWORD SizeOfCode;DWORD SizeOfInitializedData;DWORD SizeOfUninitializedData;DWORD AddressOfEntryPoint;DWORD BaseOfCode;DWORD BaseOfData;DWORD ImageBase;DWORD SectionAlignment;DWORD FileAlignment;WORD MajorOperatingSystemVersion;WORD MinorOperatingSystemVersion;WORD MajorImageVersion;WORD MinorImageVersion;WORD MajorSubsystemVersion;WORD MinorSubsystemVersion;DWORD Win32VersionValue;DWORD SizeOfImage;DWORD SizeOfHeaders;DWORD CheckSum;WORD Subsystem;WORD DllCharacteristics;DWORD SizeOfStackReserve;DWORD SizeOfStackCommit;DWORD SizeOfHeapReserve;DWORD SizeOfHeapCommit;DWORD LoaderFlags;DWORD NumberOfRvaAndSizes;ptr IMAGE_DATA_DIRECTORY" ;IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; ;;Global Const $t_IMAGE_NT_HEADERS = "DWORD Signature;" & $t_IMAGE_FILE_HEADER & ";" & $t_IMAGE_OPTIONAL_HEADER Global Const $IMAGE_FILE_MACHINE_I386 = 0x014c ;; x86 Global Const $IMAGE_FILE_MACHINE_IA64 = 0x0200 ;; Intel Itanium Global Const $IMAGE_FILE_MACHINE_AMD64 = 0x8664 ;; x64 Global Const $IMAGE_FILE_32BIT_MACHINE = 0x0100 ; #FUNCTION# ======================================================================================================================================================= ; Name...........: _WinAPI_GetBinaryTypeEx ; Description ...: Check file supports 16/32-bit words. ; Syntax.........: _WinAPI_GetBinaryTypeEx($sFileName[, $sFilePath]) ; Parameters ....: $sFileName - The name of the image. ; $sFilePath - The path used to locate the image if the name provided cannot be found. If NULL is used, ; then the search path rules set forth in the SearchPath function apply. ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: ; Note ..........: ; ================================================================================================================================================================== Func _WinAPI_GetBinaryTypeEx($sFileName, $sFilePath = "") Local $aResult, $LOADED_IMAGE, $fDOSImage, $Characteristics $aResult = DllCall("imagehlp.dll", "ptr", "ImageLoad", "str", $sFileName, "str", $sFilePath) If @Error Or Not $aResult[0] Then Return SetError(1, 0, 1) $LOADED_IMAGE = DllStructCreate($_LOADED_IMAGE, $aResult[0]) ;; Characteristics ;; The image characteristics value. This member can be one of the following values. ;; Value - Meaning ;; IMAGE_FILE_RELOCS_STRIPPED = 0x0001 - Relocation information is stripped from the file. ;; IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002 - The file is executable (there are no unresolved external references). ;; IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004 - Line numbers are stripped from the file. ;; IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008 - Local symbols are stripped from file. ;; IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010 - Aggressively trim the working set. ;; IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020 - The application can handle addresses larger than 2 GB. ;; IMAGE_FILE_BYTES_REVERSED_LO = 0x0080 - Bytes of word are reversed. ;; IMAGE_FILE_32BIT_MACHINE = 0x0100 - Computer supports 32-bit words. ;; IMAGE_FILE_DEBUG_STRIPPED = 0x0200 - Debugging information is stored separately in a .dbg file. ;; IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400 - If the image is on removable media, copy and run from the swap file. ;; IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800 - If the image is on the network, copy and run from the swap file. ;; IMAGE_FILE_SYSTEM = 0x1000 - System file. ;; IMAGE_FILE_DLL = 0x2000 - DLL file. ;; IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000 - File should be run only on a uniprocessor computer. ;; IMAGE_FILE_BYTES_REVERSED_HI = 0x8000 - Bytes of the word are reversed. ;; fDOSImage ;; If the image is a 16-bit executable image, this value is TRUE. $fDOSImage = DllStructGetData($LOADED_IMAGE, "fDOSImage") $Characteristics = DllStructGetData($LOADED_IMAGE, "Characteristics") If Not $fDOSImage And BitAND($Characteristics, $IMAGE_FILE_32BIT_MACHINE) <> $IMAGE_FILE_32BIT_MACHINE Then Return SetError(2, DllCall("imagehlp.dll", "BOOL", "ImageUnload", "ptr" ,$aResult[0]), 1) ;; Machine ;; The architecture type of the computer. An image file can only be run on the specified computer or a system that emulates the specified computer. This member can be one of the following values. ;; Value - Meaning ;; IMAGE_FILE_MACHINE_I386 = 0x014c - x86 ;; IMAGE_FILE_MACHINE_IA64 = 0x0200 - Intel Itanium ;; IMAGE_FILE_MACHINE_AMD64 = 0x8664 - x64 ;Local $IMAGE_NT_HEADERS = DllStructCreate($t_IMAGE_NT_HEADERS, DllStructGetData($LOADED_IMAGE, "FileHeader")) ;If DllStructGetData($IMAGE_NT_HEADERS, "Machine") <> $IMAGE_FILE_MACHINE_I386 Then Return SetError(3, 0, 1) DllCall("imagehlp.dll", "BOOL", "ImageUnload", "ptr" ,$aResult[0]) Return 0 EndFunc Ciao. Edited March 14, 2014 by DXRW4E 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