PRB: Cannot Free ResUtilGetEnvironmentWithNetName() Buffer

Last reviewed: March 18, 1998
Article ID: Q182660
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows NT Server Enterprise Edition version 4.0

SYMPTOMS

ResUtilGetEnvironmentWithNetName() allocates and returns a buffer. There is no corresponding function to release the allocated memory.

CAUSE

The routine used to allocate the memory is an internal function, as is the corresponding routine that is used to free the memory block.

RESOLUTION

You can avoid the problem by allocating the memory for the new environment yourself and setting the _CLUSTER_NETWORK_NAME_ environment variable to the network name associated with the resource.

See the REFERENCES section for more information on getting the current environment and finding the network name for the resource.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

REFERENCES

GetClusterResourceNetworkName() GetEnvironmentStrings()

Keywords          : kbcluster
Version           : WINNT:4.0
Platform          : winnt
Issue type        : kbprb
Solution Type     : kbpending


================================================================================


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