Home | Info | Community | Development | myReactOS | Contact Us
[virtual]
Implements IExtractIconA.
Definition at line 251 of file extracticon.cpp.
{ LPWSTR pszFileW = NULL; HRESULT hr; if (pszFile) { int nLength; nLength = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); if (nLength == 0) return E_FAIL; pszFileW = (LPWSTR)CoTaskMemAlloc(nLength * sizeof(WCHAR)); if (!pszFileW) return E_OUTOFMEMORY; if (!MultiByteToWideChar(CP_ACP, 0, pszFile, nLength, pszFileW, nLength)) { CoTaskMemFree(pszFileW); return E_FAIL; } } hr = Extract(pszFileW, nIconIndex, phiconLarge, phiconSmall, nIconSize); if (pszFileW) CoTaskMemFree(pszFileW); return hr; }