Arí Ricardo Ody wrote:

Hi!


Suppose you connect a Handheld running windows mobile via USB cable to a windows machine.


Is there a way that I can recognize the new disk added to the system, e.g., determine what of the disks existing in the windows machine is the disk added when I connected the handheld?


Greetings from Sao Paulo - Brazil


Ricardo


-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Hi,

There are two different events that may occur if you attach new mass storage to your PC.
Some devices will trigger WMDeviceChange (flash drives, extrernal HDD etc.), and others will trigger file-system change events (media inserted into CD-ROM/DVD-ROM SDcard inserted into card reader etc.).

You can't detect new device if it uses some special driver (e.g. Nokia phones if Nokia PC Suite is installed, because PC Suite will overtake the control over device before the device gets a device letter).

Every device can be identified by unique GUID (can be read through WinAPI).
GUID is given to the device (on partition level - two partitions on the same drive will have different GUID) at formating the drive.

regards
Boban bobby Spasic



--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to