DDK-Under “IoBuildDeviceIoControlRequest” says:
- When the next-lower driver completes this IRP, the I/O Manager releases
it.
The sentence below it says
- IRPs created using IoBuildDeviceIoControlRequest must be completed by
calling IoCompleteRequest and not by merely deallocating the IRP with
IoFreeIrp.
1st sentence says that “I/O Manager releases the IRP” whereas 2nd indicates
that “it must be freed with IoFreeIrp”. What is true?
The second sentence ought to be ashamed of itself. “not be merely” ought to
be restated as “never by”.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Abhijit
Sent: Tuesday, March 09, 2004 4:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
DDK-Under “IoBuildDeviceIoControlRequest” says:
- When the next-lower driver completes this IRP, the I/O
Manager releases it.
The sentence below it says
- IRPs created using IoBuildDeviceIoControlRequest must be
completed by calling IoCompleteRequest and not by merely
deallocating the IRP with IoFreeIrp.
1st sentence says that “I/O Manager releases the IRP” whereas
2nd indicates that “it must be freed with IoFreeIrp”. What is true?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
Hi Abhijit,
Release and Deallocation has entirely difference meaning.
Good Luck,
From: “Abhijit”
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
>Date: Tue, 9 Mar 2004 01:26:29 -0800
>
>DDK-Under “IoBuildDeviceIoControlRequest” says:
>
>1. When the next-lower driver completes this IRP, the I/O Manager releases
>it.
>
>The sentence below it says
>
>2. IRPs created using IoBuildDeviceIoControlRequest must be completed by
>calling IoCompleteRequest and not by merely deallocating the IRP with
>IoFreeIrp.
>
>
>1st sentence says that “I/O Manager releases the IRP” whereas 2nd indicates
>that “it must be freed with IoFreeIrp”. What is true?
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
Post Classifieds on MSN classifieds. Buy and Sell on MSN Classifieds.
I think, in this context they mean the same. i.e. Release = Deallocation.
“yatindra vaishnav” wrote in message news:xxxxx@ntdev…
Hi Abhijit,
Release and Deallocation has entirely difference meaning.
Good Luck,
>From: “Abhijit”
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
>Date: Tue, 9 Mar 2004 01:26:29 -0800
>
>DDK-Under “IoBuildDeviceIoControlRequest” says:
>
>1. When the next-lower driver completes this IRP, the I/O Manager releases
>it.
>
>The sentence below it says
>
>2. IRPs created using IoBuildDeviceIoControlRequest must be completed by
>calling IoCompleteRequest and not by merely deallocating the IRP with
>IoFreeIrp.
>
>
>1st sentence says that “I/O Manager releases the IRP” whereas 2nd indicates
>that “it must be freed with IoFreeIrp”. What is true?
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
------------------------------------------------------------------------------
Post Classifieds on MSN classifieds. Buy and Sell on MSN Classifieds.
No, It is not same.
Good Luck
From: “Abhijit”
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: Re:[ntdev] IoBuildDeviceIoControlRequest confusion
>Date: Tue, 9 Mar 2004 04:27:27 -0800
>
>I think, in this context they mean the same. i.e. Release = Deallocation.
>
>
> “yatindra vaishnav” wrote in message news:xxxxx@ntdev…
> Hi Abhijit,
>
> Release and Deallocation has entirely difference meaning.
>
>
>
> Good Luck,
>
>
>
>
>
> >From: “Abhijit”
> >Reply-To: “Windows System Software Devs Interest List”
> >To: “Windows System Software Devs Interest List”
> >Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
> >Date: Tue, 9 Mar 2004 01:26:29 -0800
> >
> >DDK-Under “IoBuildDeviceIoControlRequest” says:
> >
> >1. When the next-lower driver completes this IRP, the I/O Manager releases
> >it.
> >
> >The sentence below it says
> >
> >2. IRPs created using IoBuildDeviceIoControlRequest must be completed by
> >calling IoCompleteRequest and not by merely deallocating the IRP with
> >IoFreeIrp.
> >
> >
> >1st sentence says that “I/O Manager releases the IRP” whereas 2nd indicates
> >that “it must be freed with IoFreeIrp”. What is true?
> >
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>------------------------------------------------------------------------------
> Post Classifieds on MSN classifieds. Buy and Sell on MSN Classifieds.
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
The world of entertainment. With all its spice & gossip! Specially for you!
Do not free the IRP with IoFreeIrp. Just let the irp complete and it
will be freed once the last completion routine has been executed. So if
you set a completion routine, if return something other then
STATUS_MORE_PROCESSING_REQUIRED, the irp will be freed.
D
This posting is provided “AS IS” with no warranties, and confers no
rights
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Abhijit
Sent: Tuesday, March 09, 2004 1:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
DDK-Under “IoBuildDeviceIoControlRequest” says:
- When the next-lower driver completes this IRP, the I/O Manager
releases
it.
The sentence below it says
- IRPs created using IoBuildDeviceIoControlRequest must be completed by
calling IoCompleteRequest and not by merely deallocating the IRP with
IoFreeIrp.
1st sentence says that “I/O Manager releases the IRP” whereas 2nd
indicates
that “it must be freed with IoFreeIrp”. What is true?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
It certainly is a doc bug. “Not by merely” does not mean “don’t do this”.
=====================
Mark Roddy
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, March 09, 2004 12:35 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoBuildDeviceIoControlRequest confusion
Do not free the IRP with IoFreeIrp. Just let the irp
complete and it will be freed once the last completion
routine has been executed. So if you set a completion
routine, if return something other then
STATUS_MORE_PROCESSING_REQUIRED, the irp will be freed.
D
This posting is provided “AS IS” with no warranties, and
confers no rights
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Abhijit
Sent: Tuesday, March 09, 2004 1:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
DDK-Under “IoBuildDeviceIoControlRequest” says:
- When the next-lower driver completes this IRP, the I/O
Manager releases it.
The sentence below it says
- IRPs created using IoBuildDeviceIoControlRequest must be
completed by calling IoCompleteRequest and not by merely
deallocating the IRP with IoFreeIrp.
1st sentence says that “I/O Manager releases the IRP” whereas
2nd indicates that “it must be freed with IoFreeIrp”. What is true?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@windows.microsoft.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:
xxxxx@stratus.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
The important part is “must be completed by calling IoCompleteRequest” and
the rest only warns about possible mistake. “must be… by… and not by” is
clear (even with my English :).
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
From: xxxxx@stratus.com[SMTP:xxxxx@stratus.com]
Reply To: xxxxx@lists.osr.com
Sent: Tuesday, March 09, 2004 7:50 PM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] IoBuildDeviceIoControlRequest confusion
It certainly is a doc bug. “Not by merely” does not mean “don’t do this”.
=====================
Mark Roddy
> -----Original Message-----
> From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
> Sent: Tuesday, March 09, 2004 12:35 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] IoBuildDeviceIoControlRequest confusion
>
> Do not free the IRP with IoFreeIrp. Just let the irp
> complete and it will be freed once the last completion
> routine has been executed. So if you set a completion
> routine, if return something other then
> STATUS_MORE_PROCESSING_REQUIRED, the irp will be freed.
>
> D
>
> This posting is provided “AS IS” with no warranties, and
> confers no rights
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Abhijit
> Sent: Tuesday, March 09, 2004 1:26 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
>
> DDK-Under “IoBuildDeviceIoControlRequest” says:
>
> 1. When the next-lower driver completes this IRP, the I/O
> Manager releases it.
>
> The sentence below it says
>
> 2. IRPs created using IoBuildDeviceIoControlRequest must be
> completed by calling IoCompleteRequest and not by merely
> deallocating the IRP with IoFreeIrp.
>
>
> 1st sentence says that “I/O Manager releases the IRP” whereas
> 2nd indicates that “it must be freed with IoFreeIrp”. What is true?
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.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:
> xxxxx@stratus.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: michal.vodicka@st.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Well in the horrid american english vernacular I grew up with “not by
merely” does not mean “don’t do this”, it means something more like “this is
not sufficient”. The sloppiness in the DDK documentation is a matter of
historic record.
But really who cares? Just don’t do it. The feedback is rather immediate
anyhow 
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Tuesday, March 09, 2004 2:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoBuildDeviceIoControlRequest confusion
The important part is “must be completed by calling
IoCompleteRequest” and the rest only warns about possible
mistake. “must be… by… and not by” is clear (even with my
English :).
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
> ----------
> From: xxxxx@stratus.com[SMTP:xxxxx@stratus.com]
> Reply To: xxxxx@lists.osr.com
> Sent: Tuesday, March 09, 2004 7:50 PM
> To: xxxxx@lists.osr.com
> Subject: RE: [ntdev] IoBuildDeviceIoControlRequest confusion
>
> It certainly is a doc bug. “Not by merely” does not mean
“don’t do this”.
>
>
> =====================
> Mark Roddy
>
>
> > -----Original Message-----
> > From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
> > Sent: Tuesday, March 09, 2004 12:35 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] IoBuildDeviceIoControlRequest confusion
> >
> > Do not free the IRP with IoFreeIrp. Just let the irp
complete and
> > it will be freed once the last completion routine has
been executed.
> > So if you set a completion routine, if return something
other then
> > STATUS_MORE_PROCESSING_REQUIRED, the irp will be freed.
> >
> > D
> >
> > This posting is provided “AS IS” with no warranties, and
confers no
> > rights
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Abhijit
> > Sent: Tuesday, March 09, 2004 1:26 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
> >
> > DDK-Under “IoBuildDeviceIoControlRequest” says:
> >
> > 1. When the next-lower driver completes this IRP, the I/O Manager
> > releases it.
> >
> > The sentence below it says
> >
> > 2. IRPs created using IoBuildDeviceIoControlRequest must be
> > completed by calling IoCompleteRequest and not by merely
> > deallocating the IRP with IoFreeIrp.
> >
> >
> > 1st sentence says that “I/O Manager releases the IRP” whereas 2nd
> > indicates that “it must be freed with IoFreeIrp”. What is true?
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@windows.microsoft.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:
> > xxxxx@stratus.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: michal.vodicka@st.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:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
Both the statements are true.
The first one refers to the path where you allocated the Irp and havent
passed it down to another driver. For example
- I allocated IRP using IoBuildDeviceIoControlRequest for performing an
action X.
- while in the process of preparing the data, due to some error I have
decided I have to abort sending the IRP.
- As I am not passing this IRP to the target driver, I have to free it.
The correct method for freeing is calling IoCompleteRequest.
IoCompleteRequest does some required processing on IRP before freeing
the Irp(like freeing system buffers allocated for METHOD_BUFFERED IOCTL,
free allocated MDL for METHOD_IN_DIRECT/METHOD_OUT_DIRECT IOCTLS etc…
This is not a complete list).
The second one refers to the path where you allocated the Irp and passed
it to the target driver with out setting a completion routine. In this
case the Irp is freed by system when the lower driver calls
IoCompleteRequest.
If you disassemble the IoBuildDeviceIoControlRequest and see what it
does for METHOD_BUFFERED, METHOD_IN_DIRECT, METHOD_OUT_DIRECT and
METHOD_NEITHER IOCTLS, you would understand why you have to call
IoCompleteRequest instead of IoFreeIrp.
-Srin.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Abhijit
Sent: Tuesday, March 09, 2004 1:26 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoBuildDeviceIoControlRequest confusion
DDK-Under “IoBuildDeviceIoControlRequest” says:
- When the next-lower driver completes this IRP, the I/O
Manager releases it.
The sentence below it says
- IRPs created using IoBuildDeviceIoControlRequest must be
completed by calling IoCompleteRequest and not by merely
deallocating the IRP with IoFreeIrp.
1st sentence says that “I/O Manager releases the IRP” whereas
2nd indicates that “it must be freed with IoFreeIrp”. What is true?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com