Re: ntvdm encountered a hard error
- From: "Rod Pemberton" <spamtrap@xxxxxxxxxx>
- Date: Sun, 29 Oct 2006 03:06:00 -0500
"Galbu" <spamtrap@xxxxxxxxxx> wrote in message
news:1162051240.094089.176550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all. While writing a boot sector reader, I encountered this error:
NTVDM encountered a hard error. That occurs when i call the int 13h
with these parameters:
ah=02h
al=1 ;how many sectors?
ch=0 ;cylinder
cl=0 ;sector to read
dh=0 ;head
dl=80h ;first hard drive
es:bx => buffer 512 bytes long
if I read a floppy drive (dl=0), than everything goes right, but I
cannot read a hd. What is wrong? I'm using windows vista rc1 (but I
don't think it's a beta system bug)
thx everybody
NTVDM encountered a hard error.This is your problem: you're running int 0x13 code in a protected mode
Windows NT "DOS-box" without file/drive locking code.
As I said to Jay in one of the posts in "LSA Disk Sector Read - using int
13h ah 42 (extended read)" regarding his int 0x13 code: "... If you're
running the code from Windows 3.1/98/98SE/98ME/NT/2k/XP, Linux, Bochs,
VMWare, QEMU, DOSBox, DOSEMU, etc., don't expect the code to work. ... If
you're running from Windows, you'll need to add additional file/drive
locking code to work under Windows."
Since you're attempting to run the code under Windows, you'll need
"additional file/drive locking code." Where do you get that? As I said to
Jay in another post in "LSA Disk Sector Read - using int 13h ah 42 (extended
read)":
"You could look at LFN tools by Ortwin 'Odi' Glueck. In addition to working
for Real Mode DOS, they implement Windows drive locking, and should work for
Protected Mode 'DOS-boxes' and DOS emulators under older Windows OS:
Win95/98/98SE/ME etc. I don't know whether the drive locking will work
under Protected Mode 'DOS-boxes' and DOS emulators for 2k/NT/XP. The source
code is for Microsoft Visual C++ 1.51."
http://lfntools.sourceforge.net/
http://www.odi.ch/prog/lfn/index.php
That's about the only example of drive locking that I know of which works
under some versions of Windows. You're on your own for Windows NT.
Rod Pemberton
.
- References:
- ntvdm encountered a hard error
- From: Galbu
- ntvdm encountered a hard error
- Prev by Date: Re: ntvdm encountered a hard error
- Next by Date: Re: ntvdm encountered a hard error
- Previous by thread: Re: ntvdm encountered a hard error
- Next by thread: SSE Programming
- Index(es):
Relevant Pages
|