X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: Reading sectors: Error 0x701F Date: Sun, 16 Apr 2006 13:38:18 -0400 Organization: Great Nowhere Usenet site Lines: 34 Message-ID: References: NNTP-Posting-Host: c-68-60-59-250.hsd1.mi.comcast.net X-Trace: localhost.localdomain 1145209088 8050 68.60.59.250 (16 Apr 2006 17:38:08 GMT) X-Complaints-To: usenet AT greatnowhere DOT com NNTP-Posting-Date: Sun, 16 Apr 2006 17:38:08 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "John Elliott" wrote in message news:e1tgib$ns9$1$8300dec7 AT news DOT demon DOT co DOT uk... > I'm trying to write a program that reads sectors from a hard drive > using either INT 25h or INT 21h/AX=7305h. > > If I run it under Windows ME, the reads fail with error 0x701F, > whether it's operating on a FAT32 drive or a FAT16 drive. I can't find > any mention of this error in documentation; it turns up once or twice on > Usenet, always in the context of calling INT 25h or INT 21h/AX=7305h > from a DOS extender. That suggests I've made an error setting up the > __dpmi_regs when making the call, but if so I can't see what it is. Does > anyone have any suggestions? > > (this is an old djgpp, based on gcc 2.7.2, but for such a simple > operation I wouldn't have thought that would make much of a difference). Okay, I didn't look at your code. Int 25h and int 21h/ax=7305 will work under real-mode DOS. To get them to work under Win98/98SE/ME etc., you'll need to add Windows file locking code. The only working example of this that I've found is Orwtin Glueck's "ODI's" LFN Tools: http://www.odi.ch/prog/lfn/index.php http://lfntools.sourceforge.net/ I don't know what changes have been made since the project moved to sourceforge. Also, there might be something buried in the DJGPP libraries, but I never stumbled across it... Rod Pemberton