[This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.]
Creates an array of handles to icons that are extracted from a specified file.
UINT PrivateExtractIconsA( LPCSTR szFileName, int nIconIndex, int cxIcon, int cyIcon, HICON *phicon, UINT *piconid, UINT nIcons, UINT flags );
The path and name of the file from which the icon(s) are to be extracted.
The zero-based index of the first icon to extract. For example, if this value is zero, the function extracts the first icon in the specified file.
The horizontal icon size wanted. See Remarks.
The vertical icon size wanted. See Remarks.
A pointer to the returned array of icon handles.
A pointer to a returned resource identifier for the icon that best fits the current display device. The returned identifier is 0xFFFFFFFF if the identifier is not available for this format. The returned identifier is 0 if the identifier cannot otherwise be obtained.
The number of icons to extract from the file. This parameter is only valid when extracting from .exe and .dll files.
Specifies flags that control this function. These flags are the LR_* flags used by the LoadImage function.
If the phiconparameter is NULL and this function succeeds, then the return value is the number of icons in the file. If the function fails then the return value is 0.
If the phicon parameter is not NULL and the function succeeds, then the return value is the number of icons extracted. Otherwise, the return value is 0xFFFFFFFF if the file is not found.
This function extracts from executable (.exe), DLL (.dll), icon (.ico), cursor (.cur), animated cursor (.ani), and bitmap (.bmp) files. Extractions from Windows 3.x 16-bit executables (.exe or .dll) are also supported.
The cxIcon and
cyIcon parameters specify the
size of the icons to extract. Two sizes can be extracted by putting the
first size in the LOWORD of the parameter and the second size in the HIWORD.
MAKELONG(24, 48) for both the cxIcon and cyIcon parameters would extract
both 24 and 48 size icons.
You must destroy all icons extracted by PrivateExtractIconsby calling the DestroyIcon function.
This function was not included in the SDK headers and libraries until Windows XP Service Pack 1 (SP1) and Windows Server 2003. If you do not have a header file and import library for this function, you can call the function using LoadLibrary and GetProcAddress.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|