COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

ntvdm encountered a hard error

• Email
• Follow

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
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


 0
Reply spamtrap2 (1628) 10/28/2006 4:00:40 PM

See related articles to this posting

Galbu wrote:
> 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
> 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

Shouldn't cause a "hard error", but sector numbering usually starts at 1
(weird, I know). I'm surprised it worked on a floppy.

Best,
Frank


 0

"Galbu" <spamtrap@crayne.org> wrote in message
> 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
> 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
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

"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


 0

Frank Kotler wrote:
> Shouldn't cause a "hard error", but sector numbering usually starts at 1
> (weird, I know). I'm surprised it worked on a floppy.
well, I've actually written cl=1.

anyway, is there any other way to read a drive sector under winXp
without using a locking drive? e.g. another interrupt?


 0

Galbu wrote:
> Frank Kotler wrote:
>
>>Shouldn't cause a "hard error", but sector numbering usually starts at 1
>>(weird, I know). I'm surprised it worked on a floppy.
>
> well, I've actually written cl=1.
>
> anyway, is there any other way to read a drive sector under winXp
> without using a locking drive? e.g. another interrupt?

You might try int 13h/45h. In general, if you want to use bios
interrupts, boot to dos. Windows gives you a "fake dos"... and not a
very good fake. (protected mode is protecting your system from *you*,
y'know!)

I think there's a Windows API that will read a sector, but I don't know
what it is. Must exist, 'cause there's an "ERROR_SECTOR_NOT_FOUND"...

Best,
Frank


 0

On Windows I believe you can use CreateFile and DeviceIoControl for this.

Regards
Chris Saunders

"Frank Kotler" <spamtrap@crayne.org> wrote in message
news:1rqdnaA-Pff86djYnZ2dnUVZ_oydnZ2d@comcast.com...
> Galbu wrote:
>> Frank Kotler wrote:
>>
>>>Shouldn't cause a "hard error", but sector numbering usually starts at 1
>>>(weird, I know). I'm surprised it worked on a floppy.
>>
>> well, I've actually written cl=1.
>>
>> anyway, is there any other way to read a drive sector under winXp
>> without using a locking drive? e.g. another interrupt?
>
> You might try int 13h/45h. In general, if you want to use bios interrupts,
> boot to dos. Windows gives you a "fake dos"... and not a very good fake.
> (protected mode is protecting your system from *you*, y'know!)
>
> I think there's a Windows API that will read a sector, but I don't know
> what it is. Must exist, 'cause there's an "ERROR_SECTOR_NOT_FOUND"...
>
> Best,
> Frank
>

..


 0

On Oct 30, 2:06 pm, "Chris Saunders"  <spamt...@crayne.org> wrote:
> On Windows I believe you can use CreateFile and DeviceIoControl for this.

If you would like to try Chris's suggestion, something like :-

FASM
===================
format PE GUI 4.0

include 'win32a.inc'

FSCTL_LOCK_VOLUME=090018h
FSCTL_UNLOCK_VOLUME=09001Ch

;;      Open a handle to the device
invoke
cmp eax,-1
;Check if operation okay.
je exit
;Operation failed.
mov [FHandle],eax
;Store handle

;;      Lock Drive
invoke
DeviceIoControl,[FHandle],FSCTL_LOCK_VOLUME,NULL,0,NULL,0,lpBytesReturned,NULL
cmp eax,1
jne exit

;;      Set the file pointer offset to the BOF.               ;File is
the Disk in this case
invoke  SetFilePointer,[FHandle],0,DToMH,FILE_BEGIN   ;move
pointer 0 bytes from beginning
cmp     eax,-1
je exit                                  ;more error handling
to be done..

cmp     eax,0
je      exit                             ;say no more..

;;      Close the file
invoke CloseHandle,[FHandle]             ;Should cause
unlocking too :-)

;;      Message Box if it worked.
invoke  MessageBox,0,FName,Success,MB_OK

exit:
invoke  ExitProcess,0

Success          db 'Success',0                  ;Text for the message
box
DToMH            dd 0h                           ;SetFilePointer 'High
dword' bytes to move
FHandle          dd 0h
FName            db '\\.\PHYSICALDRIVE0',0       ;First Harddisk, use
'\\.\C:' etc. for logical drives
FileData         db 512 dup (0)                  ;Buffer for sector
FileDataL = $- FileData FileDataW dd 0h ;Actual number of Bytes read lpBytesReturned dd 0 ; import data in the same section data import library kernel32,'KERNEL32.DLL',user32,'USER32.DLL' import kernel32,\ CreateFile,'CreateFileA',\ DeviceIoControl,'DeviceIoControl',\ ReadFile,'ReadFile',\ CloseHandle,'CloseHandle',\ SetFilePointer,'SetFilePointer',\ ExitProcess,'ExitProcess' import user32,\ MessageBox,'MessageBoxA' end data =================== Far from complete and a bit messy, but hopefully should give you some pointers.   0 Reply Cranky 10/30/2006 7:23:03 PM 6 Replies 514 Views Similar Articles 12/12/2013 2:35:42 AM page loaded in 2403 ms. (0)  Reply: Similar Artilces: Hard drive bad errors I put a new IDE hard drive into an older server and am getting those errors after about 1 months of operation:: [56866.766764] end_request: I/O error, dev sda, sector 713545176 [56869.645473] sd 0:0:1:0: [sda] Unhandled error code [56869.645480] sd 0:0:1:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [56869.645486] sd 0:0:1:0: [sda] CDB: Read(10): 28 00 2a 90 07 28 00 00 20 00 [56869.645527] end_request: I/O error, dev sda, sector 714082088 [56869.647672] sd 0:0:1:0: [sda] Unhandled error code [56869.647677] sd 0:0:1:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK... Apple Mail server error encountered I have been trying to set up my Apple mail to access my gmail account via POP.. I have followed all set-up instructions on google site.. I have checked and re-checked all settings.. BUT I get the following error message.. Connection Failed There may be a problem with the mail server or network, Check the settings for account "gmail" or try again. The server error encountered was: The server "popmail.gmail.com" cannot be contacted on port 997. Any thoughts, answers, help would be greatly appreciated. Cheers, James. In article <1110106431.214914.313810@f14g2000cwb.goo... fsck error: is hard drive dying? Dual boot machine with Win2k (still fat32) on hda and RedHat 8 on second hard drive. I use GRUB as bootloader. Everything runs just fine but I received this disturbing warning from fsck. When I run /sbin/fsck.vfat -tr /dev/hda1 I receive a warning "There are differences between boot sector and its backup" Then there is a long listing of offsets showing the differences (current / backup) for each offset. I chose to take no corrective action since I wasn't sure which was the accurate version of the boot disk - the current or the backup. Are these differences just due t... ActiveState Perl configuration My apologies if this isn't the best place to post this question, but its the best I could find. I'm trying to install Radiator's Radius server on a Windows XP machine. As part of the installation process, ActiveState's ActivePerl must be installed first. I've run the MSI and successfully installed the software. I am now following the instructions that I have and trying to install the packages that the setup requires through the PPM (Perl Package Manager), specifically "install DBI". However, attempting to do so generates the following error: "Error: No ... The server encountered an internal error () that prevented it #2 Hi All I am using Developing a Spring Framework MVC application step-by-step from www.springframework.org. I use apache-tomcat-5.5.23, Ant 1.6 and jdk1.4. when i used ant, ant deploy, ant list and ant build the these all commands give me message suceessful but when i write url(http://localhost:8080/ springapp/hello.htm) on the browser then I am getting the following error. do you have solution for this problem. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException:... NTVDM,EXE error after installing & running from CDROM I have succcesfully installed 1995 Grolier Multimedia Encyclopedia on my PIV desktop in Windows XP,but during running it ,its not moving forward showing picture image is invalid,NTVDM.EXE error in following files: D:\DOCUME1\Admini1\LOCALs1\Temp\WER68c.8dir00\ntvdm.exe.mdmp D:\DOCUME1\Admini1\LOCALs1\Temp\WER68c.8dir00\appcompat.txt Error Signature SzAppName:ntvdm.exe SzAppVer :5.1.2600.2180 SzModName:hungapp SzModVer :0.0.0.0 Offset :00000000 You choose to end non-responsive program,we have craeted an error report taht u can send to help us improve NTVDM.EXE.We will treat this report... How to let gmake terminate by itself when it encounters error when processing subdir. Hi, Suppose my source code structure is parent/ +----subdir1/ +----subdir2/ +----subdir3/ In each subdir, there is a Makefile and the source code. I put the following Make file in parent dir. When I run gmake in parent dir, gmake won't stop even if there is any compile errors in the subdirectories. Is there anyway to make gmake stop when it encounter errors. Best wishes, Peng SUBDIRS =$(filter-out Makefile% README batch central_depository tags,$(wildcard *)) NOTES = SHELL = /bin/bash ..PHONY: all run clean backup all: @for dir in$(SUBDIRS); do \ $(MAKE) -C$\$dir; \ done ...

EXP-00056: ORACLE error 1403 encountered HELP PLEASE
Hi, Problems start the export: Linux version 2.4.9-e.3 (bhcompile@stripples.devel.redhat.com) (gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.1)) #1 Fri May 3 17:02:43 EDT 2002 Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set About to export the entire database ... .. exporting tablespace definitions .. exporting profiles .. exporting user definitions .. exporting roles .. exportin...

@@Error not catching error.
Hi all, I want to catch error in stored procedure and return error message. I want to catch error 'Syntax error converting the varchar value 'a' to a column of data type int.' Means error occuring if i enter wrong value. Say suppose i have statment like select * from emp where rowid = 'a' PRINT @@ERROR print 'reach' here rowid is integer value so i am getting above mention error. So what i am expecting is it should print error and then print 'reach' which is not happening. can anyone tell me reason behind this and how to overcome this problem. than...

Robust error handling, an error while handling another error
I've been having this discussion a lot with my colleagues at work. A buffered file writer is the classic example. #include <fstream> int main() { std::ofstream fout("foo.txt"); if ( ! fout) return 1; //write important data to file //let the destructor implicitly close the file handle } The ofstream destructor will call flush then free the file handle, return it to the operating system. However, flush can fail. The disk can be full, for example. When flush fails, it sets a state flag, but there is no opportunity for the user to examine this state fl...

Error reporting (for syntactic errors)
This may be a quite basic question. I am contemplating writing a compiler for a language similar to java, though with some innovative (hah!) features added, etc etc. I started out with regular BNF, but have eliminated left recursion from the grammar through allowing the grammar to directly support lists with separators. I use no tools, all is written from scratch, and so can create new grammar constructs as I want. The grammar is supposed to be (mostly) context free, but as the grammar is implemented directly as java code, each production being a class, which at the same time is a node in the...

Error: missing ) in parenthetical error
Hi, Trying the following ... function getCurrentVal(poValue) { var lcCurrentVal = 0; if (isNaN(parseInt(poValue))) { var loValue = poValue.toUpperCase(); if (loValue == "/") { lcCurrentVal = "/"; } if (loValue == "X") ( lcCurrentVal = "X"; { } else { lcCurrentVal = parseInt(poValue); } if(lcCurrentVal) { return lcCurrentVal; } } and am getting the error Error: missing ) in parenthetical Line: 189, Column: 23 Source Code: lcCurrentVal = "X"; I can't for the life of me figure it out. If i comment this line out it works fine (but then t...

Error: Errors occurred
Hi, Can any one help me out or explain the procedure to eliminate the error mentioned below while using the Generate code only via Configuration Parameters for the Target TI6000 DM6437. *********************************************************** Error building Real-Time Workshop target for block diagram 'EdgeDetection'. MATLAB error message: Error using ==> tlc_new Error: Errors occurred - aborting. *********************************************************** The Model is build without any errors and when the execution of the model starts there are no errors, b...

Error
Hi All, I created a virtual directory VD for the physical directory C:\XYZ\ABC\. on a machine 10.10.9.9 The physical directory has got a file timer.exe and i am trying to access this from my client m/c. I created a hyperlink and the link rightly takes me to that file, the status bar shows that. like http://10.10.9.9/VD/timer.exe. when i download that file an error is thrown error. CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can someone help me out in rectifying the same. Regards Venkat PS: The apps are ...

error
after compiling and wrting the design i am getting an error as follows Warning: There is a data discrepancy between synopsys database and the output file. (VHDL-286) what cud be the reason ? thanks Hi, Provide more details as to: Is this simulation or synthesis? Which tool? As this is a Warning, what happens after this? Are you still able to go thro' the flow? Ajeetha, CVC www.noveldv.com i am able to go ahead i am sythesizing a simple vhdl adder I believe the error code VHDL-286 is documented in their docs, you may get lucky if you look in that. Ajeetha, CVC www.noveldv.c...

E2900 error on boot: TL = 1, TT = 32. ERROR: Data Access Error -- Help??
Can someone help decipher this error below? Had Sun CE install 32Gb memory into 2 system boards (64Gb total), and now we are getting this error. We tried powering it back up with each system board individually, and get same error no matter which board is in, or both. So we're pretty sure it's not a single dimm that is the problem Sun Fire E2900 OpenFirmware version 5.19.4 (01/19/06 18:06) Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. SmartFirmware, Copyright (C) 1996-2001. All rights reserved. 32768 MB memory installed, TL = 1, TT = 32....

E2900 error on boot: TL = 1, TT = 32. ERROR: Data Access Error -- Help?? #2
Can someone help decipher this error below? Had Sun CE install 32Gb memory into 2 system boards (64Gb total), and now we are getting this error. We tried powering it back up with each system board individually, and get same error no matter which board is in, or both. So we're pretty sure it's not a single dimm that is the problem Sun Fire E2900 OpenFirmware version 5.19.4 (01/19/06 18:06) Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. SmartFirmware, Copyright (C) 1996-2001. All rights reserved. 32768 MB memory installed, TL = 1, TT = 3...

ODBC Error: SQLSTATE = S1000, Native error code = -4977 The data buffer parameter is too short(Btrieve Error 22)
HI all, I am trying to insert a new record into a table and got the following error message ODBC Error: SQLSTATE = S1000, Native error code = -4977 The data buffer parameter is too short(Btrieve Error 22) Here is the query I am using. insert into amgr_user_fields_tbl values ('123456789012345678901234',0,38,0,0, '2003-11-01',0.0, '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890', '123456789012','2003-12-10','16:18:13','1234') Here is the table defination create...

transform
Hi, I get a compiler error when trying to use std::transform to iteratate/modify a list. If I write the same code by hand, it compiles fine. Am I misusing transform, or is this a compiler bug? The types involved are complex templates, but I don't think this should have any bearing on things. ------------------------------- const UserIFSeq& uList; UserIFSeq::const_iterator i; UserISeq users; // // Compiles Fine. // for (i = uList.begin(); i != uList.end(); i++) users.push_back(UserIPrx::uncheckedCast(*i)); // // Produces Error. // std::transform(uList.begin(), uList...

chemmacros, exp13.sty error error
Hi, I'm trying to write chemistry with oxidation numbers and if I google correctly chemmacros appear to be a good way to do this. But when I try to use it I get complaines about exp13.sty, about which I can find nothing useful. Code: \documentclass[a4paper,12pt]{article} \usepackage[version=3]{mhchem} \usepackage{chemmacros} \begin{document} \ce{\ox{1,H}} \end{document} And the error message is: ! LaTeX Error: File `exp13.sty' not found. Any suggestions? Par -- Par usenet@hunter-gatherer.org What was it they were saying about arn...