Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting Disk handle and sending IOCTL massages with SCSI driver...

205 views
Skip to first unread message

KIM JUNG TAE

unread,
Oct 9, 2000, 9:15:53 PM10/9/00
to

Hi

I'm working on Scsi miniport driver and
GUI which is communicating with the driver.
They must be supported under NT/2000

I was told that the way to get a handle from a disk is....

hDevice = CreateFile("\\\\.\\C:",
.... );

i got that working... and the next,
I tried to send a message with ...

rDevice = DeviceIoControl(hDevice,
IOCTL_SCSI_MINIPORT,
.... );

At this point, i got failed sending the message to my SCSI driver's
IoControl function...

This occurs only under 2000.
With NT, it's fine... so wierd...

Help me please....

Slava M. Usov

unread,
Oct 11, 2000, 3:00:00 AM10/11/00
to

"KIM JUNG TAE" <jt...@aralion.co.kr> wrote in message
news:#OgUKYlMAHA.247@cppssbbsa05...

> Hi
>
> I'm working on Scsi miniport driver and
> GUI which is communicating with the driver.
> They must be supported under NT/2000
>
> I was told that the way to get a handle from a disk is....
>
> hDevice = CreateFile("\\\\.\\C:",
> .... );

Try CreateFile("\\\\.\\Scsi0" ... ) Scsi1, Scsi2, or whatever number your
device has.

Slava

KIM JUNG TAE

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to

Thanks for your answer.

I have already tried putting every string pointers as possible...like...
\\\\.\\Scsi0 , 1, 2 ... , \\\\.\\PhysicalDrive0, 1, 2.... etc..

There were no problems with CeateFile() function's working
under boths of NT and 2000.
DeviceIoControl() is black sheep... especially in 2000.
it works fine under NT.
But in 2000 with same code, it never works...

I could NOT find any informations about difference between them...

Should i make special INF for 2000 ?

"Slava M. Usov" <stripit...@usa.net> wrote in message
news:urMSQW5MAHA.257@cppssbbsa05...


> "KIM JUNG TAE" <jt...@aralion.co.kr> wrote in message
> news:#OgUKYlMAHA.247@cppssbbsa05...

> > Hi
> >
> > I'm working on Scsi miniport driver and
> > GUI which is communicating with the driver.
> > They must be supported under NT/2000
> >
> > I was told that the way to get a handle from a disk is....
> >
> > hDevice = CreateFile("\\\\.\\C:",
> > .... );
>

Slava M. Usov

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
"KIM JUNG TAE" <jt...@aralion.co.kr> wrote in message
news:#zFIHEDN...@cppssbbsa02.microsoft.com...

> Thanks for your answer.
>
> I have already tried putting every string pointers as possible...like...
> \\\\.\\Scsi0 , 1, 2 ... , \\\\.\\PhysicalDrive0, 1, 2.... etc..
>
> There were no problems with CeateFile() function's working
> under boths of NT and 2000.
> DeviceIoControl() is black sheep... especially in 2000.
> it works fine under NT.
> But in 2000 with same code, it never works...

What is the error code?

Slava

Andrew Naiden

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to
Scsi miniport driver must be opened as follows:" \\\\.\\Scsi0:" etc.
I.e. a colon must be specified after miniport number! This works both in NT and 2000.
Also note, that at least one device must be attached to SCSI bus otherwise SCSIPORT driver
does not pass IOCTL_SCSI_MINIPORT request to your miniport.

"Slava M. Usov" <stripit...@usa.net> wrote in message news:uyaYe7FNAHA.287@cppssbbsa05...

Slava M. Usov

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to

"Andrew Naiden" <ve...@solar.dp.ua> wrote in message
news:#2VoyvHNAHA.196@cppssbbsa04...

> Scsi miniport driver must be opened as follows:" \\\\.\\Scsi0:" etc.
> I.e. a colon must be specified after miniport number! This works both in
NT and 2000.

Correct, thank you.

Slava

Rob Turk

unread,
Oct 12, 2000, 3:00:00 AM10/12/00
to

"KIM JUNG TAE" <jt...@aralion.co.kr> wrote in message
news:#zFIHEDN...@cppssbbsa02.microsoft.com...
> Thanks for your answer.
>
> I have already tried putting every string pointers as possible...like...
> \\\\.\\Scsi0 , 1, 2 ... , \\\\.\\PhysicalDrive0, 1, 2.... etc..
>
> There were no problems with CeateFile() function's working
> under boths of NT and 2000.
> DeviceIoControl() is black sheep... especially in 2000.
> it works fine under NT.
> But in 2000 with same code, it never works...
>

> I could NOT find any informations about difference between them...
>

Wasn't there some extra security added to the DeviceIoControl() stuff? I
seem to recall that the process under Win2000 needs a few extra security
tidbids. This was added to prevent a user-written tool to go around NT
security and access any part of disk directly.

Rob


0 new messages