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
1
vote
0 answers

C# Com Object cast to interface for file

I'm encountering a problem I don't seem to quite understand. I have this code I found Here which I tried to modify to my needs: Folder objFolder; LoadHeader(path, out arrHeaders, out objFolder); foreach (Shell32.FolderItem2 item in…
Armach
  • 15
  • 1
  • 5
1
vote
0 answers

Using Shell32-interfaces in PowerShell

Question out of curiosity: When you type "[Shell32." in the PowerShell-ISE it will offer you a couple of interfaces like [Shell32.Shell], [Shell32.FolderItem] etc... Is it possible to use these interfaces e.g. to gather meta information about files…
GuidoT
  • 280
  • 1
  • 12
1
vote
1 answer

How to get filename with extension in shell envirionment (winapi)?

I have a program that gets information about files in the windows recycle bin. The only non-crutch solution to the bucket access problem I see is using the shell environment. I have a code for removing single file (or folder) from recycle bin with…
Alex A.
  • 422
  • 3
  • 12
1
vote
1 answer

Can't properly add .dll reference in VS Code

I'm trying to add and use shell32.dll to my console project in VS Code. I put it to root folder of project, ..\bin and ..\bin\Debug. I made dotnet restore. Code in my .csproj file is:
Dork
  • 1,816
  • 9
  • 29
  • 57
1
vote
1 answer

Unable to locate SHCreateItemFromParsingName (SHELL32.dll)

Good afternoon all, I want to set up voice recognition macro's to run on my P.C (Windows XP Professional SP3) so I installed Windows Speech recognition Macros. However when I click on it, it states: The proceedure entry point…
Alan Smith
  • 11
  • 1
  • 2
1
vote
1 answer

SHBrowseForFolder with BIF_BROWSEFORCOMPUTER and SHGetPathFromIDList Not Working

I am trying to get SHBrowseForFolder with BIF_BROWSEFORCOMPUTER to work, in order to allow a user to select a computer on the network. I can get the dialog to display and allow selection of a network computer, the OK button is enabled, but when I…
VDeuce
  • 11
  • 1
1
vote
2 answers

ShellLink returning an old location

In a C# program I want to be able to identify the file locations of LNK files (the actual file location, not the LNK location). But sometimes ShellLink is returning an old location for a file. For instance it is returning "C:\Program Files…
Mick Bruno
  • 1,373
  • 15
  • 13
1
vote
1 answer

C# - new Shell32() throw an exception?

I need to use Shell32 in my C# application to create a lnk file. I added shell32.dll to my references and tried to compile this single code line: Shell32.Shell shell = new Shell32.Shell(); and I got an InvalidCastException! the error code :…
Roy Avidan
  • 769
  • 8
  • 25
1
vote
0 answers

Visual Basic shell32.shell

For more than likely a very obvious reason when I try build or run my program it breaks on this function below: Public Function GetLnkTarget(lnkPath As String) As String Dim shl = New Shell32.Shell() lnkPath =…
S. Cuth
  • 11
  • 2
1
vote
1 answer

What is the SHCIDS_ALLFIELDS flag of IShellFolder.CompareIDs trying to be?

Short Version What does the SHCIDS_ALLFIELDS flag of IShellFolder.CompareIDs mean? Long Version In Windows 95, Microsoft introduced the shell. Rather than assuming the computer is made up of files and folders, it is made up of an abstract namespace…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
1
vote
2 answers

Recursing android device using c# and shell32

As I want to recurse the complete structure of any folder I am using Shell32, which can connect to lettered drives c:\;d:\ etc and connected devices that do not have letters such as an Android tablet. My problem is that I cannot extract the Folder…
1
vote
1 answer

Use SHAssocEnumHandlers in C#

I am struggling to call the WinAPI SHAssocEnumHandlers in C#. using System; using System.Runtime.InteropServices; namespace AssocHandlerTest { [Flags] public enum ASSOC_FILTER { ASSOC_FILTER_NONE = 0x0, ASSOC_FILTER_RECOMMENDED = 0x1 …
Patrick
  • 341
  • 4
  • 15
1
vote
1 answer

SHGetNameFromIDList fails for FTP PIDLs

If I add an FTP network location on Windows, it creates a .lnk file pointing to the location. If I open the link via IShellLink, obtain its IShellFile target, and bind it to IShellFolder, I can enumerate the files on the remote location (after…
IS4
  • 11,945
  • 2
  • 47
  • 86
1
vote
0 answers

unable to cast COM object of type "system.__comObject" to interface type 'shell32.shell'

I run my project in win 7 and xp, but there is an error message, in this project I use shell32.shell to copy and extract automatic exe file, does shell32.shell not work in windows 7 and xp? if you can, please suggest that sheell32.shell can run Dim…
1
vote
0 answers

Querying desktop selected items in c# returning nothing

I found this code here on stack overflow and modified it to return a List instead of an arraylist. The function is called whenever I press a key, and while this function gets called alright, SelectedItems() just seems to be empty every time even…
Bob Saget
  • 67
  • 2
  • 8
1 2 3
8 9