How To Use Configuration Manager to Get Free Resource Info

Last reviewed: July 1, 1996
Article ID: Q152540
The information in this article applies to:
  • Microsoft Win32 Device Driver Kit (DDK) for Windows 95, version 4.0

SUMMARY

This article describes how to obtain free resource information on memory, IO, DMA, and IRQ in Windows 95 by using the CONFIGMG_Query_Arbitrator_Free_Data function. The following information is based on documentation from the Windows 95 Device Driver Programmer's Reference, with additional information added for completeness:

CONFIGRET CONFIGMG_Query_Arbitrator_Free_Data(PFARVOID pData, ULONG DataLen, DEVNODE dnDevNode, RESOURCEID ResourceID, ULONG ulFlags)

MORE INFORMATION

Return Value

Returns CR_SUCCESS if the function is successful. Otherwise, the return value can be CR_BUFFER_SMALL, CR_FAILURE, CR_INVALID_DEVNODE, CR_INVALID_FLAG, CR_INVALID_POINTER, CR_INVALID_RESOURCEID or CR_NO_ARBITRATOR.

Parameters

pData:

   Address of a buffer that receives the free information. This information
   is arbitrator-specific. The buffer can be of type MEMA_ARB, IOA_ARB,
   DMA_ARB, and IRQ_ARB. See the \ddk\inc32\configmg.h header file for more
   information on these structure types.

DataLen:

   The size (in bytes) of the data buffer.  Use the
   CONFIGMG_Query_Arbitrator_Free_Size function to obtain the correct
   size for the buffer.

dnDevNode:

   Device node associated with the arbitrator. This is most meaningful for
   local arbitrators. (Although any device node can be used for global
   arbitrators, this parameter should specify the root or NULL in that
   case.)

ResourceID:

   One of the resource identifiers listed in the ResourceId parameter of
   the CONFIGMG_Add_Res_Des function. This function returns
   CR_INVALID_RESOURCEID if this value is ResType_All or ResType_None.

ulFlags:

   Must be zero.

Comments:

   This function succeeds even when it returns CR_BUFFER_SMALL. To avoid
   this error, call CONFIGMG_Query_Arbitrator_Free_Size before calling this
   function.

   You need to call Configuration Manager functions using the correct
   naming scheme. The function names should begin with CM_, not CONFIGMG_.

REFERENCES

See the Windows 95 DDK for more information on Configuration Manager and Plug and Play.


Additional reference words: 4.00
KBCategory: kbprg kbhowto
KBSubcategory: DdkMisc



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: July 1, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.