ResUtilGetResourceDependentIPAddressProps function (resapi.h)

Retrieves the private properties of the first IP Address dependency found for a specified resource. The PRESUTIL_GET_RESOURCE_DEPENDENTIP_ADDRESS_PROPS type defines a pointer to this function.

Syntax

DWORD ResUtilGetResourceDependentIPAddressProps(
  HRESOURCE hResource,
  LPWSTR    pszAddress,
  DWORD     *pcchAddress,
  LPWSTR    pszSubnetMask,
  DWORD     *pcchSubnetMask,
  LPWSTR    pszNetwork,
  DWORD     *pcchNetwork
);

Parameters

hResource

Handle to the resource to query for dependencies.

pszAddress

Output buffer for returning the value of the Address private property.

pcchAddress

On input, specifies the size of the pszAddress buffer as a count of WCHARs. On output, specifies the size of the resulting data as a count of WCHARs that includes the terminating NULL.

pszSubnetMask

Output buffer for returning the value of the SubnetMask private property.

pcchSubnetMask

On input, specifies the size of the pszSubnetMask buffer as a count of WCHARs. On output, specifies the size of the resulting data as a count of WCHARs that includes the terminating NULL.

pszNetwork

Output buffer for returning the value of the Network private property.

pcchNetwork

On input, specifies the size of the pszNetwork buffer as a count of WCHARs. On output, specifies the size of the resulting data as a count of WCHARs that includes the terminating NULL.

Windows Server 2008 R2 and Windows Server 2008:  This parameter is named pcch prior to Windows Server 2012.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS (0).

If the operation fails, the function returns a system error code. The following are possible error codes.

Return code/value Description
ERROR_NO_MORE_ITEMS
259 (0x103)
No IP Address dependency was found in the specified resource's list of dependencies.
ERROR_RESOURCE_NOT_PRESENT
4316 (0x10DC)
No IP Address dependency was found.
ERROR_MORE_DATA
234 (0xEA)
The size of one of the buffers was too small to hold the resulting data.

Remarks

Do not call ResUtilGetResourceDependentIPAddressProps from any resource DLL entry point function. ResUtilGetResourceDependentIPAddressProps can safely be called from a worker thread. For more information, see Function Calls to Avoid in Resource DLLs.

The ResUtilGetResourceDependentIPAddressProps function returns only the private properties for the first IPv4 resource that the resource directly depends on. The function does not examine indirect dependencies (such as a resource that depends on a network Name resource that in turn depends on an IP Address resource), IPv6 Address resources, or IPv6 Tunnel Address resources.

Requirements

   
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header resapi.h
Library ResUtils.lib
DLL ResUtils.dll

See also

ResUtilFindDependentDiskResourceDriveLetter

ResUtilGetResourceDependency

ResUtilGetResourceDependencyByClass

ResUtilGetResourceDependencyByName

ResUtilGetResourceNameDependency

Resource Utility Functions