ResUtilGetResourceDependentIPAddressProps function

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 WINAPI ResUtilGetResourceDependentIPAddressProps(
  _In_     HRESOURCE hResource,
  _Out_    LPWSTR pszAddress,
  _Inout_  DWORD *pcchAddress,
  _Out_    LPWSTR pszSubnetMask,
  _Inout_  DWORD *pcchSubnetMask,
  _Out_    LPWSTR pszNetwork,
  _Inout_  DWORD *pcchNetwork
);

typedef DWORD (WINAPI *PRESUTIL_GET_RESOURCE_DEPENDENTIP_ADDRESS_PROPS)(
    _In_     HRESOURCE hResource,
    _Out_    LPWSTR pszAddress,
    _Inout_  DWORD *pcchAddress,
    _Out_    LPWSTR pszSubnetMask,
    _Inout_  DWORD *pcchSubnetMask,
    _Out_    LPWSTR pszNetwork,
    _Inout_  DWORD *pcchNetwork
);

Parameters

hResource [in]

Handle to the resource to query for dependencies.

pszAddress [out]

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

pcchAddress [in, out]

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 [out]

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

pcchSubnetMask [in, out]

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 [out]

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

pcchNetwork [in, out]

Windows Server 2008 R2 and Windows Server 2012:  This parameter replaced the pcch parameter inWindows Server 2012 R2.

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.

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/valueDescription
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 2003 Enterprise, Windows Server 2003 Datacenter

Header

ResApi.h

Library

ResUtils.lib

DLL

ResUtils.dll

See also

Resource Utility Functions
ResUtilFindDependentDiskResourceDriveLetter
ResUtilGetResourceDependency
ResUtilGetResourceDependencyByClass
ResUtilGetResourceDependencyByName
ResUtilGetResourceNameDependency

 

 

Show:
© 2014 Microsoft