Questions tagged [shell32]

The shell32 manages the Windows graphicall shell. It implements a lot of the Windows Explorer.

The Shell Namespace. Like files and directories forms a filesystem hierarchy, the hierarchy displayed by shell32 is called the shell namespace. It contains all the files and directories as descendents of My Computer (and under wine the Unixfs '/' folder) but it contains many more folders (e.g. Control Panel, Network Neighborhood etc.)

127 questions
4
votes
2 answers

Delete a FolderItem

I want to delete a file stored in an USB flashdrive (actually an android device's sd card). I ask the user to point the app's folder inside the sd card, and i hold a Shell32.Folder object pointing to it. I can iterate between the files (FolderItem…
Marcelo Vitoria
  • 591
  • 1
  • 5
  • 15
4
votes
1 answer

How can i get shortcut display name when mouse right-click in (c++/c#)

i'm buliding a dll about filecontextmenu , i need to get the execution path and shortcut displaynem when mouse right-click . now i can get the path ,but no idea how to get the displayname. EX: IE Shortcut in desktop, i need the name "IE" which can…
Tauz
  • 43
  • 4
4
votes
1 answer

Get CSIDL_LOCAL_APPDATA path for any user on Windows

Is there any Win32/MFC API to get the CSIDL_LOCAL_APPDATA for any user that I want (not only the currently logged on one)? Let's say I have a list of users in the form "domain\user" and I want to get a list of their paths - is that possible?
dennisV
  • 1,119
  • 3
  • 19
  • 34
4
votes
1 answer

get the date when the file was sent to recycle bin

Is there any call which will get the date when the file was sent to recycle bin. Items object in Shell32 gives the lastmodified date but not when it is sent to recycle bin. I want to be able to restore files deleted on a particular date.
SimonN
  • 383
  • 1
  • 2
  • 13
3
votes
1 answer

How to get missing "Frame height" and "Frame width" properties of a video file in C# using Shell32 (Windows 10)?

I'm trying to determine the resolution of video files using Shell32 in C#, but the properties return empty strings, although Windows shell displays the information just fine. Please note that I cannot incorporate any 3rd party libraries for this…
Gildon
  • 51
  • 6
3
votes
1 answer

Why is SHGetPathFromIDList function exported three times

I know that shell32.dll exports two types of functions—ANSI and UNICODE. (For the sake of simplicity, I am talking only about functions that take CHAR*/WCHAR* arguments.) For example, ShellMessageBoxA is the ANSI version, while ShellMessageBoxW is…
user2120666
  • 579
  • 1
  • 4
  • 16
3
votes
1 answer

ShGetFileInfo called for directory oddity

I have a simple file browser and there I display files and folders, obtained by (for directory) SHFILEINFO info = new SHFILEINFO(); SHGetFileInfo(filename, FILE_ATTRIBUTE_DIRECTORY, ref info,Marshal.SizeOf(info), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES…
Axarydax
  • 16,353
  • 21
  • 92
  • 151
3
votes
3 answers

C# Visual Studio 2008 Reference to system32.dll ... how?

I need the reference system32/shell32.dll as I use some shell functions to read out the recycling bin. I tried "Add Reference --> COM --> Microsoft Shell Controls and Automatation" and "Add Reference --> Browse ---> [going to the…
Akku
  • 4,373
  • 4
  • 48
  • 67
3
votes
4 answers

'Safe' DLL Injection

Not a terribly good question, sorry. I have a program that needs to be alerted when a file is opened from explorer (i.e. ShellExecute(A/W) is called). Unfortunately, Microsoft removed the COM interface (IShellExecuteHook) that allows you to hook…
Collin Dauphinee
  • 13,664
  • 1
  • 40
  • 71
3
votes
1 answer

How to add reference to IRunnableTask

I need to be able to implement the IRunnableTask interface, and have no idea how. I tried adding reference to C:\Windows\System32\Shell32.dll -- no luck... google to try and find information... nothing around how to import/include in a .net project…
wakurth
  • 1,644
  • 1
  • 23
  • 39
3
votes
2 answers

How can I optimize Shell32 method calls?

I'm designing a media player, and I've designed a Movie class. The Movie class has a MovieInfo member, which inherits from MediaInfo. MediaInfo has several properties representing the metadata (is that what you call it?) of the Movie file, such as…
Daniel
  • 2,944
  • 3
  • 22
  • 40
3
votes
2 answers

P/Invoke with Shell32, bypass Interop.Shell32.dll generation

So I'm using the following code to dump every extended file attribute to the debug console... ShellClass shellClass = new ShellClass(); Folder dir = shellClass.NameSpace(Path.GetDirectoryName(sFilePath)); FolderItem item =…
Lord Skitch
  • 33
  • 1
  • 3
2
votes
1 answer

Do I need to free resources when calling SHCreateItemFromParsingName from managed code?

I have the following code: [DllImport("shell32.dll", CharSet = CharSet.Unicode, PreserveSig = false)] static extern void SHCreateItemFromParsingName( [In][MarshalAs(UnmanagedType.LPWStr)] string pszPath, [In] IntPtr…
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
2
votes
1 answer

Can I free memory allocated for parameters when SHChangeNotify is called with the SHCNF_FLUSHNOWAIT parameter?

I have the following declaration for SHChangeNotify : [DllImport("Shell32.dll")] public static extern void SHChangeNotify(HChangeNotifyEventID wEventId, HChangeNotifyFlags uFlags, IntPtr dwItem1, IntPtr dwItem2); Is the following code safe…
Sébastien Nussbaumer
  • 6,202
  • 5
  • 40
  • 58
2
votes
1 answer

How to call SHChangeNotify from C# without error 14007

I'm writing code that can update files (how uncommon and exciting !). When a file has been updated I need Windows Explorer to call the overlay extensions again, so that I always have the correct overlays over files. I figured I would do this with…
Sébastien Nussbaumer
  • 6,202
  • 5
  • 40
  • 58
1
2
3
8 9