English
Source / code snippets

Drvtyp Exdrv

 

Michael
Dell
ExDrv(s):
s = drive (z.B.: "C:")

Result: 1 = drive existing / 0 = drive existing not

DrvTyp$(s):
s = drive (z.B.: "C:")

Result: Laufwerks type

functions (lw.pinc):
CompileMarkSeparation
Def gRChar$(2) Left$(Right$($(1),&(2)),1)
Var Gl_87dfv5h7f4_lBit$ = Bin$(External("KERNEL32.DLL","GetLogicalDrives"))

Proc ExDrv

    Parameters ED_LW$
    Return If((gRChar$(Gl_87dfv5h7f4_lBit$,(Ord(Upper$(Left$(ED_LW$,1))) - 64)) = "1"),1,0)

EndProc

Proc DrvTyp$

    Parameters DT_LWB$
    CaseNot ExDrv(DT_LWB$): Return "Unbekannt"
    DT_LWB$       = (Left$(DT_LWB$,1) + ":\")
    Var DT_LWTyp& = External("KERNEL32.DLL","GetDriveTypeA",Addr(DT_LWB$))
    Case ((DT_LWTyp& > 6) | (DT_LWTyp& < 1)): DT_LWTyp& = 7
    Return SubStr$("FloppyDisk|||Card/USB|||HardDisk|||NetDrive|||CD/DVD|||Ram- Drive|||Unbekannt",DT_LWTyp&,"|||")

ENDPROC

demonstration:
CompileMarkSeparation
 $I lw.pinc
Cls

WhileLoop 65,90

    Print ("LW " + Chr$(&Loop) + ": " + Str $(ExDrv(Chr$(&Loop))))

EndWhile

WaitInput
Cls

WhileLoop 65,90

    Print ("LW " + Chr$(&Loop) + ": " + DrvTyp$(Chr$(&Loop)))

EndWhile

WaitInput
End
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
07/22/08  
 




Jac
de
Lad
nice.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
07/22/08  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.096 Views

Untitledvor 0 min.

Themeninformationen

this Topic has 2 subscriber:

Jac de Lad (1x)
Michael Dell (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