I’m working with the DeviceIoControl function and I need pass the IOCTL_ATA_PASS_THROUGH value to that function. I can’t found any delphi translatation for this constant, just i found this C++ definition.
# define IOCTL_ATA_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x040B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
but i have problems to translate that value to delphi using the CTL_CODE macro. the question is how i can define the IOCTL_ATA_PASS_THROUGH in delphi?
The CTL_CODE macro is defined as
So the delphi equivalent of the
IOCTL_ATA_PASS_THROUGHconst is something like thisNote : Unfortunally delphi doesn’t supports macros, but you can create a function
and get the value in run-time in this way