WIN_WP
This command allows you to mark a specified WIN drive as read only protect=1 will write protect the hard disk. protect=0 (the default) will remove the write protection.
CROSS-REFERENCE
DMEDIUM_RDONLY will tell you if a device is read only. See also WIN_REMV and WIN_FORMAT for other types of protection.