DOC: Freeing Allocated Resources with IoAssignResources()

Last reviewed: April 7, 1997
Article ID: Q133705
3.51 WINDOWS NT kbprg kbdocerr kbdocfix

The information in this article applies to:

  • Microsoft Win32 DDK (Device Development Kit) for Windows NT, version 3.51

SUMMARY

The Microsoft Win32 DDK version 3.51 online documentation incorrectly states that a device driver must call the IoAssignResources() function with a RequestedResources list specifying zero as the IO_RESOURCE_REQUIREMENTS_LIST's ListSize value to erase its claim on resources. The correct way for a driver to erase its claim on resources is to call the IoAssignResources() function with a value of NULL for the RequestedResources parameter.

MORE INFORMATION

A device driver should use the same API function to free resources that it used to allocate them. If the IoAssignResources() function is used to allocate resources, the IoAssignResources() function should be used to free them. If the IoReportResourceUsage() function is used to allocate resources, the IoReportResourceUsage() function should be used to free them. Note that these two API functions use different methods of freeing the resources they have claimed.

A caller of the HalAssignSlotResources() function should use the IoAssignResources() function to free the resources it claimed because this API function internally calls the IoAssignResources() function.

This documentation error has been corrected in the Windows NT DDK version 4.0 online documentation.


KBCategory: kbprg kbdocerr kbdocfix
KBSubcategory:
Additional reference words: 3.51 4.00 NTDDK ResourceList Registry
Keywords : kbprg NTDDKKMode kbdocerr kbdocfix
Version : 3.51
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.