Article View: borland.public.cppbuilder.nativeapi
Article #11310Low-level access to CompactFlash Card on external USB2.0 port
From: Walt Morrey
Date: Wed, 18 Feb 2004 21:19
Date: Wed, 18 Feb 2004 21:19
30 lines
1987 bytes
1987 bytes
Ed Mulroy (TeamB) suggested that I post this request for help here----
I'm trying to read (for now) a CompactFlash Card on a USB2.0 port. I've attached a file using
biosdisk from an antique version of TurboC. On my WinME laptop, all it finds is Drive C (at drive
== 0x80), even with the CompactFlash Card and reader proper installed.
I'd like to use C++ Builder 6 to do the job - can anyone help with appropriate calls (WinAPI, etc).
Example TurboC 1.0 Code:
{
int buffer[16384],i,j;
int cmd, drive, head, track, sector, nsects;
int status,ndrives;
drive = 0x80;
ndrives = 0;
while (drive != 0x88)
{
cmd = 2; /* Read Drive - per biosdisk() */
head = 0;
track = 0;
sector = 0;
nsects = 32;
status = 1;
status = biosdisk (cmd, drive, head, track, sector, nsects, buffer);
printf ("drive = 0x%02x status = 0x%04x\n",drive,status);
if( status == 0 ) ndrives++;
drive++;
}
}
Technical Details
Message-ID:
<4033d6fc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7d1b502c63076870,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-18 13:40:42 PST Date: Wed, 18 Feb 2004 16:19:57 -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: Low-level access to CompactFlash Card on external USB2.0 port Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.214.67.105 Message-ID: <4033d6fc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077139196 68.214.67.105 (18 Feb 2004 13:19:56 -0800) Lines: 31 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail