| |
|
|
|
Description:
GetBinaryType supply whom type of/ one ausführbaren File back. These function there only NT-based Windowssystemen.
Deklaration:
DEF @GetBinaryType(2) !KERNEL32,GetBinaryTypeA
Parameter:
1.Parameter: address one Strings or Memory-Variable with a String, the way and names the Ausführbaren File contains. 2.Parameter: 4 byte Memory-Variable, The a Flag aufnimmt, the The manner the File certainly.=> -$0 = (SCS_32BIT_BINARY) 32bit windows Program -$1 = (SCS_DOS_BINARY) DOS Program -$2 = (SCS_WOW_BINARY) 16BIT windows Program -$3 = (SCS_PIF_BINARY) PIF, The one DOS Program aufruft -$4 = (SCS_POSIX_BINARY) POSIX Program
Return Value:
0 if one Error aufgetreten is or The File not executable is, otherwise 1.
Examples:
CompileMarkSeparationDEF @GetBinaryType(2) !"KERNEL32","GetBinaryTypeA"
Windowstyle 31+512
Windowtitle "Art einer EXE herausfinden"
Window 0,0-640,440
Declare FileChoose&
Declare Filename$,FileFlags#,Ausführbar&
LET FILECHOOSE&=@CreateButton(%HWND,"File zum Testen wählen",10,300,200,30)
While %MENUITEM<>-2
Waitinput
IF @Getfocus(FileChoose&)
Clearlist
LET FILENAME$=@Loadfile$("Datei auswählen","Programme|*.EXE;*.COM;*.PIF|Alle Dateien|*.*")
IF FILENAME$<>""
DIM FileFlags#,4
Clear FileFlags#
LET Ausführbar&=@GetBinaryType(@ADDR(FILENAME$),FileFlags#)
ADDSTRING "DATEINASME="+Filename$
IF AUSFÜHRBAR&=1
ADDSTRING "Ausführbar=Ja"
IF @Long(FileFlags#,0)=$0
ADDSTRING "32Bit Windows Programm"
ElseIF @Long(FileFlags#,0)=$1
ADDSTRING "DOS Programm"
ElseIF @Long(FileFlags#,0)=$2
ADDSTRING "16BIT Windows Programm"
ElseIF @Long(FileFlags#,0)=$5
ADDSTRING "=16 Bit OS/2 Programm"
ElseIF @Long(FileFlags#,0)=$3
ADDSTRING "PIF, die ein DOS Programm aufruft"
ElseIF @Long(FileFlags#,0)=$4
ADDSTRING "POSIX Programm"
Else
Addstring "FileTyp ist nicht bestimmbar"
ENDIF
Else
ADDSTRING "Ausführbar=Nein"
Endif
DISPOSE FileFlags#
@Listbox$("Dateiinfos",1)
ENDIF
endif lass=s4 href='./../../funcion-referencias/XProfan/wend/'>Wend
[keywords:09b372b385] Program EXE type 16BIT 32BIT DOS OS/2 OS2 manner executable [/keywords:09b372b385] |
|
|
| |
|
|