Debugging Code - new to windbg

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question. This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer), &Returned,
NULL ))
to the driver. (I coppied the CTL_CODE marco from the DDK to ensure the same
number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment (other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the dbgmessages
while working local. I think I need to select a process or something but the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton

I suspect you are not setting irp->IoStatus.Information to the size of the
data you are returning. If this is not set the kernel will not copy the
data back to the user space.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

“Hylton Tregenza” wrote in message news:xxxxx@ntdev…
> Hi all
>
> Still busy with my first foray into driver depths. Could someone please
> supply an answer (or location to the answer) of the following question.
This
> has to do with debugging.
>
> I am trying to communicate with a test driver that I have created. I am
> using a consol app and sending
> DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
> szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer),
&Returned,
> NULL ))
> to the driver. (I coppied the CTL_CODE marco from the DDK to ensure the
same
> number was generated)
>
> In the driver code I have the following
>
> DBGPRINT((“==>Pt Dispatch\n”));
> irpStack = IoGetCurrentIrpStackLocation(Irp);
>
> switch (irpStack->MajorFunction)
> {
> case IRP_MJ_CREATE:
> break;
>
> case IRP_MJ_CLEANUP:
> break;
>
> case IRP_MJ_CLOSE:
> break;
>
> case IRP_MJ_DEVICE_CONTROL:
>
> DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
> ioControlCode =
> irpStack->Parameters.DeviceIoControl.IoControlCode;
> switch (ioControlCode)
> {
> case IOCTL_IMPACKETCOUNTER_GETPACKETS:
> {
>
> memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
> There”));
> }
> break;
> }
> break;
> default:
> break;
> }
>
> I am not sure what is happening with this call. The return code from
> DeviceIoControl is O (OK).
> The buffer is not populated with the result.
>
> I have the disadvantage of only working on one machine at the moment
(other
> one is being built).
> How do I get the debugger (never used it before :frowning: ) to show the
dbgmessages
> while working local. I think I need to select a process or something but
the
> driver does not appear anywhere.
>
> Apologies if I have supplies surplus information. As this driver fog
slowly
> lifts, I am sure I will be able to ask more sensible questions.
>
> Hylton
>
>
>

Ooh I can fix this one…

For returning information back from your driver to user mode you need to
set your Irp->IoStatus.Information to the number of bytes being
returned.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: Thursday, January 06, 2005 10:03 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Debugging Code - new to windbg

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question.
This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer),
&Returned,
NULL ))
to the driver. (I coppied the CTL_CODE marco from the DDK to ensure the
same
number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment
(other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the
dbgmessages
while working local. I think I need to select a process or something but
the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog
slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nsisoftware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Can’t help with the debugger question, but I think the problem in your
IOCTL code is that you’re not setting the length of the data returned,
which means that the OS code inbetween your app and the driver will not
copy back the data that you copied into the system buffer. I’ve only dealt
with IOCTLs for display miniports, but it uses the same overall principle.
There should be some field in your IRP that says how much data was
“created” by the IOCTL, which will then be copied back into the user-land
buffer (assuming the size of the buffer is big enough).


Mats

-------- Notice --------
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or any
action taken by you in reliance on it, is prohibited and may be unlawful.
If you have received this message in error, please delete it and contact
the sender immediately. Thank you.

xxxxx@lists.osr.com wrote on 01/06/2005 03:03:15 PM:

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question.
This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer),
&Returned,
NULL ))
to the driver. (I coppied the CTL_CODE marco from the DDK to ensure the
same
number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment
(other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the
dbgmessages
while working local. I think I need to select a process or something but
the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog
slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton


Questions? First check the Kernel Driver FAQ at http://www.
osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

ForwardSourceID:NT0000A5AA

In your driver you need to set Irp->IoStatus.Information to the size of
the data you want copied back.

BR,

Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: 06 January 2005 15:03
To: Windows System Software Devs Interest List
Subject: [ntdev] Debugging Code - new to windbg

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question.
This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer),
&Returned,
NULL ))
to the driver. (I coppied the CTL_CODE marco from the DDK to ensure the
same
number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment
(other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the
dbgmessages
while working local. I think I need to select a process or something but
the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog
slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@des.co.uk
To unsubscribe send a blank email to xxxxx@lists.osr.com

And yep you did.

Where do I find out more about this stuff. I would never have known that
that member existed, never mind what it was there for.

Thanks to all who did supply this answer.

Any takers on the second part of the question How do get the debugger to
show these messages (then I would have known that the driver was getting the
call) when working on a single machine.

This is a “got to tell someone moment”. My first ever response from a driver
with ioctl (never mind my own driver).

Very grateful
Hylton

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bohannon, Ivan
Sent: 06 January 2005 05:15 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

Ooh I can fix this one…

For returning information back from your driver to user mode you need to set
your Irp->IoStatus.Information to the number of bytes being returned.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: Thursday, January 06, 2005 10:03 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Debugging Code - new to windbg

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question.
This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer), &Returned,
NULL )) to the driver. (I coppied the CTL_CODE marco from the DDK to ensure
the same number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment (other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the dbgmessages
while working local. I think I need to select a process or something but the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nsisoftware.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Download Mark Russinovich’s DbgView from
http://www.sysinternals.com/ntw2k/freeware/debugview.shtml

-----Original Message-----
From: Hylton Tregenza [mailto:xxxxx@infofx.co.za]
Sent: Thursday, January 06, 2005 6:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

And yep you did.

Where do I find out more about this stuff. I would never have known that
that member existed, never mind what it was there for.

Thanks to all who did supply this answer.

Any takers on the second part of the question How do get the debugger to
show these messages (then I would have known that the driver was getting the
call) when working on a single machine.

This is a “got to tell someone moment”. My first ever response from a driver
with ioctl (never mind my own driver).

Very grateful
Hylton

An IRP viewer might have helped debug this problem, I think the download
page on OSR has an IRP viewer util, I haven’t used it tho.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: Thursday, January 06, 2005 11:04 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

And yep you did.

Where do I find out more about this stuff. I would never have known that
that member existed, never mind what it was there for.

Thanks to all who did supply this answer.

Any takers on the second part of the question How do get the debugger
to
show these messages (then I would have known that the driver was getting
the
call) when working on a single machine.

This is a “got to tell someone moment”. My first ever response from a
driver
with ioctl (never mind my own driver).

Very grateful
Hylton

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bohannon, Ivan
Sent: 06 January 2005 05:15 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

Ooh I can fix this one…

For returning information back from your driver to user mode you need to
set
your Irp->IoStatus.Information to the number of bytes being returned.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: Thursday, January 06, 2005 10:03 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Debugging Code - new to windbg

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question.
This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer),
&Returned,
NULL )) to the driver. (I coppied the CTL_CODE marco from the DDK to
ensure
the same number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment
(other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the
dbgmessages
while working local. I think I need to select a process or something but
the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog
slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nsisoftware.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nsisoftware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Ok, I was going to stay out of this mess, but I’ve reached my limit here.

Debugging: use windbg. You need two systems, a test system and a development
system. DbgView is a very nice program, but new developers should start out
with the correct tool sets. They are confused enough, why prolong the
confusion?

IrpView: nice tool, not for his problem. The OP has no clue how to write a
driver, as his code sample and comments clearly show, and as I think he
would freely admit. Viewing IRP traces is not likely to help. You might as
well suggest that he learn sanskrit.

Hylton needs to get a good book on WDM drivers, Walter Oney’s “Programming
the Windows Driver Model”, Microsoft Press, would be a good start. Then he
needs to read the book, and maybe work through a couple of the examples.
Then he needs to go read the ddk and study the source code samples there. If
possible he should consider attending one of the seminars offered by the
various training companies.

Finally, I have no idea where Hylton got his source code model from, but he
should throw that crap out and use the samples in the DDK as a starting
point.

=====================
Mark Roddy

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bohannon, Ivan
Sent: Thursday, January 06, 2005 11:16 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

An IRP viewer might have helped debug this problem, I think the download
page on OSR has an IRP viewer util, I haven’t used it tho.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: Thursday, January 06, 2005 11:04 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

And yep you did.

Where do I find out more about this stuff. I would never have known that
that member existed, never mind what it was there for.

Thanks to all who did supply this answer.

Any takers on the second part of the question How do get the debugger to
show these messages (then I would have known that the driver was getting the
call) when working on a single machine.

This is a “got to tell someone moment”. My first ever response from a driver
with ioctl (never mind my own driver).

Very grateful
Hylton

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bohannon, Ivan
Sent: 06 January 2005 05:15 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Debugging Code - new to windbg

Ooh I can fix this one…

For returning information back from your driver to user mode you need to set
your Irp->IoStatus.Information to the number of bytes being returned.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hylton Tregenza
Sent: Thursday, January 06, 2005 10:03 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Debugging Code - new to windbg

Hi all

Still busy with my first foray into driver depths. Could someone please
supply an answer (or location to the answer) of the following question.
This
has to do with debugging.

I am trying to communicate with a test driver that I have created. I am
using a consol app and sending
DeviceIoControl(DriverHandle,IOCTL_IMPACKETCOUNTER_GETPACKETS, (LPVOID)
szBuffer, sizeof(szBuffer), (LPVOID) szBuffer, sizeof(szBuffer), &Returned,
NULL )) to the driver. (I coppied the CTL_CODE marco from the DDK to ensure
the same number was generated)

In the driver code I have the following

DBGPRINT((“==>Pt Dispatch\n”));
irpStack = IoGetCurrentIrpStackLocation(Irp);

switch (irpStack->MajorFunction)
{
case IRP_MJ_CREATE:
break;

case IRP_MJ_CLEANUP:
break;

case IRP_MJ_CLOSE:
break;

case IRP_MJ_DEVICE_CONTROL:

DBGPRINT((“DrvFltIp.SYS: IRP_MJ_DEVICE_CONTROL\n”));
ioControlCode =
irpStack->Parameters.DeviceIoControl.IoControlCode;
switch (ioControlCode)
{
case IOCTL_IMPACKETCOUNTER_GETPACKETS:
{

memcpy(Irp->AssociatedIrp.SystemBuffer, “Hello There”, sizeof(“Hello
There”));
}
break;
}
break;
default:
break;
}

I am not sure what is happening with this call. The return code from
DeviceIoControl is O (OK).
The buffer is not populated with the result.

I have the disadvantage of only working on one machine at the moment (other
one is being built).
How do I get the debugger (never used it before :frowning: ) to show the dbgmessages
while working local. I think I need to select a process or something but the
driver does not appear anywhere.

Apologies if I have supplies surplus information. As this driver fog slowly
lifts, I am sure I will be able to ask more sensible questions.

Hylton


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nsisoftware.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nsisoftware.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hylton Tregenza wrote:

Where do I find out more about this stuff. I would never have known that
that member existed, never mind what it was there for.

Well, this is a basic concept of Windows drivers.

Personally, I would have you find it on page 329 of our old NT V4 book
:slight_smile: But, I’m sure it’s in Oney’s WDM driver book and the DDK cover this
as well.

Or, you could find it in the article “Rules for Irp Dispatching and
Completion” on OSR Online at
http://www.osronline.com/article.cfm?article=214

Peter
OSR