ReactOS  0.4.13-dev-66-gc714b7f
createlink.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Software Control Panel
3  * FILE: dll/cpl/appwiz/createlink.c
4  * PURPOSE: ReactOS Software Control Panel
5  * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com)
6  * Dmitry Chapyshev (lentind@yandex.ru)
7  * Johannes Anderwald
8  * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
9  * UPDATE HISTORY:
10  * 06-17-2004 Created
11  */
12 
13 #include "appwiz.h"
14 #include <strsafe.h>
15 
16 BOOL
18 {
19  WCHAR Value[10];
20  DWORD Size;
21  DWORD Type;
22 
23  Size = sizeof(Value);
24  if (RegQueryValueExW(hKey, L"IsShortcut", NULL, &Type, (LPBYTE)Value, &Size) != ERROR_SUCCESS)
25  return FALSE;
26 
27  if (Type != REG_SZ)
28  return FALSE;
29 
30  return (wcsicmp(Value, L"yes") == 0);
31 }
32 
33 BOOL
35 {
36  HKEY hKey;
37  WCHAR Buffer[100];
38  DWORD Size;
39  DWORD Type;
40 
42  return FALSE;
43 
44  if (IsShortcut(hKey))
45  {
46  RegCloseKey(hKey);
47  return TRUE;
48  }
49 
50  Size = sizeof(Buffer);
52  {
53  RegCloseKey(hKey);
54  return FALSE;
55  }
56 
57  RegCloseKey(hKey);
58 
60  return FALSE;
61 
62  if (IsShortcut(hKey))
63  {
64  RegCloseKey(hKey);
65  return TRUE;
66  }
67 
68  RegCloseKey(hKey);
69  return FALSE;
70 }
71 
72 BOOL
74 {
75  IShellLinkW *pShellLink, *pSourceShellLink;
76  IPersistFile *pPersistFile;
77  HRESULT hr;
80 
81  /* get the extension */
83 
85  {
86  hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_ALL, &IID_IShellLinkW, (void**)&pSourceShellLink);
87 
88  if (FAILED(hr))
89  return FALSE;
90 
91  hr = IUnknown_QueryInterface(pSourceShellLink, &IID_IPersistFile, (void**)&pPersistFile);
92  if (FAILED(hr))
93  {
94  IUnknown_Release(pSourceShellLink);
95  return FALSE;
96  }
97 
98  hr = pPersistFile->lpVtbl->Load(pPersistFile, (LPCOLESTR)pContext->szTarget, STGM_READ);
99  IUnknown_Release(pPersistFile);
100 
101  if (FAILED(hr))
102  {
103  IUnknown_Release(pSourceShellLink);
104  return FALSE;
105  }
106 
107  hr = IShellLinkW_GetPath(pSourceShellLink, Path, _countof(Path), NULL, 0);
108  IUnknown_Release(pSourceShellLink);
109 
110  if (FAILED(hr))
111  {
112  return FALSE;
113  }
114  }
115  else
116  {
117  StringCchCopyW(Path, _countof(Path), pContext->szTarget);
118  }
119 
120  hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_ALL,
121  &IID_IShellLinkW, (void**)&pShellLink);
122 
123  if (hr != S_OK)
124  return FALSE;
125 
126  pShellLink->lpVtbl->SetPath(pShellLink, Path);
127  pShellLink->lpVtbl->SetDescription(pShellLink, pContext->szDescription);
128  pShellLink->lpVtbl->SetWorkingDirectory(pShellLink, pContext->szWorkingDirectory);
129 
130  hr = IUnknown_QueryInterface(pShellLink, &IID_IPersistFile, (void**)&pPersistFile);
131  if (hr != S_OK)
132  {
133  IUnknown_Release(pShellLink);
134  return FALSE;
135  }
136 
137  hr = pPersistFile->lpVtbl->Save(pPersistFile, pContext->szLinkName, TRUE);
138  IUnknown_Release(pPersistFile);
139  IUnknown_Release(pShellLink);
140  return (hr == S_OK);
141 }
142 
143 BOOL
145 {
146  IUniformResourceLocatorW *pURL = NULL;
147  IPersistFile *pPersistFile = NULL;
148  HRESULT hr;
151 
152  hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL,
153  &IID_IUniformResourceLocatorW, (void **)&pURL);
154  if (FAILED(hr))
155  return FALSE;
156 
157  hr = IUnknown_QueryInterface(pURL, &IID_IPersistFile, (void **)&pPersistFile);
158  if (FAILED(hr))
159  {
160  IUnknown_Release(pURL);
161  return FALSE;
162  }
163 
164  pURL->lpVtbl->SetURL(pURL, pContext->szTarget, 0);
165 
166  hr = pPersistFile->lpVtbl->Save(pPersistFile, szPath, TRUE);
167 
168  IUnknown_Release(pPersistFile);
169  IUnknown_Release(pURL);
170 
171  return SUCCEEDED(hr);
172 }
173 
175 {
176  return (PathIsURLW(pszLocation) || wcsstr(pszLocation, L"www.") == pszLocation);
177 }
178 
179 INT_PTR
180 CALLBACK
182  UINT uMsg,
183  WPARAM wParam,
184  LPARAM lParam)
185 {
186  LPPROPSHEETPAGEW ppsp;
187  PCREATE_LINK_CONTEXT pContext;
188  LPPSHNOTIFY lppsn;
190  WCHAR szDesc[100];
191  BROWSEINFOW brws;
192  LPITEMIDLIST pidllist;
193 
194  switch(uMsg)
195  {
196  case WM_INITDIALOG:
197  ppsp = (LPPROPSHEETPAGEW)lParam;
198  pContext = (PCREATE_LINK_CONTEXT) ppsp->lParam;
199  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext);
200  PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
201  break;
202  case WM_COMMAND:
203  switch(HIWORD(wParam))
204  {
205  case EN_CHANGE:
207  {
209  }
210  else
211  {
212  PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
213  }
214  break;
215  }
216  switch(LOWORD(wParam))
217  {
218  case IDC_SHORTCUT_BROWSE:
219  ZeroMemory(&brws, sizeof(brws));
220  brws.hwndOwner = hwndDlg;
221  brws.pidlRoot = NULL;
222  brws.pszDisplayName = szPath;
224  brws.lpfn = NULL;
225  pidllist = SHBrowseForFolderW(&brws);
226  if (!pidllist)
227  break;
228 
229  if (SHGetPathFromIDListW(pidllist, szPath))
231 
232  /* Free memory, if possible */
233  CoTaskMemFree(pidllist);
234  break;
235  }
236  break;
237  case WM_NOTIFY:
238  lppsn = (LPPSHNOTIFY) lParam;
239  if (lppsn->hdr.code == PSN_WIZNEXT)
240  {
241  LPWSTR pch;
242  pContext = (PCREATE_LINK_CONTEXT) GetWindowLongPtr(hwndDlg, DWLP_USER);
243  GetDlgItemTextW(hwndDlg, IDC_SHORTCUT_LOCATION, pContext->szTarget, _countof(pContext->szTarget));
244  StrTrimW(pContext->szTarget, L" \t");
245 
246  if (IsInternetLocation(pContext->szTarget))
247  {
248  /* internet */
249  WCHAR szName[128];
251  StringCchCopyW(pContext->szDescription, _countof(pContext->szDescription), szName);
252 
253  pContext->szWorkingDirectory[0] = 0;
254  }
255  else if (GetFileAttributesW(pContext->szTarget) != INVALID_FILE_ATTRIBUTES)
256  {
257  /* file */
261 
262  /* set working directory */
264  pContext->szTarget);
267  if (pch && *pch)
268  *pch = 0;
270  }
271  else
272  {
273  /* not found */
274  WCHAR szError[MAX_PATH + 100];
275  LoadStringW(hApplet, IDS_CREATE_SHORTCUT, szDesc, _countof(szDesc));
277  StringCchPrintfW(szError, _countof(szError), szPath, pContext->szTarget);
278  MessageBoxW(hwndDlg, szError, szDesc, MB_ICONERROR);
279  }
280  }
281  break;
282  }
283  return FALSE;
284 }
285 
286 INT_PTR
287 CALLBACK
289  UINT uMsg,
290  WPARAM wParam,
291  LPARAM lParam)
292 {
293  LPPROPSHEETPAGEW ppsp;
294  PCREATE_LINK_CONTEXT pContext;
295  LPPSHNOTIFY lppsn;
296 
297  switch(uMsg)
298  {
299  case WM_INITDIALOG:
300  ppsp = (LPPROPSHEETPAGEW)lParam;
301  pContext = (PCREATE_LINK_CONTEXT) ppsp->lParam;
302  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext);
303  SetDlgItemTextW(hwndDlg, IDC_SHORTCUT_NAME, pContext->szDescription);
305  break;
306  case WM_COMMAND:
307  switch(HIWORD(wParam))
308  {
309  case EN_CHANGE:
311  {
313  }
314  else
315  {
317  }
318  break;
319  }
320  break;
321  case WM_NOTIFY:
322  lppsn = (LPPSHNOTIFY) lParam;
323  pContext = (PCREATE_LINK_CONTEXT) GetWindowLongPtr(hwndDlg, DWLP_USER);
324  if (lppsn->hdr.code == PSN_WIZFINISH)
325  {
326  LPWSTR pch;
327  DWORD attrs;
329  StrTrimW(pContext->szDescription, L" \t");
330 
331  /* if old shortcut file exists, then delete it now */
332  attrs = GetFileAttributesW(pContext->szOldFile);
333  if (attrs != INVALID_FILE_ATTRIBUTES && !(attrs & FILE_ATTRIBUTE_DIRECTORY))
334  {
335  DeleteFileW(pContext->szOldFile);
336  }
337 
338  if (IsInternetLocation(pContext->szTarget))
339  {
340  /* internet */
341  StringCchCopyW(pContext->szLinkName, _countof(pContext->szLinkName),
342  pContext->szOrigin);
343  PathAppendW(pContext->szLinkName, pContext->szDescription);
344 
345  /* change extension if any */
346  pch = PathFindExtensionW(pContext->szLinkName);
347  if (pch && *pch)
348  *pch = 0;
349  StringCchCatW(pContext->szLinkName, _countof(pContext->szLinkName), L".url");
350 
351  if (!CreateInternetShortcut(pContext))
352  {
353  WCHAR szMessage[128];
354  LoadStringW(hApplet, IDS_CANTMAKEINETSHORTCUT, szMessage, _countof(szMessage));
355  MessageBoxW(hwndDlg, szMessage, NULL, MB_ICONERROR);
356  }
357  }
358  else
359  {
360  /* file */
361  StringCchCopyW(pContext->szLinkName, _countof(pContext->szLinkName),
362  pContext->szOrigin);
363  PathAppendW(pContext->szLinkName, pContext->szDescription);
364 
365  /* change extension if any */
366  pch = PathFindExtensionW(pContext->szLinkName);
367  if (pch && *pch)
368  *pch = 0;
369  StringCchCatW(pContext->szLinkName, _countof(pContext->szLinkName), L".lnk");
370 
371  if (!CreateShortcut(pContext))
372  {
373  WCHAR szMessage[128];
374  LoadStringW(hApplet, IDS_CANTMAKESHORTCUT, szMessage, _countof(szMessage));
375  MessageBoxW(hwndDlg, szMessage, NULL, MB_ICONERROR);
376  }
377  }
378  }
379  break;
380  }
381  return FALSE;
382 }
383 
384 static int CALLBACK
386 {
387  // NOTE: This callback is needed to set large icon correctly.
388  HICON hIcon;
389  switch (uMsg)
390  {
391  case PSCB_INITIALIZED:
392  {
394  SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
395  break;
396  }
397  }
398  return 0;
399 }
400 
403 {
404  PROPSHEETHEADERW psh;
405  HPROPSHEETPAGE ahpsp[2];
406  PROPSHEETPAGE psp;
407  UINT nPages = 0;
408  UINT nLength;
409  DWORD attrs;
410  PCREATE_LINK_CONTEXT pContext;
411  WCHAR szMessage[128];
412 
413  pContext = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pContext));
414  if (!pContext)
415  {
416  /* no memory */
417  LoadStringW(hApplet, IDS_NO_MEMORY, szMessage, _countof(szMessage));
418  MessageBoxW(hwndCPl, szMessage, NULL, MB_ICONERROR);
419  return FALSE;
420  }
421 
422  nLength = wcslen(szPath);
423  if (!nLength)
424  {
425  HeapFree(GetProcessHeap(), 0, pContext);
426 
427  /* no directory given */
428  LoadStringW(hApplet, IDS_NO_DIRECTORY, szMessage, _countof(szMessage));
429  MessageBoxW(hwndCPl, szMessage, NULL, MB_ICONERROR);
430  return FALSE;
431  }
432 
433  attrs = GetFileAttributesW(szPath);
434  if (attrs == INVALID_FILE_ATTRIBUTES)
435  {
436  HeapFree(GetProcessHeap(), 0, pContext);
437 
438  /* invalid path */
439  LoadStringW(hApplet, IDS_INVALID_PATH, szMessage, _countof(szMessage));
440  MessageBoxW(hwndCPl, szMessage, NULL, MB_ICONERROR);
441  return FALSE;
442  }
443 
444  /* build the pContext->szOrigin and pContext->szOldFile */
445  StringCchCopyW(pContext->szOrigin, _countof(pContext->szOrigin), szPath);
446  pContext->szOldFile[0] = 0;
447  if (!(attrs & FILE_ATTRIBUTE_DIRECTORY))
448  {
449  LPWSTR pch;
450  StringCchCopyW(pContext->szOldFile, _countof(pContext->szOldFile), szPath);
451  pch = PathFindFileNameW(pContext->szOrigin);
452  if (pch && *pch)
453  *pch = 0;
454  }
455  PathAddBackslashW(pContext->szOrigin);
456 
457  /* Create the Welcome page */
458  psp.dwSize = sizeof(PROPSHEETPAGE);
459  psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
460  psp.hInstance = hApplet;
461  psp.pfnDlgProc = WelcomeDlgProc;
462  psp.pszTemplate = MAKEINTRESOURCEW(IDD_SHORTCUT_LOCATION);
463  psp.lParam = (LPARAM)pContext;
464  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
465 
466  /* Create the Finish page */
467  psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
468  psp.pfnDlgProc = FinishDlgProc;
469  psp.pszTemplate = MAKEINTRESOURCEW(IDD_SHORTCUT_FINISH);
470  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
471 
472  /* Create the property sheet */
473  psh.dwSize = sizeof(PROPSHEETHEADER);
474  psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_USEICONID | PSH_USECALLBACK;
475  psh.hInstance = hApplet;
477  psh.hwndParent = NULL;
478  psh.nPages = nPages;
479  psh.nStartPage = 0;
480  psh.phpage = ahpsp;
481  psh.pszbmWatermark = MAKEINTRESOURCEW(IDB_SHORTCUT);
483 
484  /* Display the wizard */
485  PropertySheet(&psh);
486  HeapFree(GetProcessHeap(), 0, pContext);
487  return TRUE;
488 }
489 
490 LONG
491 CALLBACK
492 NewLinkHereW(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
493 {
494  return ShowCreateShortcutWizard(hwndCPl, (LPWSTR) lParam1);
495 }
496 
497 LONG
498 CALLBACK
499 NewLinkHereA(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
500 {
501  WCHAR szFile[MAX_PATH];
502 
503  if (MultiByteToWideChar(CP_ACP, 0, (LPSTR) lParam1, -1, szFile, MAX_PATH))
504  {
505  return ShowCreateShortcutWizard(hwndCPl, szFile);
506  }
507  return -1;
508 }
#define RegQueryValueEx
Definition: winreg.h:524
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
#define WM_GETTEXTLENGTH
Definition: winuser.h:1601
HWND hwndParent
Definition: prsht.h:277
static HICON
Definition: imagelist.c:84
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2195
#define TRUE
Definition: types.h:120
#define IDS_NO_MEMORY
Definition: resource.h:28
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
Type
Definition: Type.h:6
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
struct _PSHNOTIFY * LPPSHNOTIFY
#define KEY_READ
Definition: nt_native.h:1023
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
#define CP_ACP
Definition: compat.h:99
#define _countof(array)
Definition: fontsub.cpp:30
#define BIF_BROWSEINCLUDEFILES
Definition: shlobj.h:1150
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1280
#define CALLBACK
Definition: compat.h:27
_In_ DWORD nLength
Definition: wincon.h:461
#define PSWIZB_NEXT
Definition: prsht.h:154
HWND hwndOwner
Definition: shlobj.h:1118
#define ZeroMemory
Definition: winbase.h:1635
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1105
HWND WINAPI SetFocus(_In_opt_ HWND)
HINSTANCE hApplet
Definition: access.c:17
UINT_PTR WPARAM
Definition: windef.h:207
#define SendDlgItemMessage
Definition: winuser.h:5708
int32_t INT_PTR
Definition: typedefs.h:62
#define IDC_SHORTCUT_BROWSE
Definition: resource.h:39
#define PSH_USECALLBACK
Definition: prsht.h:48
char * LPSTR
Definition: xmlstorage.h:182
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define pch(ap)
Definition: match.c:418
#define DWLP_MSGRESULT
Definition: winuser.h:864
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:121
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
UINT code
Definition: winuser.h:3112
#define IDS_CANTMAKESHORTCUT
Definition: resource.h:27
NMHDR hdr
Definition: prsht.h:312
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
#define PSH_USEICONID
Definition: prsht.h:42
#define PSN_WIZFINISH
Definition: prsht.h:122
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
Definition: path.c:289
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
LPWSTR pszDisplayName
Definition: shlobj.h:1120
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:802
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:293
#define PSNRET_INVALID_NOCHANGEPAGE
Definition: prsht.h:131
smooth NULL
Definition: ftsmooth.c:416
struct _PROPSHEETPAGEW * LPPROPSHEETPAGEW
#define PROPSHEETHEADER
Definition: prsht.h:374
#define PSN_WIZNEXT
Definition: prsht.h:121
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:389
LONG_PTR LPARAM
Definition: windef.h:208
Definition: bufpool.h:45
#define PropSheet_SetWizButtons(d, f)
Definition: prsht.h:339
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
#define IDS_CANTMAKEINETSHORTCUT
Definition: resource.h:26
#define CreatePropertySheetPage
Definition: prsht.h:381
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define PSWIZB_FINISH
Definition: prsht.h:155
#define STGM_READ
Definition: objbase.h:916
LPCITEMIDLIST pidlRoot
Definition: shlobj.h:1119
#define PSP_DEFAULT
Definition: prsht.h:22
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PSWIZB_BACK
Definition: prsht.h:153
LONG HRESULT
Definition: typedefs.h:77
#define IDS_NO_DIRECTORY
Definition: resource.h:29
HINSTANCE hInstance
Definition: prsht.h:278
#define MAX_PATH
Definition: compat.h:26
#define IDC_SHORTCUT_NAME
Definition: resource.h:40
#define EM_SETSEL
Definition: winuser.h:1979
LPCWSTR pszIcon
Definition: prsht.h:281
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwSize
Definition: prsht.h:275
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
DWORD dwFlags
Definition: prsht.h:276
#define IDD_SHORTCUT_LOCATION
Definition: resource.h:12
#define IDC_SHORTCUT_LOCATION
Definition: resource.h:38
#define IDS_CREATE_SHORTCUT
Definition: resource.h:23
static const WCHAR L[]
Definition: oid.c:1250
LPARAM lParam
Definition: prsht.h:218
#define DWLP_USER
Definition: winuser.h:866
#define MB_ICONERROR
Definition: winuser.h:781
#define IDS_INVALID_PATH
Definition: resource.h:30
#define WM_COMMAND
Definition: winuser.h:1716
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
Definition: path.c:862
#define wcsicmp
Definition: string.h:1152
_In_ LPCSTR _In_opt_ LPCSTR lpExtension
Definition: winbase.h:3011
struct CREATE_LINK_CONTEXT * PCREATE_LINK_CONTEXT
HPROPSHEETPAGE * phpage
Definition: prsht.h:291
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brsfolder.c:1156
HWND WINAPI GetParent(_In_ HWND)
#define S_OK
Definition: intsafe.h:59
UINT ulFlags
Definition: shlobj.h:1122
PRTL_UNICODE_STRING_BUFFER Path
#define PSCB_INITIALIZED
Definition: prsht.h:75
HICON hIcon
Definition: msconfig.c:44
LPCWSTR szPath
Definition: env.c:35
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
BFFCALLBACK lpfn
Definition: shlobj.h:1123
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define MultiByteToWideChar
Definition: compat.h:100
#define IDS_ERROR_NOT_FOUND
Definition: resource.h:24
BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
Definition: string.c:1869
const GUID IID_IPersistFile
#define IDB_SHORTCUT
Definition: resource.h:18
static const WCHAR szName[]
Definition: msipriv.h:1194
#define PropertySheet
Definition: prsht.h:382
#define HIWORD(l)
Definition: typedefs.h:246
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDI_APPINETICO
Definition: resource.h:9
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDD_SHORTCUT_FINISH
Definition: resource.h:13
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define IDS_NEW_INTERNET_SHORTCUT
Definition: resource.h:25
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:394
#define PROPSHEETPAGE
Definition: prsht.h:371
#define WM_NOTIFY
Definition: richedit.h:61
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define ICON_BIG
Definition: tnclass.cpp:51
UINT nStartPage
Definition: prsht.h:286
#define REG_SZ
Definition: layer.c:22
#define EN_CHANGE
Definition: winuser.h:1983