query

>HI,

I want to talk to a system device such as drive C: or the
floppy
under
Windows 98 and windows 95 . So far I have not found anything
that will allow me to do this.

How can i talk to floppy device or cd device.

If anybody knows about this pls reply back.

You can do this through VWIN32 interface. There are samples in MSDN for
this. Also there is a source sample in CodeGuru
(http://www.codeguru.com/system/ReadSector.html).

Hope this help you.

Regards
Bala

-----Original Message-----
From: nataraj r s [mailto:xxxxx@rediffmail.com]
Posted At: 15 September 2002 11:21
Posted To: ntdev
Conversation: [ntdev] query
Subject: [ntdev] query

HI,
I want to talk to a system device such as drive C: or the
floppy
under
Windows 98 and windows 95 . So far I have not found anything
that will allow me to do this.

How can i talk to floppy device or cd device.

If anybody knows about this pls reply back.


You are currently subscribed to ntdev as: xxxxx@avantisworld.com
To unsubscribe send a blank email to %%email.unsub%%

Hi,

I got your mail ,gone through website. and i wrote code to open a
cd rom and read the contents but It returns value(i’e acess is
denied) why
is it So? and i am sending part of code it should work on
windows98 platform.

hDevice = CreateFile ( “\\.\vwin32”, 0, 0, NULL, 0, 0, NULL
);

if ( (hDevice == INVALID_HANDLE_VALUE) )
{
MessageBox (“Cannot Open File \n”);
return;
}

DIOC_REGISTERS reg = {0};
DISKIO dio;

dio.dwStartSector = 1;
dio.wSectors = 2;
dio.dwBuffer = (DWORD)buffer;

reg.reg_EAX = 0x7305; // Ext_ABSDiskReadWrite
reg.reg_EBX = (DWORD)&dio;
reg.reg_ECX = -1;
reg.reg_EDX = 1; // Int 21h, fn 7305h drive numbers are
1-based
reg.reg_ESI = 0x0;
reg.reg_Flags = 1 ;
fResult =
DeviceIoControl(hDevice,VWIN32_DIOC_DOS_DRIVEINFO,
&reg, sizeof(reg),
&reg, sizeof(reg), &cb, 0);

// Determine if the DeviceIoControl call and the read
succeeded.
fResult = fResult && !(reg.reg_Flags & 1 );
if ( fResult == 0 )
{
CString error;
error.Format(“Reading Failed %i”, reg.reg_EAX);
AfxMessageBox (error);
}

else{

CString error;
error.Format("ReadingSuccess " );
AfxMessageBox (error);
}

I don’t know whether you can read CDROM sectors using this method. This
method is most useful reading Floppy disks. I am using ASPI interface to
read CDROMs. There is a sample, wnaspi32, in Windows 95 DDK.

-----Original Message-----
From: nataraj r s [mailto:xxxxx@rediffmail.com]
Posted At: 16 September 2002 13:10
Posted To: ntdev
Conversation: [ntdev] RE: query
Subject: [ntdev] RE: query

Hi,

I got your mail ,gone through website. and i wrote code to open a
cd rom and read the contents but It returns value(i’e acess is
denied) why
is it So? and i am sending part of code it should work on
windows98 platform.

hDevice = CreateFile ( “\\.\vwin32”, 0, 0, NULL, 0, 0, NULL
);

if ( (hDevice == INVALID_HANDLE_VALUE) )
{
MessageBox (“Cannot Open File \n”);
return;
}

DIOC_REGISTERS reg = {0};
DISKIO dio;

dio.dwStartSector = 1;
dio.wSectors = 2;
dio.dwBuffer = (DWORD)buffer;

reg.reg_EAX = 0x7305; // Ext_ABSDiskReadWrite
reg.reg_EBX = (DWORD)&dio;
reg.reg_ECX = -1;
reg.reg_EDX = 1; // Int 21h, fn 7305h drive numbers are
1-based
reg.reg_ESI = 0x0;
reg.reg_Flags = 1 ;
fResult =
DeviceIoControl(hDevice,VWIN32_DIOC_DOS_DRIVEINFO,
&reg, sizeof(reg),
&reg, sizeof(reg), &cb, 0);

// Determine if the DeviceIoControl call and the read
succeeded.
fResult = fResult && !(reg.reg_Flags & 1 );
if ( fResult == 0 )
{
CString error;
error.Format(“Reading Failed %i”, reg.reg_EAX);
AfxMessageBox (error);
}

else{

CString error;
error.Format("ReadingSuccess " );
AfxMessageBox (error);
}


You are currently subscribed to ntdev as: xxxxx@avantisworld.com
To unsubscribe send a blank email to %%email.unsub%%