ReactOS 0.4.16-dev-338-g34e76ad
CExtractIcon.cpp File Reference
#include "precomp.h"
Include dependency graph for CExtractIcon.cpp:

Go to the source code of this file.

Classes

struct  IconLocation
 
class  CExtractIcon
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
VOID DuplicateString (LPCWSTR Source, LPWSTR *Destination)
 
HRESULT WINAPI SHCreateDefaultExtractIcon (REFIID riid, void **ppv)
 
EXTERN_C HRESULT WINAPI SHCreateFileExtractIconW (_In_ LPCWSTR pszFile, _In_ DWORD dwFileAttributes, _In_ REFIID riid, _Outptr_ void **ppv)
 

Function Documentation

◆ DuplicateString()

VOID DuplicateString ( LPCWSTR  Source,
LPWSTR Destination 
)

Definition at line 72 of file CExtractIcon.cpp.

75{
76 SIZE_T cb;
77
78 if (*Destination)
80
81 cb = (wcslen(Source) + 1) * sizeof(WCHAR);
83 if (!*Destination)
84 return;
86}
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3016
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define CopyMemory
Definition: winbase.h:1735
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ SHCreateDefaultExtractIcon()

◆ SHCreateFileExtractIconW()

EXTERN_C HRESULT WINAPI SHCreateFileExtractIconW ( _In_ LPCWSTR  pszFile,
_In_ DWORD  dwFileAttributes,
_In_ REFIID  riid,
_Outptr_ void **  ppv 
)

Definition at line 351 of file CExtractIcon.cpp.

356{
357 SHFILEINFOW shfi;
359 HRESULT hr = E_FAIL;
360 if (firet)
361 {
365 return hr;
366
367 hr = iconInit->SetNormalIcon(shfi.szDisplayName, shfi.iIcon);
369 return hr;
370
371 return iconInit->QueryInterface(riid, ppv);
372 }
374 return hr;
375
376 return hr;
377}
HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv)
DWORD dwFileAttributes
#define E_FAIL
Definition: ddrawi.h:102
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
Definition: shell32_main.c:430
#define SHGFI_ICONLOCATION
Definition: shellapi.h:170
#define SHGFI_USEFILEATTRIBUTES
Definition: shellapi.h:182
HRESULT hr
Definition: shlfolder.c:183
WCHAR szDisplayName[MAX_PATH]
Definition: shellapi.h:376
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IID_PPV_ARG(Itype, ppType)

Referenced by CFontExt::GetUIObjectOf(), CZipFolder::GetUIObjectOf(), CCabFolder::GetUIObjectOf(), and RecycleBin5File::QueryInterface().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )