J
Jim Flanagan
Hello -
I am in need of more help regarding an approach to accomplishing the
following:
We have a need to change the Volume serial numbers of a bunch of
preprogrammed IDE Solid State Drive modules. The modules have
been duplicated and thus the need to change the serial number
on each one. My approach is to use a USB to IDE adapter cable
and write a C# routine which will automate the writing of the serial
#. At this point, I have a routine written that works very well.
The routine calls a number of Win32 API functions (CreateFile, etc)
to accomplish this.
Now the problem... I need to know how to determine whether the Solid
State Drive has been write protected. How do I go about accomplishing
this? These modules have a small slide switch that can be used for
write protecting the module. I want to check to see whether this
module has been write protected before I attempt to change the serial
number. This way I can alert the operator to disable the write
protection. If I attempt to use the GetVolumeInfo function, it does
not work properly. I think what I need to do is to Unmount the drive
and then Mount the drive so that the operating system will read the
attributes correctly for a subsequent GetVolumeInfo call.
Do I have the right idea regarding a valid method? Either way, I need
some pointers as to how and accomplish this. My C# experience is a bit
on the newbie side, so keep that in mind with any suggestions.
Thanks for any advice that you can offer...
Jim
I am in need of more help regarding an approach to accomplishing the
following:
We have a need to change the Volume serial numbers of a bunch of
preprogrammed IDE Solid State Drive modules. The modules have
been duplicated and thus the need to change the serial number
on each one. My approach is to use a USB to IDE adapter cable
and write a C# routine which will automate the writing of the serial
#. At this point, I have a routine written that works very well.
The routine calls a number of Win32 API functions (CreateFile, etc)
to accomplish this.
Now the problem... I need to know how to determine whether the Solid
State Drive has been write protected. How do I go about accomplishing
this? These modules have a small slide switch that can be used for
write protecting the module. I want to check to see whether this
module has been write protected before I attempt to change the serial
number. This way I can alert the operator to disable the write
protection. If I attempt to use the GetVolumeInfo function, it does
not work properly. I think what I need to do is to Unmount the drive
and then Mount the drive so that the operating system will read the
attributes correctly for a subsequent GetVolumeInfo call.
Do I have the right idea regarding a valid method? Either way, I need
some pointers as to how and accomplish this. My C# experience is a bit
on the newbie side, so keep that in mind with any suggestions.
Thanks for any advice that you can offer...
Jim