IShellImageData::Decode method
Decodes the image file, setting state.
Syntax
HRESULT Decode( [in] DWORD dwFlags, [in] ULONG cxDesired, [in] ULONG cyDesired );
Parameters
- dwFlags [in]
-
Type: DWORD
One of the following flags.
- cxDesired [in]
-
Type: ULONG
The desired horizontal size of the decoded image. This parameter is only used if the SHIMGDEC_THUMBNAIL flag is set. If the SHIMGDEC_DEFAULT flag is set instead, this value is ignored.
- cyDesired [in]
-
Type: ULONG
The desired vertical size of the decoded image. This parameter is only used if the SHIMGDEC_THUMBNAIL flag is set. If the SHIMGDEC_DEFAULT flag is set instead, this value is ignored.
Return value
Type: HRESULT
Returns S_OK if successful, or an error value otherwise, including the following:
| Return code | Description |
|---|---|
|
The file could not be loaded or the calling application stopped the decode process through a call to a registered IShellImageDataAbort (see IShellImageData::RegisterAbort for more information). |
|
The internal object cannot be instantiated. |
|
The path used to create this instance of IShellImageData was a URL. |
|
The image has already been decoded. |
Remarks
IShellImageData::Decode must be called prior to calling most IShellImageData methods. Not doing so causes those methods to fail.
IShellImageData::Decode attempts to maintain the aspect ratio of the original image, so one of the values passed in cxDesired or cyDesired might be overridden to do so.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
IDL |
|
|
DLL |
|