31 static GUID CLSID_ShellLink_I = { 0x00021401, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
32 static GUID IID_IShellLinkW_I = { 0x000214f9, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
33 static GUID IID_IPersistFile_I = { 0x0000010b, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
40 IShellLinkW *shellLink;
41 IPersistFile *persistFile;
44 targetFileName = NULL;
46 if (SUCCEEDED(CoCreateInstance(&CLSID_ShellLink_I, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW_I, &shellLink)))
48 if (SUCCEEDED(IShellLinkW_QueryInterface(shellLink, &IID_IPersistFile_I, &persistFile)))
50 if (SUCCEEDED(IPersistFile_Load(persistFile, ShortcutFileName->Buffer, STGM_READ)) &&
51 SUCCEEDED(IShellLinkW_Resolve(shellLink, NULL, SLR_NO_UI)))
53 if (SUCCEEDED(IShellLinkW_GetPath(shellLink, path, MAX_PATH, NULL, 0)))
59 IPersistFile_Release(persistFile);
62 IShellLinkW_Release(shellLink);
65 return targetFileName;
71 _In_ HWND ListViewHandle
83 _In_ HWND ListViewHandle
86 if (((LPNMHDR)lParam)->hwndFrom == ListViewHandle && ((LPNMHDR)lParam)->code == LVN_KEYDOWN)
88 LPNMLVKEYDOWN keyDown = (LPNMLVKEYDOWN)lParam;
90 switch (keyDown->wVKey)
93 if (GetKeyState(VK_CONTROL) < 0)
97 if (GetKeyState(VK_CONTROL) < 0)