I asked on the Lazarus programming forum how to open a physical disk. I want to allow the user to select physical disks from their system when they click a "Select Disk" button. There are some examples here at Stack Overflow that are similar but not quite the same (such as Delphi - Using DeviceIoControl passing IOCTL_DISK_GET_LENGTH_INFO to get flash media physical size (Not Partition)).
There are lots of C and C++ examples of using CreateFile
(in the documentation and especially an example of calling DeviceIoControl
) but I can't find any for Free Pascal or Delphi and I am not good enough yet to work out how to do it.
Can anyone point me in the direction of a link that explains it or better still an actual example written in Delphi or Free Pascal? Can anyone help me understand how to use it?