English
Regulars table & Café

GetBinaryType.

 


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:

CompileMarkSeparation
DEF @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]
 
04/24/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.329 Views

Untitledvor 0 min.
H.Brill09/26/24

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie