 |
|
 |
Hi, I just signed to thank the author of this useful tool and share the solution of a little problem I had.
One day I noticed that findtarget and other context menus like winrar stopped working so I installed shellexview tool to find the cause of this.
It turned out to be DWFShellExt Class from Autodesk. I just disabled it and everything is fine.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
hi there,
has anyone an idea how i would get this nice tool running under xp64? the registration succeeds but it wont show up in the popup even after rebooting the machine.
any hints?
thanks tilo
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I've been using this for a few years now on each successive PC I use. It saves me so much time and I wanted to say thanks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, If I right click on a shortcut on an expanded start menu, then 'Find Target' the folder containing the file the s/c points to is displayed.
If I right click on a shortcut on the desktop, an explorer window opens displaying the desktop, not the folder containing the file the shortcut points to.
If I right click on a shortcut in an explorer pane, Find Target is not displayed.
David Lawrie (XP Pro).
David A Lawrie
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
[To use the extension, either just regsvr32 it, or . . . . .]
Never having used regsvr32 before I was a little in doubt about what to do but it worked first try (actually 2nd try - had to copy "FindTarget.dll" to System32 folder) and I expect this will be a very valuable tool for me.
Thanks Paul
Bill Hart
(sorry about my unfamiliarity with posting msgs)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
the API SHOpenFolderAndSelectItems() does this in much less code.
give it the idlist from the shortcut and away you go.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shopenfolderandselectitems.asp
Chris Guzak (ms)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
this is built on top of features that do exist in Win2K. CLSID_ShellWindows/IShellWindows can be used to enumerate open folder windows and to get to the FolderView (IShellView/IFolderView interfaces) object that is hosted there. below is some code, with supporting helpers that demonstrate some of this (some of these helpers are only in XP but those too can be implemented on top of the shell architecture in Win2K).
---- code that uses shell windows objects and gets a reference to the views in those windows ---
#define IID_PPV_ARG(IType, ppType) IID_##IType, reinterpret_cast(static_cast(ppType)) #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
STDAPI DisplayNameOf(IShellFolder *psf, LPCITEMIDLIST pidl, DWORD flags, PWSTR psz, UINT cch) { *psz = 0; STRRET sr; HRESULT hr = psf->GetDisplayNameOf(pidl, flags, &sr); if (SUCCEEDED(hr)) hr = StrRetToBufW(&sr, pidl, psz, cch); return hr; }
STDAPI_(DWORD) SHGetAttributes(IShellFolder *psf, LPCITEMIDLIST pidl, DWORD dwAttribs) { // like SHBindToObject, if psf is NULL, use absolute pidl LPCITEMIDLIST pidlChild; if (!psf) { SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &psf), &pidlChild); } else { psf->AddRef(); pidlChild = pidl; }
DWORD dw = 0; if (psf) { dw = dwAttribs; dw = SUCCEEDED(psf->GetAttributesOf(1, (LPCITEMIDLIST *)&pidlChild, &dw)) ? (dwAttribs & dw) : 0; psf->Release(); }
return dw; }
STDAPI IUnknown_QueryService(IUnknown* punk, REFGUID guidService, REFIID riid, void **ppv) { *ppv = NULL; HRESULT hr = E_FAIL; if (punk) { IServiceProvider *psp; hr = punk->QueryInterface(IID_PPV_ARG(IServiceProvider, &psp)); if (SUCCEEDED(hr)) { hr = psp->QueryService(guidService, riid, ppv); psp->Release(); } } return hr; }
STDAPI SHGetIDListFromUnk(IUnknown *punk, LPITEMIDLIST *ppidl) { HRESULT hr = E_NOINTERFACE;
*ppidl = NULL;
IPersistFolder2 *ppf; if (punk && SUCCEEDED(punk->QueryInterface(IID_PPV_ARG(IPersistFolder2, &ppf)))) { hr = ppf->GetCurFolder(ppidl); ppf->Release(); } return hr; }
HRESULT SHGetName(LPCITEMIDLIST pidl, DWORD gdnFlags, PTSTR psz, UINT cch) { IShellFolder *psfDesktop; HRESULT hr = SHGetDesktopFolder(&psfDesktop); if (SUCCEEDED(hr)) { IShellFolder *psf; LPCITEMIDLIST pidlChild; hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &psf), &pidlChild); if (SUCCEEDED(hr)) { hr = DisplayNameOf(psf, pidlChild, gdnFlags, psz, cch); } psfDesktop->Release(); } return hr; }
HRESULT ViewFromWebBrowserApp(IWebBrowserApp *pwba, REFIID riid, void **ppv) { IShellBrowser* psb; HRESULT hr = IUnknown_QueryService(pwba, SID_STopLevelBrowser, IID_PPV_ARG(IShellBrowser, &psb)); if (SUCCEEDED(hr)) { IShellView* psv; hr = psb->QueryActiveShellView(&psv); if (SUCCEEDED(hr)) { hr = psv->QueryInterface(riid, ppv); psv->Release(); } psb->Release(); } return hr; }
HWND WindowFromUnk(IUnknown *punk) { HWND hwnd = NULL; IOleWindow *pow; if (SUCCEEDED(punk->QueryInterface(IID_PPV_ARG(IOleWindow, &pow)))) { pow->GetWindow(&hwnd); pow->Release(); } return hwnd; }
STDAPI FindWindowByHWND(HWND hwnd, REFIID riid, void **ppv) { HRESULT hr = E_FAIL; *ppv = NULL;
IShellWindows* psw; if (SUCCEEDED(CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_ALL, IID_PPV_ARG(IShellWindows, &psw)))) { VARIANT v; v.vt = VT_I4;
IDispatch *pdispWBA; for (v.intVal = 0; FAILED(hr) && S_OK == psw->Item(v, &pdispWBA); v.intVal++) { IWebBrowserApp *pwba; if (SUCCEEDED(pdispWBA->QueryInterface(IID_PPV_ARG(IWebBrowserApp, &pwba)))) { HWND hwndWBA; if (SUCCEEDED(pwba->get_HWND((LONG_PTR*)&hwndWBA)) && (hwnd == hwndWBA)) { hr = ViewFromWebBrowserApp(pwba, riid, ppv); } pwba->Release(); } pdispWBA->Release(); }
psw->Release(); } return hr; }
----- Original Message ----- From: "Paul Farry" To: "chrisg" Sent: Sunday, March 23, 2003 6:01 PM Subject: [CodeProject] Re: much easier/more reliable way to do this
> NOTE: This message has been sent from an unattended email box. To reply > either visit the URL below or copy and paste the email address > that was supplied to us below into your email client. > > An answer has been posted to your message on the page 'Find Target Shell Extension': > > URL : http://www.codeproject.com/useritems/findtarget.asp?msg=453682#xx453682xx > From: Paul Farry (pfarry@coloradogroup.com.au) > > This call appears to be only for XP or better. > > Anything comparable for W2k? > > > > --------------------------------------------------------------- > This message was created by The Code Project > http://www.codeproject.com > > >
Chris Guzak (ms)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
For your information, "Find Target" can also be done with ShellExecute a command line as "Explorer.exe /e,/select,C:\\Windows\\notepad.exe".
I tried and this works at WinXP. I'm not sure if it also works at W2K or earlier Windows.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have try to register it with regsvr32 and rebuild the entire project, but it dose not display in the context? Why?
-------------------------------------- e-mail: billhao@hotmail.com MSN Messenger: billhao@hotmail.com http://www.minivoice.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
the same, not displayed. I am using win2000 pro, what is your system?
-------------------------------------- e-mail: billhao@hotmail.com MSN Messenger: billhao@hotmail.com http://www.minivoice.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Paul, Good job!
-------------------------------------- e-mail: billhao@hotmail.com MSN Messenger: billhao@hotmail.com http://www.minivoice.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
[To use the extension, either just regsvr32 it, or . . . . .]
Never having used regsvr32 before I was a little in doubt about what to do but it worked first try (actually 2nd try - had to copy "FindTarget.dll" to System32 folder) and I expect this will be a very valuable tool for me.
Thanks Paul
Bill Hart
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
I'm sorry there was a problem with my code.. I loaded it onto another system and discovered I was incorrectly adding the classid to the registry.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Any way to solve it? This function is very useful for me. I hope you can solve it. Thanks for your code.
-------------------------------------- e-mail: billhao@hotmail.com MSN Messenger: billhao@hotmail.com http://www.minivoice.com
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |