English
Source / code snippets

Dbtdevicearrival discern unit drive Laufwerksbuchstabe Usb Wmdevicechange

 
iF, Beitrag=57167, Zeitpunkt=21.05.2010
...
CompileMarkSeparation
CLS
userMessages 16//wm_close
subClass %hWnd,1

While 1

    WaitInput
    case %uMessage=16 : break

Wend

End

subClassProc

    if subClassMessage(%hWnd,537) and (&sWParam=$8000)// WM_DEVICECHANGE and DBT_DEVICEARRIVAL

        print "Size:",long(&sLparam,0)
        print "Type:",long(&sLparam,4)
        case long(&sLparam,4)=2 : print "Laufwerksbuchstabe:",unitMask2DriveLetter(long(&sLparam,12))//DBT_DEVTYP_VOLUME

    endif

endproc

proc unitMask2DriveLetter

    parameters unitMask&
    declare s$

    whileLoop 26

        if (unitMask& & 1)=1

            s$=chr$(&loop+64)
            break

        endif

        unitMask&=unitMask& >> 1

    wend

    return s$

endproc


...
 
05/22/10  
 



with of/ one nativen Behelfsfunktion can itself whom Laufwerksbuchstaben too as UserMessage to deliver let.
CompileMarkSeparation

443 kB
Hochgeladen:05/23/10
Downloadcounter104
Download
 
05/23/10  
 




Detlef
Tussing
except one weißem Window seh I nothing

is the so pseudo?
 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/24/10  
 



Yes, but if you one USB-unit ansteckst and Windows for one Wechseldatenträgerlaufwerk created, then becomes this gemeldet and the drive of obigem code displayed.
 
05/24/10  
 




Detlef
Tussing
with

userMessages 16//wm_close = Error Message Division through 0
subClass %hWnd,1 = Error Message subClass unbekannter commands

bleats it already

I me of these Topic not yet engage have,
But very interestingly find
would I with something Help Maybe little more over the USB-Stick find out.
 
Gruß Detlef Tussing
Windows XP, XProfan 10
05/25/10  
 



The of me gepostete code is XProfan11-code, ldr. not compatible with XProfan 10.

userMessages 16//wm_close would then userMessages 16 //wm_close

here becomes // of XProfan10 not as REM recognized (what but too only auffällt, if one none XPSE vorgeschaltet has, otherwise stand any Rem-mutants available).

>> subClass %hWnd,1 = Error Message subClass unbekannter commands subClass %hWnd,1

The commands SubClass existing ex XProfan 11 - You could imho but whom 2. code (here in this Thread) benefit (the with the Nproc) which mere as UserMessage weiterleitet - I personally would too only of these 2. code works there it "verlustfrei" operates in the Contrast to SubClass-commands-Variante.
 
05/25/10  
 



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

6.256 Views

Untitledvor 0 min.
Normann Strübli01/30/23
Thomas Zielinski12/07/21
AndreasS01/13/19
E.T.02/25/18
More...

Themeninformationen

this Topic has 2 subscriber:

iF (4x)
Detlef Tussing (2x)


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