Board index » cppbuilder » Low-level access to CompactFlash Card on external USB2.0 port

Low-level access to CompactFlash Card on external USB2.0 port


2004-02-19 01:19:06 AM
cppbuilder81
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++;
}
}
 
 

Re:Low-level access to CompactFlash Card on external USB2.0 port

Try asking in the API group, borland.public.cppbuilder.nativeapi
. Ed
Quote
Walt Morrey wrote in message
news:40339e89$ XXXX@XXXXX.COM ...