🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11006

Re: Problems writing boot record to removable media under WinME

#11006
From: Walt Morrey
Date: Thu, 04 Mar 2004 00:03
40 lines
2911 bytes
Back to my problem -- the code I sent on 3/1/2004 5:15 PM does not write - it fails after the 
following code.  I reviewed the documentation on Int 21h Function 7305h.  It says that for writes, 
SI can be 	0001h - write to Other/unknown,
		2001h - write FAT data,
		4001h - write directory data, or
		6001h - write Normal file data

I also tried setting reg.reg_ESI = 0x0001 to write Other/unknown.

No matter what I did, I still got the same old message:

         Old Disk Utility Write Error
You are using a disk utility designed for an older version of MS-DOS or Windows...

I have kept WinME up to date with Microsoft.  Do I need to restore some files?  If so, which ones?



//------------------- Int 21h Function 7305h
       //-----------------------------------------------------------
       // SI contains read/write mode flags
       // SI=0h for read and SI=1h for write
       // CX must be equal to ffffh for
       // int 21h's 7305h extension
       // DS:BX -> base addr of the
       // control block structure
       // DL must contain the drive number
       // (01h=A:, 02h=B: etc)
       //-----------------------------------------------------------
       reg.reg_ESI = 0x6001 ;          // for write
       reg.reg_ECX = -1 ;
       reg.reg_EBX = (DWORD)(&ControlBlock);
       reg.reg_EDX = drive+1;
       reg.reg_EAX = 0x7305 ;

       //  6 == VWIN32_DIOC_DOS_DRIVEINFO
       fResult = DeviceIoControl ( hDevice, VWIN32_DIOC_DOS_DRIVEINFO,
          &(reg), sizeof (reg),
          &(reg), sizeof (reg),
          &cb,0);
Technical Details
Message-ID: <4046725d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40437604@newsgroups.borland.com> <404380f3$1@newsgroups.borland.com> <40439482$1@newsgroups.borland.com> <40439fa5$1@newsgroups.borland.com> <4043a4e7$1@newsgroups.borland.com> <4043ae8f$2@newsgroups.borland.com> <4043b610@newsgroups.borland.com> <kbs7409ien56crro53tr9i26s1p6n3cv44@4ax.com> <404408ea$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5a57fca3b977b3f5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-03 16:09:53 PST
Date: Wed, 03 Mar 2004 19:03:18 -0500
From: Walt Morrey <dadinc@bellsouth.net>
User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Problems writing boot record to removable media under WinME
References: <40437604@newsgroups.borland.com> <404380f3$1@newsgroups.borland.com> <40439482$1@newsgroups.borland.com> <40439fa5$1@newsgroups.borland.com> <4043a4e7$1@newsgroups.borland.com> <4043ae8f$2@newsgroups.borland.com> <4043b610@newsgroups.borland.com> <kbs7409ien56crro53tr9i26s1p6n3cv44@4ax.com> <404408ea$1@newsgroups.borland.com>
In-Reply-To: <404408ea$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68.214.228.188
Message-ID: <4046725d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1078358621 68.214.228.188 (3 Mar 2004 16:03:41 -0800)
Lines: 41
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail