UINT WINAPI ExtractIconEx(
_In_ LPCTSTR lpszFile,
_In_ int nIconIndex,
_Out_opt_ HICON *phiconLarge,
_Out_opt_ HICON *phiconSmall,
_In_ UINT nIcons
);
-
参数意义详见msdn:https://msdn.microsoft.com/en-us/library/windows/desktop/ms648069(v=vs.85).aspx
Return value
Type: UINT
If the nIconIndex parameter is -1, the phiconLarge parameter is NULL, and the phiconSmall parameter is NULL, then the return value is the number of icons contained in the specified file. Otherwise, the return value is the number of icons successfully extracted from the file.
example:
UINT iconNum = ExtractIconEx(IconFilePath, -1, NULL, NULL, 0);