Questions tagged [shell32.dll]

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

53 questions
0
votes
0 answers

IShellWindows::FindWindowSW returns S_FALSE for desktop if explorer restarted

I have a program that passes a command line to the explorer process to execute in the user's non-elevated desktop context. Part of doing that requires using IShellWindows::FindWindowSW to search for the desktop window, as can be seen in this…
Jay
  • 319
  • 3
  • 12
0
votes
0 answers

How to get the max index (max iColumn) of Shell32.Folder.GetDetailsOf(vItem, iColumn) method?

Currently, I get the list of properties with GetDetailsOf like this: using Shell32;//Add reference > .COM > Type Libraries > Microsoft Shell Controls and Automation //.... var shell = new Shell(); var objFolder =…
123iamking
  • 2,387
  • 4
  • 36
  • 56
0
votes
1 answer

Is there a function like ExtractIconEx but for in-memory data instead of from a file

In the zserge/tray project, in the windows tray_update function, the ExtractIconEx function is used to construct the icon handle (HICON icon). The function is passed tray->icon as the first argument, which is a string that points to a .ico file. My…
psidex
  • 435
  • 1
  • 6
  • 15
0
votes
0 answers

File type returns empty string

I'm trying get file type name (like Folder, bitmap image, Text file etc...) with c#. I dont want get from registry because of privilege reasons. I found this method from internet. It working well for get file icon (SHGFI_LARGEICON,…
Fatih
  • 945
  • 15
  • 26
0
votes
1 answer

PickIconDlg won't allow path longer than initial path setting

I need to allow the user to select an icon, so I've implemented the PickIconDlg function from shell32. The problem is that if the user selects a path that is longer than the initial path I declare, the resultant value is the user-selected path…
Zane H.
  • 3
  • 1
0
votes
1 answer

VBA Runtime error 429 while creating an object of Shell32.dll

I am trying to write a VBA function which will get the handle for a specific already open IE window. I have found below code after some googling for this:- Public Function FindIEObject(target As String) As InternetExplorerMedium Set objShell =…
Premanshu
  • 3
  • 2
0
votes
1 answer

Moving system file across drives results in fAnyOperationsAborted is TRUE, when using Shell32DLL SHFileOperation/SHFILEOPSTRUCT

When using the Shell32DLL SHFileOperation for file operations, I came across an issue related to moving system file(s) across drives (eg. c:\ to d:). When moving, the user will be prompted by a system dialog asking "Are you sure you want to move…
0
votes
1 answer

VB.net or Windows API: How to find out which icons the file explorer uses?

I am currently working on a Windows desktop application using VB.net where I would like to have a file and folder browsing interface directly integrated, i.e. the user does not have to open a file browser dialog to select files. My file browser…
Binarus
  • 4,005
  • 3
  • 25
  • 41
0
votes
2 answers

Referencing Shell32.dll?

I don't have .NET 4.5 to unzip zip files, so I'm using Shell32 like this. But when I reference the dll like this: csc.exe /r:"C:\Windows\System32\shell32.dll" ... I get this error: fatal error CS0009: Metadata file 'c:\Windows\System32\shell32.dll'…
user6438653
0
votes
1 answer

How come this use of ExtractIconEx, is returning index is out of bounds and x is jumping 10 values higher on exception?

I have written the following code which is intended to return a List which is a list of all the Icons found in the file. private List GetIconsFromFile(string file) { List icons = new List(); IntPtr[] large = new…
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
0
votes
1 answer

Targetting Windows 7 desktop: identifier "SHGetKnownFolderPath" is undefined

I am writing a C++ desktop app for Windows 7 and later. I want to get the path to the AppData/Roaming folder so I use SHGetKnownFolderPath: #include "stdafx.h" #include #include void hello() { LPWSTR roamingPath; …
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0
votes
0 answers

How to Call SHSetLocalizedName in C#

I want to localize a folder name. While I haven't found any method in C# Microsoft provides the C++ function SHSetLocalizedName. I should be able to access this function by declaring it like…
Jan
  • 633
  • 11
  • 22
0
votes
1 answer

How to get Root Drive details using Windows API Code Pack?

I wrote function which allows me to get all properties of any file. This function even works for folders. But I mentioned that without "Windows API Code Pack" and using "Shell32" you can get early about 308 properties of any file. …
0
votes
0 answers

Publish Asp.net with shell32 dll

I use the following code to get size of a video in seconds. I use the shell32 dll. When I try to publish, the dll is not on the bin folder. Once I publish my project on IIS 7, I get an error ( I suppose it is because that dll is not working ). The…
Flezcano
  • 1,647
  • 5
  • 22
  • 39
0
votes
2 answers

System.ArgumentException: Win32 handle that was passed to Icon is not valid or is the wrong type

I have the below code to load an icon using Shell32 dll. It works fine on my machine. But one of the systems in production environment got an exception saying "System.ArgumentException: Win32 handle that was passed to Icon is not valid or is the…
Jyina
  • 2,530
  • 9
  • 42
  • 80