ReactOS  0.4.15-dev-1200-gc3b3fcd
CShellLink.cpp File Reference
#include "precomp.h"
#include <appmgmt.h>
#include "pshpack1.h"
#include "poppack.h"
Include dependency graph for CShellLink.cpp:

Go to the source code of this file.

Classes

struct  LOCATION_INFO
 
struct  LOCAL_VOLUME_INFO
 
struct  volume_info
 

Macros

#define ICON_LINK_WINDOWS_COMPAT
 
#define SHLINK_LOCAL   0
 
#define SHLINK_REMOTE   1
 
#define LNK_EXT_INDEX   4
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
static HRESULT ShellLink_UpdatePath (LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR *psPath)
 
static LPWSTR __inline HEAP_strdupAtoW (HANDLE heap, DWORD flags, LPCSTR str)
 
static LPWSTR __inline strdupW (LPCWSTR src)
 
static HRESULT Stream_LoadString (IStream *stm, BOOL unicode, LPWSTR *pstr)
 
static BOOL ShellLink_GetVolumeInfo (LPCWSTR path, CShellLink::volume_info *volume)
 
static HRESULT Stream_ReadChunk (IStream *stm, LPVOID *data)
 
static BOOL Stream_LoadVolume (LOCAL_VOLUME_INFO *vol, CShellLink::volume_info *volume)
 
static LPWSTR Stream_LoadPath (LPCSTR p, DWORD maxlen)
 
static HRESULT Stream_LoadLocation (IStream *stm, CShellLink::volume_info *volume, LPWSTR *path)
 
static HRESULT Stream_WriteString (IStream *stm, LPCWSTR str)
 
static HRESULT Stream_WriteLocationInfo (IStream *stm, LPCWSTR path, CShellLink::volume_info *volume)
 
static BOOL SHELL_ExistsFileW (LPCWSTR path)
 
static LPWSTR shelllink_get_msi_component_path (LPWSTR component)
 
static HRESULT SHELL_PidlGetIconLocationW (PCIDLIST_ABSOLUTE pidl, UINT uFlags, PWSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags)
 
static LPWSTR GetAdvertisedArg (LPCWSTR str)
 
static BOOL HACKISH_PathResolve (IN OUT PWSTR pszPath, IN PZPCWSTR dirs OPTIONAL, IN UINT fFlags)
 
INT_PTR CALLBACK ExtendedShortcutProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
LPWSTR SH_GetTargetTypeByPath (LPCWSTR lpcwFullPath)
 
HRESULT WINAPI IShellLink_ConstructFromPath (WCHAR *path, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI IShellLink_ConstructFromFile (IShellFolder *psf, LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv)
 

Macro Definition Documentation

◆ ICON_LINK_WINDOWS_COMPAT

#define ICON_LINK_WINDOWS_COMPAT

Definition at line 152 of file CShellLink.cpp.

◆ LNK_EXT_INDEX

#define LNK_EXT_INDEX   4

◆ SHLINK_LOCAL

#define SHLINK_LOCAL   0

Definition at line 154 of file CShellLink.cpp.

◆ SHLINK_REMOTE

#define SHLINK_REMOTE   1

Definition at line 155 of file CShellLink.cpp.

Function Documentation

◆ ExtendedShortcutProc()

INT_PTR CALLBACK ExtendedShortcutProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2745 of file CShellLink.cpp.

2747 {
2748  switch(uMsg)
2749  {
2750  case WM_INITDIALOG:
2751  if (lParam)
2752  {
2753  HWND hDlgCtrl = GetDlgItem(hwndDlg, IDC_SHORTEX_RUN_DIFFERENT);
2754  SendMessage(hDlgCtrl, BM_SETCHECK, BST_CHECKED, 0);
2755  }
2756  return TRUE;
2757  case WM_COMMAND:
2758  {
2759  HWND hDlgCtrl = GetDlgItem(hwndDlg, IDC_SHORTEX_RUN_DIFFERENT);
2760  if (LOWORD(wParam) == IDOK)
2761  {
2762  if (SendMessage(hDlgCtrl, BM_GETCHECK, 0, 0) == BST_CHECKED)
2763  EndDialog(hwndDlg, 1);
2764  else
2765  EndDialog(hwndDlg, 0);
2766  }
2767  else if (LOWORD(wParam) == IDCANCEL)
2768  {
2769  EndDialog(hwndDlg, -1);
2770  }
2772  {
2773  if (SendMessage(hDlgCtrl, BM_GETCHECK, 0, 0) == BST_CHECKED)
2774  SendMessage(hDlgCtrl, BM_SETCHECK, BST_UNCHECKED, 0);
2775  else
2776  SendMessage(hDlgCtrl, BM_SETCHECK, BST_CHECKED, 0);
2777  }
2778  }
2779  }
2780  return FALSE;
2781 }
#define IDOK
Definition: winuser.h:824
#define TRUE
Definition: types.h:120
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define IDC_SHORTEX_RUN_DIFFERENT
Definition: shresdef.h:432
#define FALSE
Definition: types.h:117
#define BM_GETCHECK
Definition: winuser.h:1900
#define BM_SETCHECK
Definition: winuser.h:1903
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1722
#define BST_UNCHECKED
Definition: winuser.h:199
#define BST_CHECKED
Definition: winuser.h:197
#define SendMessage
Definition: winuser.h:5818
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by CShellLink::OnCommand().

◆ GetAdvertisedArg()

static LPWSTR GetAdvertisedArg ( LPCWSTR  str)
static

Definition at line 2012 of file CShellLink.cpp.

2013 {
2014  if (!str)
2015  return NULL;
2016 
2017  LPCWSTR p = wcschr(str, L':');
2018  if (!p)
2019  return NULL;
2020 
2021  DWORD len = p - str;
2022  LPWSTR ret = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (len + 1));
2023  if (!ret)
2024  return ret;
2025 
2026  memcpy(ret, str, sizeof(WCHAR)*len);
2027  ret[len] = 0;
2028  return ret;
2029 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
static const WCHAR L[]
Definition: oid.c:1250
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CShellLink::SetAdvertiseInfo().

◆ HACKISH_PathResolve()

static BOOL HACKISH_PathResolve ( IN OUT PWSTR  pszPath,
IN PZPCWSTR dirs  OPTIONAL,
IN UINT  fFlags 
)
static

Definition at line 2186 of file CShellLink.cpp.

2190 {
2191  // FIXME: This is unimplemented!!!
2192 #if 0
2193  return PathResolve(pszPath, dirs, fFlags);
2194 #else
2195  BOOL Success = FALSE;
2196  USHORT i;
2197  LPWSTR fname = NULL;
2199 
2200  /* First, search for a valid existing path */
2201 
2202  // NOTE: See also: SHELL_FindExecutable()
2203 
2204  /*
2205  * List of extensions searched for, by PathResolve with the flag
2206  * PRF_TRYPROGRAMEXTENSIONS == PRF_EXECUTABLE | PRF_VERIFYEXISTS set,
2207  * according to MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/bb776478(v=vs.85).aspx
2208  */
2209  static PCWSTR Extensions[] = {L".pif", L".com", L".bat", L".cmd", L".lnk", L".exe", NULL};
2210  #define LNK_EXT_INDEX 4 // ".lnk" has index 4 in the array above
2211 
2212  /*
2213  * Start at the beginning of the list if PRF_EXECUTABLE is set, otherwise
2214  * just use the last element 'NULL' (no extension checking).
2215  */
2216  i = ((fFlags & PRF_EXECUTABLE) ? 0 : _countof(Extensions) - 1);
2217  for (; i < _countof(Extensions); ++i)
2218  {
2219  /* Ignore shell links ".lnk" if needed */
2220  if ((fFlags & PRF_DONTFINDLNK) && (i == LNK_EXT_INDEX))
2221  continue;
2222 
2223  Success = (SearchPathW(NULL, pszPath, Extensions[i],
2224  _countof(szPath), szPath, NULL) != 0);
2225  if (!Success)
2226  {
2227  ERR("SearchPathW(pszPath = '%S') failed. Error code: %lu\n", pszPath, GetLastError());
2228  }
2229  else
2230  {
2231  ERR("SearchPathW(pszPath = '%S', szPath = '%S') succeeded\n", pszPath, szPath);
2232  break;
2233  }
2234  }
2235 
2236  if (!Success)
2237  {
2238  ERR("SearchPathW(pszPath = '%S') failed. Error code: %lu\n", pszPath, GetLastError());
2239 
2240  /* We failed, try with PathFindOnPath, as explained by MSDN */
2241  // Success = PathFindOnPathW(pszPath, dirs);
2242  StringCchCopyW(szPath, _countof(szPath), pszPath);
2243  Success = PathFindOnPathW(szPath, dirs);
2244  if (!Success)
2245  {
2246  ERR("PathFindOnPathW(pszPath = '%S') failed\n", pszPath);
2247 
2248  /* We failed again, fall back to building a possible non-existing path */
2249  if (!GetFullPathNameW(pszPath, _countof(szPath), szPath, &fname))
2250  {
2251  ERR("GetFullPathNameW(pszPath = '%S') failed. Error code: %lu\n", pszPath, GetLastError());
2252  return FALSE;
2253  }
2254 
2256  if (!Success)
2257  ERR("PathFileExistsW(szPath = '%S') failed. Error code: %lu\n", szPath, GetLastError());
2258 
2259  /******************************************************/
2260  /* Question: Why this line is needed only for files?? */
2261  if (fname && (_wcsicmp(pszPath, fname) == 0))
2262  *szPath = L'\0';
2263  /******************************************************/
2264  }
2265  else
2266  {
2267  ERR("PathFindOnPathW(pszPath = '%S' ==> '%S') succeeded\n", pszPath, szPath);
2268  }
2269  }
2270 
2271  /* Copy back the results to the caller */
2272  StringCchCopyW(pszPath, MAX_PATH, szPath);
2273 
2274  /*
2275  * Since the called functions always checked whether the file path existed,
2276  * we do not need to redo a final check: we can use instead the cached
2277  * result in 'Success'.
2278  */
2279  return ((fFlags & PRF_VERIFYEXISTS) ? Success : TRUE);
2280 #endif
2281 }
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define TRUE
Definition: types.h:120
#define PRF_DONTFINDLNK
Definition: PathResolve.cpp:33
#define PRF_VERIFYEXISTS
Definition: PathResolve.cpp:29
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1105
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1756
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
static const WCHAR L[]
Definition: oid.c:1250
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
Definition: path.c:1297
#define ERR(fmt,...)
Definition: debug.h:110
unsigned short USHORT
Definition: pedump.c:61
LPCWSTR szPath
Definition: env.c:35
#define PRF_EXECUTABLE
Definition: PathResolve.cpp:30
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL WINAPI PathFindOnPathW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs)
Definition: path.c:1382
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)

Referenced by CShellLink::SetTargetFromPIDLOrPath().

◆ HEAP_strdupAtoW()

static LPWSTR __inline HEAP_strdupAtoW ( HANDLE  heap,
DWORD  flags,
LPCSTR  str 
)
static

Definition at line 194 of file CShellLink.cpp.

195 {
196  INT len;
197  LPWSTR p;
198 
199  assert(str);
200 
201  len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
202  p = (LPWSTR)HeapAlloc(heap, flags, len * sizeof(WCHAR));
203  if (!p)
204  return p;
205  MultiByteToWideChar(CP_ACP, 0, str, -1, p, len);
206  return p;
207 }
#define CP_ACP
Definition: compat.h:109
#define assert(x)
Definition: debug.h:53
int32_t INT
Definition: typedefs.h:58
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
#define MultiByteToWideChar
Definition: compat.h:110
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CShellLink::Extract(), CShellLink::SetArguments(), CShellLink::SetDescription(), CShellLink::SetIconLocation(), CShellLink::SetPath(), CShellLink::SetRelativePath(), and CShellLink::SetWorkingDirectory().

◆ IShellLink_ConstructFromFile()

HRESULT WINAPI IShellLink_ConstructFromFile ( IShellFolder psf,
LPCITEMIDLIST  pidl,
REFIID  riid,
LPVOID ppv 
)

Definition at line 3189 of file CShellLink.cpp.

3190 {
3191  WCHAR path[MAX_PATH];
3192  if (!ILGetDisplayNameExW(psf, pidl, path, 0))
3193  return E_FAIL;
3194 
3196 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_FAIL
Definition: ddrawi.h:102
BOOL ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type)
Definition: pidl.c:91
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34

◆ IShellLink_ConstructFromPath()

HRESULT WINAPI IShellLink_ConstructFromPath ( WCHAR path,
REFIID  riid,
LPVOID ppv 
)

Definition at line 3175 of file CShellLink.cpp.

3176 {
3178  HRESULT hr = CShellLink::_CreatorClass::CreateInstance(NULL, IID_PPV_ARG(IPersistFile, &ppf));
3179  if (FAILED(hr))
3180  return hr;
3181 
3182  hr = ppf->Load(path, 0);
3183  if (FAILED(hr))
3184  return hr;
3185 
3186  return ppf->QueryInterface(riid, ppv);
3187 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IID_PPV_ARG(Itype, ppType)
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:79

Referenced by CFSDropTarget::_DoDrop(), IShellLink_ConstructFromFile(), and SHAddToRecentDocs().

◆ SH_GetTargetTypeByPath()

LPWSTR SH_GetTargetTypeByPath ( LPCWSTR  lpcwFullPath)

Definition at line 2788 of file CShellLink.cpp.

2789 {
2790  LPCWSTR pwszExt;
2791  static WCHAR wszBuf[MAX_PATH];
2792 
2793  /* Get file information */
2794  SHFILEINFOW fi;
2795  if (!SHGetFileInfoW(lpcwFullPath, 0, &fi, sizeof(fi), SHGFI_TYPENAME | SHGFI_USEFILEATTRIBUTES))
2796  {
2797  ERR("SHGetFileInfoW failed for %ls (%lu)\n", lpcwFullPath, GetLastError());
2798  fi.szTypeName[0] = L'\0';
2799  fi.hIcon = NULL;
2800  }
2801 
2802  pwszExt = PathFindExtensionW(lpcwFullPath);
2803  if (pwszExt[0])
2804  {
2805  if (!fi.szTypeName[0])
2806  {
2807  /* The file type is unknown, so default to string "FileExtension File" */
2808  size_t cchRemaining = 0;
2809  LPWSTR pwszEnd = NULL;
2810 
2811  StringCchPrintfExW(wszBuf, _countof(wszBuf), &pwszEnd, &cchRemaining, 0, L"%s ", pwszExt + 1);
2812  }
2813  else
2814  {
2815  /* Update file type */
2816  StringCbPrintfW(wszBuf, sizeof(wszBuf), L"%s (%s)", fi.szTypeName, pwszExt);
2817  }
2818  }
2819 
2820  return wszBuf;
2821 }
#define SHGFI_TYPENAME
Definition: shellapi.h:165
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
WCHAR szTypeName[80]
Definition: shellapi.h:374
STRSAFEAPI StringCchPrintfExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:585
smooth NULL
Definition: ftsmooth.c:416
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
Definition: shell32_main.c:413
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
#define SHGFI_USEFILEATTRIBUTES
Definition: shellapi.h:179
static const WCHAR L[]
Definition: oid.c:1250
HICON hIcon
Definition: shellapi.h:370
#define ERR(fmt,...)
Definition: debug.h:110
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CShellLink::OnInitDialog().

◆ SHELL_ExistsFileW()

static BOOL SHELL_ExistsFileW ( LPCWSTR  path)
static

Definition at line 1000 of file CShellLink.cpp.

1001 {
1003  return FALSE;
1004 
1005  return TRUE;
1006 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

Referenced by ShellLink_UpdatePath().

◆ SHELL_PidlGetIconLocationW()

static HRESULT SHELL_PidlGetIconLocationW ( PCIDLIST_ABSOLUTE  pidl,
UINT  uFlags,
PWSTR  pszIconFile,
UINT  cchMax,
int piIndex,
UINT pwFlags 
)
static

Definition at line 1690 of file CShellLink.cpp.

1692 {
1693  LPCITEMIDLIST pidlLast;
1695 
1696  HRESULT hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &psf), &pidlLast);
1697  if (FAILED_UNEXPECTEDLY(hr))
1698  return hr;
1699 
1701  hr = psf->GetUIObjectOf(0, 1, &pidlLast, IID_NULL_PPV_ARG(IExtractIconW, &pei));
1702  if (FAILED_UNEXPECTEDLY(hr))
1703  return hr;
1704 
1705  hr = pei->GetIconLocation(uFlags, pszIconFile, cchMax, piIndex, pwFlags);
1706  if (FAILED_UNEXPECTEDLY(hr))
1707  return hr;
1708 
1709  return S_OK;
1710 }
HRESULT hr
Definition: shlfolder.c:183
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
UINT uFlags
Definition: api.c:59
#define IID_PPV_ARG(Itype, ppType)
#define IID_NULL_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
UINT cchMax
#define S_OK
Definition: intsafe.h:51
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1337

Referenced by CShellLink::GetIconLocation().

◆ shelllink_get_msi_component_path()

static LPWSTR shelllink_get_msi_component_path ( LPWSTR  component)
static

Definition at line 1368 of file CShellLink.cpp.

1369 {
1370  DWORD Result, sz = 0;
1371 
1372  Result = CommandLineFromMsiDescriptor(component, NULL, &sz);
1373  if (Result != ERROR_SUCCESS)
1374  return NULL;
1375 
1376  sz++;
1377  LPWSTR path = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR));
1378  Result = CommandLineFromMsiDescriptor(component, path, &sz);
1379  if (Result != ERROR_SUCCESS)
1380  {
1381  HeapFree(GetProcessHeap(), 0, path);
1382  path = NULL;
1383  }
1384 
1385  TRACE("returning %s\n", debugstr_w(path));
1386 
1387  return path;
1388 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLsizei const GLchar ** path
Definition: glext.h:7234
DWORD WINAPI CommandLineFromMsiDescriptor(WCHAR *szDescriptor, WCHAR *szCommandLine, DWORD *pcchCommandLine)
Definition: msi.c:22
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by CShellLink::Resolve().

◆ ShellLink_GetVolumeInfo()

static BOOL ShellLink_GetVolumeInfo ( LPCWSTR  path,
CShellLink::volume_info volume 
)
static

Definition at line 473 of file CShellLink.cpp.

474 {
475  WCHAR drive[4] = { path[0], ':', '\\', 0 };
476 
477  volume->type = GetDriveTypeW(drive);
478  BOOL bRet = GetVolumeInformationW(drive, volume->label, _countof(volume->label), &volume->serial, NULL, NULL, NULL, 0);
479  TRACE("ret = %d type %d serial %08x name %s\n", bRet,
480  volume->type, volume->serial, debugstr_w(volume->label));
481  return bRet;
482 }
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
Definition: volume.c:226

Referenced by CShellLink::SetTargetFromPIDLOrPath().

◆ ShellLink_UpdatePath()

static HRESULT ShellLink_UpdatePath ( LPCWSTR  sPathRel,
LPCWSTR  path,
LPCWSTR  sWorkDir,
LPWSTR psPath 
)
static

Definition at line 1012 of file CShellLink.cpp.

1013 {
1014  if (!path || !psPath)
1015  return E_INVALIDARG;
1016 
1017  if (!*psPath && sPathRel)
1018  {
1019  WCHAR buffer[2*MAX_PATH], abs_path[2*MAX_PATH];
1020  LPWSTR final = NULL;
1021 
1022  /* first try if [directory of link file] + [relative path] finds an existing file */
1023 
1024  GetFullPathNameW(path, MAX_PATH * 2, buffer, &final);
1025  if (!final)
1026  final = buffer;
1027  wcscpy(final, sPathRel);
1028 
1029  *abs_path = '\0';
1030 
1032  {
1033  if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final))
1034  wcscpy(abs_path, buffer);
1035  }
1036  else
1037  {
1038  /* try if [working directory] + [relative path] finds an existing file */
1039  if (sWorkDir)
1040  {
1041  wcscpy(buffer, sWorkDir);
1042  wcscpy(PathAddBackslashW(buffer), sPathRel);
1043 
1045  if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final))
1046  wcscpy(abs_path, buffer);
1047  }
1048  }
1049 
1050  /* FIXME: This is even not enough - not all shell links can be resolved using this algorithm. */
1051  if (!*abs_path)
1052  wcscpy(abs_path, sPathRel);
1053 
1054  *psPath = strdupW(abs_path);
1055  if (!*psPath)
1056  return E_OUTOFMEMORY;
1057  }
1058 
1059  return S_OK;
1060 }
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1105
GLuint buffer
Definition: glext.h:5915
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
Definition: path.c:289
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define S_OK
Definition: intsafe.h:51
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CShellLink::Load(), and CShellLink::SetRelativePath().

◆ strdupW()

static LPWSTR __inline strdupW ( LPCWSTR  src)
static

Definition at line 209 of file CShellLink.cpp.

210 {
211  LPWSTR dest;
212  if (!src) return NULL;
213  dest = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(src) + 1) * sizeof(WCHAR));
214  if (dest)
215  wcscpy(dest, src);
216  return dest;
217 }
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
GLenum src
Definition: glext.h:6340
static char * dest
Definition: rtl.c:135
WCHAR * LPWSTR
Definition: xmlstorage.h:184
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by CShellLink::DoOpen(), CShellLink::GetIconLocation(), CShellLink::Load(), CShellLink::OnNotify(), CShellLink::Resolve(), CShellLink::Save(), CShellLink::SetArguments(), CShellLink::SetDescription(), CShellLink::SetIconLocation(), CShellLink::SetPath(), CShellLink::SetRelativePath(), CShellLink::SetTargetFromPIDLOrPath(), CShellLink::SetWorkingDirectory(), and ShellLink_UpdatePath().

◆ Stream_LoadLocation()

static HRESULT Stream_LoadLocation ( IStream stm,
CShellLink::volume_info volume,
LPWSTR path 
)
static

Definition at line 554 of file CShellLink.cpp.

556 {
557  char *p = NULL;
558  HRESULT hr = Stream_ReadChunk(stm, (LPVOID*) &p);
559  if (FAILED(hr))
560  return hr;
561 
562  LOCATION_INFO *loc = reinterpret_cast<LOCATION_INFO *>(p);
563  if (loc->dwTotalSize < sizeof(LOCATION_INFO))
564  {
565  HeapFree(GetProcessHeap(), 0, p);
566  return E_FAIL;
567  }
568 
569  /* if there's valid local volume information, load it */
570  if (loc->dwVolTableOfs &&
571  ((loc->dwVolTableOfs + sizeof(LOCAL_VOLUME_INFO)) <= loc->dwTotalSize))
572  {
574 
577  }
578 
579  /* if there's a local path, load it */
580  DWORD n = loc->dwLocalPathOfs;
581  if (n && n < loc->dwTotalSize)
582  *path = Stream_LoadPath(&p[n], loc->dwTotalSize - n);
583 
584  TRACE("type %d serial %08x name %s path %s\n", volume->type,
585  volume->serial, debugstr_w(volume->label), debugstr_w(*path));
586 
587  HeapFree(GetProcessHeap(), 0, p);
588  return S_OK;
589 }
HRESULT hr
Definition: shlfolder.c:183
GLdouble n
Definition: glext.h:7729
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
DWORD dwLocalPathOfs
Definition: CShellLink.cpp:167
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:51
DWORD dwVolTableOfs
Definition: CShellLink.cpp:166
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by CShellLink::Load().

◆ Stream_LoadPath()

static LPWSTR Stream_LoadPath ( LPCSTR  p,
DWORD  maxlen 
)
static

Definition at line 537 of file CShellLink.cpp.

538 {
539  UINT len = 0;
540 
541  while (len < maxlen && p[len])
542  len++;
543 
544  UINT wlen = MultiByteToWideChar(CP_ACP, 0, p, len, NULL, 0);
545  LPWSTR path = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wlen + 1) * sizeof(WCHAR));
546  if (!path)
547  return NULL;
548  MultiByteToWideChar(CP_ACP, 0, p, len, path, wlen);
549  path[wlen] = 0;
550 
551  return path;
552 }
GLsizei const GLchar ** path
Definition: glext.h:7234
#define CP_ACP
Definition: compat.h:109
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum GLsizei len
Definition: glext.h:6722
unsigned int UINT
Definition: ndis.h:50
#define MultiByteToWideChar
Definition: compat.h:110
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by Stream_LoadLocation().

◆ Stream_LoadString()

static HRESULT Stream_LoadString ( IStream stm,
BOOL  unicode,
LPWSTR pstr 
)
static

Definition at line 416 of file CShellLink.cpp.

417 {
418  TRACE("%p\n", stm);
419 
420  USHORT len;
421  DWORD count = 0;
422  HRESULT hr = stm->Read(&len, sizeof(len), &count);
423  if (FAILED(hr) || count != sizeof(len))
424  return E_FAIL;
425 
426  if (unicode)
427  len *= sizeof(WCHAR);
428 
429  TRACE("reading %d\n", len);
430  LPSTR temp = (LPSTR)HeapAlloc(GetProcessHeap(), 0, len + sizeof(WCHAR));
431  if (!temp)
432  return E_OUTOFMEMORY;
433  count = 0;
434  hr = stm->Read(temp, len, &count);
435  if (FAILED(hr) || count != len)
436  {
438  return E_FAIL;
439  }
440 
441  TRACE("read %s\n", debugstr_an(temp, len));
442 
443  /* convert to unicode if necessary */
444  LPWSTR str;
445  if (!unicode)
446  {
448  str = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (count + 1) * sizeof(WCHAR));
449  if (!str)
450  {
452  return E_OUTOFMEMORY;
453  }
456  }
457  else
458  {
459  count /= sizeof(WCHAR);
460  str = (LPWSTR)temp;
461  }
462  str[count] = 0;
463 
464  *pstr = str;
465 
466  return S_OK;
467 }
HRESULT hr
Definition: shlfolder.c:183
#define CP_ACP
Definition: compat.h:109
GLuint GLuint GLsizei count
Definition: gl.h:1545
char * LPSTR
Definition: xmlstorage.h:182
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:51
unsigned short USHORT
Definition: pedump.c:61
static calc_node_t temp
Definition: rpn_ieee.c:38
#define MultiByteToWideChar
Definition: compat.h:110
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HRESULT Read([out, size_is(cb), length_is(*pcbRead)] void *pv, [in] ULONG cb, [out] ULONG *pcbRead)
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by CShellLink::Load().

◆ Stream_LoadVolume()

static BOOL Stream_LoadVolume ( LOCAL_VOLUME_INFO vol,
CShellLink::volume_info volume 
)
static

Definition at line 519 of file CShellLink.cpp.

520 {
521  volume->serial = vol->dwVolSerial;
522  volume->type = vol->dwType;
523 
524  if (!vol->dwVolLabelOfs)
525  return FALSE;
526  if (vol->dwSize <= vol->dwVolLabelOfs)
527  return FALSE;
528  INT len = vol->dwSize - vol->dwVolLabelOfs;
529 
530  LPSTR label = (LPSTR)vol;
531  label += vol->dwVolLabelOfs;
532  MultiByteToWideChar(CP_ACP, 0, label, len, volume->label, _countof(volume->label));
533 
534  return TRUE;
535 }
#define TRUE
Definition: types.h:120
#define CP_ACP
Definition: compat.h:109
char * LPSTR
Definition: xmlstorage.h:182
int32_t INT
Definition: typedefs.h:58
#define FALSE
Definition: types.h:117
#define _countof(array)
Definition: sndvol32.h:68
GLenum GLsizei len
Definition: glext.h:6722
uint8_t label[11]
Definition: fsck.fat.h:65
#define MultiByteToWideChar
Definition: compat.h:110

Referenced by Stream_LoadLocation().

◆ Stream_ReadChunk()

static HRESULT Stream_ReadChunk ( IStream stm,
LPVOID data 
)
static

Definition at line 484 of file CShellLink.cpp.

485 {
486  struct sized_chunk
487  {
488  DWORD size;
489  unsigned char data[1];
490  } *chunk;
491 
492  TRACE("%p\n", stm);
493 
494  DWORD size;
495  ULONG count;
496  HRESULT hr = stm->Read(&size, sizeof(size), &count);
497  if (FAILED(hr) || count != sizeof(size))
498  return E_FAIL;
499 
500  chunk = static_cast<sized_chunk *>(HeapAlloc(GetProcessHeap(), 0, size));
501  if (!chunk)
502  return E_OUTOFMEMORY;
503 
504  chunk->size = size;
505  hr = stm->Read(chunk->data, size - sizeof(size), &count);
506  if (FAILED(hr) || count != (size - sizeof(size)))
507  {
509  return E_FAIL;
510  }
511 
512  TRACE("Read %d bytes\n", chunk->size);
513 
514  *data = chunk;
515 
516  return S_OK;
517 }
uint16_t size
Definition: btrfs_drv.h:572
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define S_OK
Definition: intsafe.h:51
unsigned int ULONG
Definition: retypes.h:1
HRESULT Read([out, size_is(cb), length_is(*pcbRead)] void *pv, [in] ULONG cb, [out] ULONG *pcbRead)
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by Stream_LoadLocation().

◆ Stream_WriteLocationInfo()

static HRESULT Stream_WriteLocationInfo ( IStream stm,
LPCWSTR  path,
CShellLink::volume_info volume 
)
static

Definition at line 812 of file CShellLink.cpp.

814 {
815  LOCAL_VOLUME_INFO *vol;
816  LOCATION_INFO *loc;
817 
818  TRACE("%p %s %p\n", stm, debugstr_w(path), volume);
819 
820  /* figure out the size of everything */
821  DWORD label_size = WideCharToMultiByte(CP_ACP, 0, volume->label, -1,
822  NULL, 0, NULL, NULL);
823  DWORD path_size = WideCharToMultiByte(CP_ACP, 0, path, -1,
824  NULL, 0, NULL, NULL);
825  DWORD volume_info_size = sizeof(*vol) + label_size;
826  DWORD final_path_size = 1;
827  DWORD total_size = sizeof(*loc) + volume_info_size + path_size + final_path_size;
828 
829  /* create pointers to everything */
830  loc = static_cast<LOCATION_INFO *>(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, total_size));
831  vol = (LOCAL_VOLUME_INFO*) &loc[1];
832  LPSTR szLabel = (LPSTR) &vol[1];
833  LPSTR szPath = &szLabel[label_size];
834  LPSTR szFinalPath = &szPath[path_size];
835 
836  /* fill in the location information header */
837  loc->dwTotalSize = total_size;
838  loc->dwHeaderSize = sizeof(*loc);
839  loc->dwFlags = 1;
840  loc->dwVolTableOfs = sizeof(*loc);
841  loc->dwLocalPathOfs = sizeof(*loc) + volume_info_size;
842  loc->dwNetworkVolTableOfs = 0;
843  loc->dwFinalPathOfs = sizeof(*loc) + volume_info_size + path_size;
844 
845  /* fill in the volume information */
846  vol->dwSize = volume_info_size;
847  vol->dwType = volume->type;
848  vol->dwVolSerial = volume->serial;
849  vol->dwVolLabelOfs = sizeof(*vol);
850 
851  /* copy in the strings */
852  WideCharToMultiByte(CP_ACP, 0, volume->label, -1,
853  szLabel, label_size, NULL, NULL);
855  szPath, path_size, NULL, NULL);
856  *szFinalPath = 0;
857 
858  ULONG count = 0;
859  HRESULT hr = stm->Write(loc, total_size, &count);
860  HeapFree(GetProcessHeap(), 0, loc);
861 
862  return hr;
863 }
DWORD dwHeaderSize
Definition: CShellLink.cpp:164
#define WideCharToMultiByte
Definition: compat.h:111
HRESULT hr
Definition: shlfolder.c:183
#define CP_ACP
Definition: compat.h:109
GLuint GLuint GLsizei count
Definition: gl.h:1545
DWORD dwNetworkVolTableOfs
Definition: CShellLink.cpp:168
char * LPSTR
Definition: xmlstorage.h:182
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
DWORD dwLocalPathOfs
Definition: CShellLink.cpp:167
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
DWORD dwFinalPathOfs
Definition: CShellLink.cpp:169
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwVolTableOfs
Definition: CShellLink.cpp:166
LPCWSTR szPath
Definition: env.c:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned int ULONG
Definition: retypes.h:1
HRESULT Write([in, size_is(cb)] const void *pv, [in] ULONG cb, [out] ULONG *pcbWritten)
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by CShellLink::Save().

◆ Stream_WriteString()

static HRESULT Stream_WriteString ( IStream stm,
LPCWSTR  str 
)
static

Definition at line 785 of file CShellLink.cpp.

786 {
787  USHORT len = wcslen(str) + 1; // FIXME: Possible overflows?
788  DWORD count;
789 
790  HRESULT hr = stm->Write(&len, sizeof(len), &count);
791  if (FAILED(hr))
792  return hr;
793 
794  len *= sizeof(WCHAR);
795 
796  hr = stm->Write(str, len, &count);
797  if (FAILED(hr))
798  return hr;
799 
800  return S_OK;
801 }
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei count
Definition: gl.h:1545
const WCHAR * str
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:51
unsigned short USHORT
Definition: pedump.c:61
HRESULT Write([in, size_is(cb)] const void *pv, [in] ULONG cb, [out] ULONG *pcbWritten)
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by CShellLink::Save().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )