Questions tagged [shell32.dll]

shell32.dll is a library which contains Windows Shell API functions.

53 questions
12
votes
5 answers

How can I use the images within shell32.dll in my C# project?

How can I use the images within shell32.dll in my C# project?
MaxCoder88
  • 2,374
  • 6
  • 41
  • 59
6
votes
4 answers

Shell BrowseForFolder preselected path

I have this call: oShell.BrowseForFolder(Me.hwnd, "Select path:", 0, "C:\dir\") This opens a standard file browser dialog with "C:\dir\" as root. My problem is that you can not browse above the root folder. (as specified in doc…
thedev
  • 2,816
  • 8
  • 34
  • 47
6
votes
1 answer

How workaround windows-10 webbrowser shellfolderview scrolling Bug?

I use the WebBrowser-Control to view the Content of a folder. On windows 10 there is a Display-Bug, after reordering the content, when the selected Item moves from bottom to top. Let's reproduce: Start a clean winform or wpf Solution drag the…
gReX
  • 1,060
  • 1
  • 20
  • 35
5
votes
3 answers

Launch associated program or show "Open with" dialog from another program

Under Window Seven, the following command displays a dialog box then terminates without any other action, why? The expected effect is launching the associated program Notepad++ or at least Notepad RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL…
Aubin
  • 14,617
  • 9
  • 61
  • 84
4
votes
2 answers

Why does C# allow constructing an object from an interface in "new Shell32.Shell()"?

I know that in C# in general you can't create an instance of an abstract class or an interface. Can someone help me understand this code (it compile without any errors). Shell32.Shell shObj = new Shell32.Shell(); Shell32.Shell is an interface from…
user8453119
4
votes
2 answers

Clear Recycle Bin programmatically with Powershell

One of the hardest things I've had to do is access Windows APIs with PowerShell. I want to erase the Recycle Bin using the API in Shell32.dll. There are other ways of doing it, but they are typically bypassing the normal Windows processes and in…
4
votes
1 answer

C# .Net App On Windows XP Fails Shell32 Code for Renaming Shortcut

I have a situation where I have a windows Desktop APP in .Net C# that must on both Windows 7 and Windows XP rename a shortcut. I have it working in Windows 7 but on XP this fails. .Net 4.0 Client Profile and Extended is installed on XP and all…
meme
  • 103
  • 1
  • 1
  • 7
3
votes
1 answer

C# .NET 4.5 Getting target of shortcut without shell32.shell()

I'm not a very experienced programmer and new at C#, and I'm having some problems getting the target of a shortcut using shell32.shell(). I found the code here on stackoverflow - and it works beautifully on regular Windows PC's, but when executed on…
Nathan
  • 59
  • 6
3
votes
1 answer

ShellExecuteEx crashes in Excel VBA

Since Windows updates occurred, an API call to ShellExecuteEx(sExecuteInfo) crashes, saying: unhandled exception at 0x75F7A529 (shell32.dll) Access violation reading location 0x68686903 I have no clue what is wrong here, can you help me…
2
votes
1 answer

How to use SHGetStockIconInfo in Powershell?

I'm trying to pull folder icons for a listview in a winform. I'm using [Drawing.Icon]::ExtractAssociatedIcon for file icons, but it doesn't work on folders. I found this question here on stack which said to use SHGetStockIconInfo, but I can't wrap…
therks
  • 499
  • 3
  • 11
2
votes
1 answer

Show network folder icon in listview VB.NET

how do I show network folder icon in a listview? the one with the green tube under the folder, I have the code that works great with files and folders but when visiting other computer through network, I can't see the network folders that looks like…
Dhan
  • 213
  • 5
  • 21
2
votes
0 answers

ShellExecuteEx function works in a different way in Windows 10?

I'm trying to open info property of file. In the previous versions of Windows, properties window was shown and then the control was given to next function in my code, but in Windows 10 function call stucks until I'm closing file properties with…
Semant1ka
  • 647
  • 10
  • 26
1
vote
1 answer

API call to shell32.dll via FindExecutableA returns "Can not find the specific path" on UNC paths

I am doing an API call to FindExecutableA (Ansi version of FindExecutable) via shell32.dll from Smalltalk, but when I send UNC paths like \\\serverName\\sharedFolder\filename it returns error code 2, which basically means that the system could not…
1
vote
1 answer

console output using shellexecuteW

I'm using ShellExecuteW from shell32.dll: int value= ShellExecuteW(0, "open", "C:\test.bat", strParameters, "", 1); The batch file runs a java app which seems to open but returns an error and quickly the console window closes. I want to capture the…
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
2 3 4