Again. Slowly
Right now your app uses Create(...) and ASPI to deal with burners. I've implemented special driver which blocks access to devices when we (StarBurn and you) keep handle to it (device) open. So you need to:
1) Change device enumeration method. Instead of calling FindDevice you need just loop all drive letters checking for DRIVE_TYPE_CDROM (see FindDeviceEx sample). You can still use FindDevice call to enumrate burnrs. Just keep track of Symbolic links callback would report to you.
HOWEVER from my point of view mixing SPTI and ASPI is not a good thing so I'd just cut-n-paste FindDeviceEx enumration sample.
2) Change device creation method from Create to CreateEx. It used drive letter (or cdrom%d) name instead of SCSI address. Rest of the parameters are the same.
After you'll do this you'll be able to use ASPI (if you'll still have this code in some sort of "if" switch) and STPI. Turnable. On 2000/XP/2003 you'll be able to use SPTI as "native" method to access burners and also there's a driver (StarOpen) to help with pure exclusive access.
After you'll have this all working and DT Pro would be release you'd have to add CreateEx -> CreateExEx add (I'll declare API call a bit later you don't need it rihgt now) and you'd be able to use alternative path for SCSI traffic so NOBADY would be not only access the drive but also intercept your traffic to it (right now SCSI fitlers can...).
Is it clear now?
raymng wrote:
No offence. Of course I need to update my code. As you said, just replace CreateEx with CreateExEx and rest of the code would not change, right?
So is that mean I just need to change one call of my original code ??
Thanks.