2008. május 21., szerda

Create a virtual drive


Problem/Question/Abstract:

Does anybody know how to create a virtual drive from a Delphi program?

Answer:

You can try this. I tested it in Windows ME and it works ok.

{ ... }
if DefineDosDevice(DDD_RAW_TARGET_PATH, 'P:', 'F:\Backup\Music\Modules') then
  ShowMessage('Drive was created successfully')
else
  ShowMessage('Error creating drive");
    { ... }

Nincsenek megjegyzések:

Megjegyzés küldése