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(
[in] HRESOURCE hResource,
[out] LPWSTR pszAddress,
[in, out] DWORD *pcchAddress,
[out] LPWSTR pszSubnetMask,
[in, out] DWORD *pcchSubnetMask,
[out] LPWSTR pszNetwork,
[in, out] DWORD *pcchNetwork
);
Parameters
[in] hResource
Handle to the resource to query for dependencies.
[out] pszAddress
Output buffer for returning the value of the Address private property.
[in, out] 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.
[out] pszSubnetMask
Output buffer for returning the value of the SubnetMask private property.
[in, out] 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.
[out] pszNetwork
Output buffer for returning the value of the Network private property.
[in, out] 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 |
---|---|
|
No IP Address dependency was found in the specified resource's list of dependencies. |
|
No IP Address dependency was found. |
|
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
Requirement | Value |
---|---|
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
ResUtilGetResourceDependencyByClass
ResUtilGetResourceDependencyByName