a critical Win32 API question!

  • Thread starter Thread starter Vasya
  • Start date Start date
V

Vasya

Hello,

I need to be able to detect programaticallly from a Windows
application the appearance of a new drive letter, e.g. z, y, etc.
Ideally I would like to use an event driven approach. Is there a
function in the Win32 API that will allow me to register a callback
function that will be called when driver letters appear(are assigned
by the Windows executive)?

Thank you, Bill
 
Vasya said:
Hello,

I need to be able to detect programaticallly from a Windows
application the appearance of a new drive letter, e.g. z, y, etc.
Ideally I would like to use an event driven approach. Is there a
function in the Win32 API that will allow me to register a callback
function that will be called when driver letters appear(are assigned
by the Windows executive)?

All toplevel windows get an WM_DEVICE_CHANGE
with wParam==DBT_DEVICEARRIVAL, see here:
http://support.microsoft.com/kb/163503

This describes CD media insertion and removal
but is identical to whole drive arrivals and
removals (apart from the DBTF_MEDIA flag).

Better ask such questions in a programmers group as
microsoft.public.win32.programmer.


Uwe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top