Επεξεργασία

Κοινή χρήση μέσω


IShellImageData::GetResolution method (shimgdata.h)

Gets the resolution, in dots per inch (dpi), of the image.

Syntax

HRESULT GetResolution(
  [out] ULONG *puResolutionX,
  [out] ULONG *puResolutionY
);

Parameters

[out] puResolutionX

Type: ULONG*

A pointer to the horizontal resolution.

[out] puResolutionY

Type: ULONG*

A pointer to the vertical resolution.

Return value

Type: HRESULT

Returns S_OK if successful or an error value otherwise, including the following:

Return code Description
E_FAIL
The image has not been decoded, the decode process failed, or the resolution cannot be retrieved. In the latter case, both puResolutionX and puResolutionY are set to 0.
E_INVALIDARG
Both puResolutionX and puResolutionY are NULL.

Remarks

If either puResolutionX or puResolutionY are NULL, the method returns only the value for the non-null parameter.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shimgdata.h
DLL Shell32.dll