| |
|
|
| |
|
| |
|
|
|
| with of/ one nativen Behelfsfunktion can itself whom Laufwerksbuchstaben too as UserMessage to deliver let. CompileMarkSeparation {$cleq}
windowstyle 1 | 2 | 4 | 8 | 512
cls
userMessages wm_close,wm_user+wm_deviceChange
hWnd.SubClass.wm_deviceChange.toUserMessage(1,0,0,0)//"service" einschalten
While 1
WaitInput
select uMessage
caseof 16 : break
caseof wm_user+wm_deviceChange : print "Laufwerksbuchstabe:"+chr$(ulParam+64)
endSelect
Wend
hWnd.SubClass.wm_deviceChange.toUserMessage(0,0,0,0)//"service" ausschalten
End
nProc hWnd.SubClass.wm_deviceChange.toUserMessage(long a,b,c,d)
long owp=getWindowLong(hWnd,gwl_userData)
if b=0 and c=0 and d=0
if a=1
return setWindowLong(hWnd,gwl_userData,setWindowLong(hWnd,gwl_wndProc,procaddr(hWnd.SubClass.wm_deviceChange.toUserMessage,4)))
elseif a=0
return setWindowLong(hWnd,gwl_wndProc,owp)
endif
else
if a=-1
whileLoop 0,25
if testbit(b,loop)
a=loop+1
break
endif
wend
return a
endif
if b=wm_deviceChange and c=$8000// dbt_deviceArrival
case long(d,4)=2 : sendMessage(hWnd,wm_user+wm_deviceChange,,hWnd.SubClass.wm_deviceChange.toUserMessage(-1,long(d,12),0,0))// dbt_devTyp_volume
endif
return callWindowProc(owp,a,b,c,d)
endif
ref='./../../Function-References/XProfan/endproc/'>endproc
|
|
|
| |
|
|
|
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. |
|
|
| |
|
|
|
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. |
|
|
| |
|
|