Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!uw-beaver!mit-eddie!ll-xn!ames!aurora!labrea!rocky!stergios From: stergios@rocky.UUCP Newsgroups: comp.sys.ibm.pc Subject: Determining write protection on floppys Message-ID: <631@rocky.STANFORD.EDU> Date: Thu, 1-Oct-87 14:20:47 EDT Article-I.D.: rocky.631 Posted: Thu Oct 1 14:20:47 1987 Date-Received: Sat, 3-Oct-87 06:32:47 EDT Reply-To: stergios@rocky.stanford.edu (Stergios Marinopoul) Distribution: world Organization: Stanford University Computer Science Department Lines: 41 Newsgroups: comp.sys.ibm.pc Subject: Determining disk write protection in MSC Expires: References: Sender: Reply-To: stergios@rocky.stanford.edu (Stergios Marinopoul) Followup-To: Distribution: world Organization: Stanford University Computer Science Department Keywords: Help! Howdy! I need to determine if a floppy is write protected from MSC. At first, I just fopen()'nd a file on a write protected floppy expecting the returning FILE *fp to be NULL if the disk was write proteced. Well, that did'nt work, but you probably guessed that by now 8^). Then I broke out Norton's "Programmers Guide" and tried the ol interrupt method. Ya see I got this idea to read in a sector, then try to write it back out, and then check the disk status afterwards. Messy, but kinda fun I thought. The only problem with this apporach is that the returned values are inconsistent. (Yep, I tried both the int86() and the dosintx() after I learned the difference between the two). At this point I need some guidence. Any one know of any method that works? I dont care how messey, so long as it works. thanks stergios marinopoulos S&M Engineering % UUCP: !decwrl!rocky.stanford.edu!stergios % % ARPA: f.flex@othello.stanford.edu % % USnail: Crothers Memorial #690, Stanford, CA. 94305 % % Pa Bell: (415) 321-7678 % -- % UUCP: !decwrl!rocky.stanford.edu!stergios % % ARPA: f.flex@othello.stanford.edu % % USnail: Crothers Memorial #690, Stanford, CA. 94305 % % Pa Bell: (415) 321-7678 %