windows-shell

Windows shell extension with C#

纵然是瞬间 提交于 2020-01-26 08:46:09
问题 I was wanting to write a simple windows shell extension to add to the context menu, and C# is the language I most use these days. Is it a decent choice for a shell extension? Are the interfaces easy to get to with it? Is there additional overhead that causes the menu to be slower to pop up? Any one have good pointers for getting started? 回答1: A Raymond's post: Do not write in-process shell extensions in managed code. A recent follow-up: Now that version 4 of the .NET Framework supports in

What is the “Shell Namespace” way to create a new folder?

南笙酒味 提交于 2020-01-24 13:05:52
问题 Obviously this is trivial to do with win32 api - CreateDirectory(). But I'm trying to host an IShellView, and would like to do this the most shell-oriented way. I would have thought that there would be a createobject or createfolder or some such from an IShellFolder. But neither IShellView nor IShellFolder nor even IFolderView seem to have anything quite like this. Is there a Shell-programming way to create a new folder? Or do I need to create a folder using a pathname, the old-fashioned way?

How to parse Explorer breadcrumb path like “This PC\Galaxy Tab A\Card\Folder1” using Windows Shell API?

爷,独闯天下 提交于 2020-01-23 06:21:25
问题 When a user has navigated in the Windows Explorer to e.g. a folder on the SD-card of his Android phone, the Explorer shows a kind of breadcrumb path like "This PC\Galaxy Tab A\Card\Folder1" when one clicks in the address bar. Windows Explorer also accepts these kind of paths when entering or copying them in the address bar and pressing return. I wonder if there is a way to parse these kind of breadcrumb paths using the Shell API and get a PItemIDList or IShellItem in return. So far I did not

IShellLink::SetIconLocation translates my icon path into %Program Files% which is WRONG

我怕爱的太早我们不能终老 提交于 2020-01-22 15:05:10
问题 Does anyone know how to correct for this behavior? Currently, when our installer installs our application, it obtains an IShellLink , then loads it up with the data necessary for our shortcut icon (in the start menu & desktop), and then uses IPersistFile::Save to write out the shortcut. The problem is that the path specified for the icon, via IShellLink::SetIconLocation , is transformed into using %ProgramFiles%... which... for x64, is WRONG. I've noticed that lots of other 32 bit software

Which DLL has PathCchAppend?

白昼怎懂夜的黑 提交于 2020-01-21 19:41:31
问题 I'm trying to conditionally use ( if available) the function PathCchAppend. I have got the function signature from header pathcch.h . However, when I try to get the address of function from SHLWAPI.DLL , it fails: auto pca = GetProcAddress(GetModuleHandle(L"shlwapi.dll"), "PathCchAppend"); Using Depends, I saw that this function does not exist in this DLL (I'm on Windows 10). There doesn't exist any pathcch.dll and hence cannot load it either. In which DLL this function is placed? EDIT:

Assigning keyboard shortcut to get path of selected item in windows explorer

家住魔仙堡 提交于 2020-01-21 10:28:12
问题 I don't know if this is even possible, but how can I bind some key combination to a (C#)program, so that when that keyboard shortcut is pressed with some file selected in windows explorer, it calls specific function with path of that file as a parameter. Or can I assign some keyboard shortcut so that windows explorer opens selected file in my program(that way I could pass the path to already running instance) thanks 回答1: You could modify your program to run as a shell extension which would

Cannot set registry insert for HKLM for 32-bit

社会主义新天地 提交于 2020-01-15 01:18:38
问题 I want to create a context menu with sub menu items in Inno-setup. The problem is, is that it inserts HKLM keys in the 64-bit registry (WoW6432Node) section. The documentation states that if the 64-bit architecture is not specified, the setup is running in 32-bit mode. Modes [Registry] Root: "HKCR"; Subkey: "folder\shell\TestMenu"; ValueType: string; Flags: UninsDeleteKey Root: "HKCR"; Subkey: "folder\shell\TestMenu"; ValueType: string; ValueName: "MUIVerb"; ValueData: "test menu"; Flags:

How can I write a Windows Shell Namespace Extension in Delphi?

前提是你 提交于 2020-01-12 10:21:18
问题 First, sorry for my poor English... I want to add a virtual folder to Windows Explorer using a Namespace Extension (NSE), and I want users to be able to open this virtual folder to explore some path (e.g., c:\test ). How can I do this using Delphi? Thanks. 回答1: The place to start is the MSDN documentation: Introduction to the Shell Namespace. Naturally this is written from a C++ perspective but it's not too hard to map that across to Delphi. Another excellent resource for such tasks is Code

Recognize Windows Shell Special Folder (i.e. get its CSIDL) via its pIDL (Now determine if pIDLs are equal with C#)

拜拜、爱过 提交于 2020-01-10 03:58:18
问题 I have a situation where I want to perform special processing on some Windows shell special folders (those corresponding to values in the CSIDL enum.) (My solution must be WinXP compatible.) The problem I'm having is that when I encounter IShellFolders as I work my way down the heirarchy, I cannot find a way to match up the IShellFolders to their CSIDL. This is my current approach: Initialize a static one-to-one data structure ( csidlToFromFullPIdl ) of all CSIDLs to their pIDLs returned by

How to Get Control Panel Categories (Groups) on Windows Vista and Windows 7

六月ゝ 毕业季﹏ 提交于 2020-01-07 04:52:27
问题 Is there a way to get a listing of control panel categories on Windows Vista and Windows 7 using the shell? Is there a way to determine which category an applet is assigned to using conical Names using the shell? such as Microsoft.Mouse is in which category? I have some code that works nicely to display control panel applet names obtained from the shell in a TListView in a Vista Classic ungrouped list. I'd like to try to group the applet names in the TListView similar to Control Panel Classic