Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
152 views

Opening Folder in New Tab of Existing Shell Window

Note: This question only applies to Windows 11. I want to open a folder in a new tab of an existing shell window. It seems that there is no official API. I have tried two method: The first, most ...
jtxkopt - Stand With Palestine's user avatar
0 votes
0 answers
46 views

Difference between Shell and Shell32 VBA [duplicate]

When we declare object with DIM in VBA, at some places I find Dim objShell as Shell and sometimes code contains Dim objShell as Shell32. What is the difference between Shell and Shell32 specifically ...
CMMaliniJoshi's user avatar
0 votes
0 answers
83 views

SHGetFileInfoW not modifying reference passed into function

I'm trying to create my own version of a file explorer in python. I'm stuck trying to get a file's associated icon. Currently I'm using the SHGetFileInfoW imported from the ctype library. Below is my ...
Anthony Espinoza's user avatar
-1 votes
1 answer
159 views

".NET 7 Way" Of Getting Extended File Attributes

I need to modernize some file I/O helper code from .NET 4.x to .NET 7, and in particular, a method to read Extended File Attributes. In the past, using Shell32 was regarded as a "necessary evil&...
blcamp's user avatar
  • 119
0 votes
1 answer
476 views

ShellExecuteA cannot execute '.exe' in Python (with. ctypes ShellExecuteA)

I have compiled below code but cannot execute the "PPP.exe". '.exe' file exists same directory with '.py' file. Why cannot working(or "open") this code?? Please let me know. import ...
Jung-soo Lee's user avatar
1 vote
0 answers
205 views

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); ...
Armach's user avatar
  • 15
1 vote
0 answers
312 views

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 ...
GuidoT's user avatar
  • 312
0 votes
1 answer
416 views

C# shell.NameSpace does not find the folder on an external device

I have the following problem: I am using the Shell32 library to be able to access files even on external devices such as my android phone. Getting a local folder and the Phone itself works, but not ...
Fingeg's user avatar
  • 61
0 votes
0 answers
240 views

C# Why is Shell32.Shell.Windows() so slow?

When I try to iterate the file explorer windows in C#. It takes 7 - 15 seconds to execute the Windows method. In powershell, it takes less than a second. What is causing such a long delay? ...
John's user avatar
  • 6,249
1 vote
1 answer
670 views

How can I get a HWND from a InternetExplorer object

I am trying to get the current folder location of a Windows Explorer window. With this snippet, I am able to iterate all the windows and get their locations. However, I need to match them up to their ...
John's user avatar
  • 6,249
2 votes
1 answer
519 views

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 ...
Alex A.'s user avatar
  • 452
0 votes
1 answer
389 views

Is there a way of finding uID of a specific application?

I am trying to catch the uID variable from the NOTIFYICONDATA struct, used in Shell_NotifyIcon function (shellapi.h). I got the hWnd of the process window and hIcon the handle of the icon. The ...
Isfan Choudry's user avatar
0 votes
0 answers
255 views

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 ...
Jay's user avatar
  • 329
0 votes
1 answer
175 views

Portable USB device path obtained with shell32 - invalid characters in path

I'm looking for a way to access files on a smartphone connected through USB cable using standard System.IO stuff like Directory and StreamReader. I have obtained a pretty wicked-looking path to my USB ...
ttaaoossuu's user avatar
  • 7,874
1 vote
1 answer
501 views

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: <Project Sdk=&...
Dork's user avatar
  • 1,886
0 votes
1 answer
476 views

Disable Windows Recycle Bin delete confirmation in C#

I am creating a small program which has a few functionalities to make my PC "feel better". One of those functionalities is emptying my recycle bin. I am using the following code for that: ...
Cihan Kurt's user avatar
0 votes
1 answer
217 views

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 ...
psidex's user avatar
  • 455
0 votes
0 answers
101 views

Icon extraction and namespaces

I am currently trying to make some modifications to some existing .NET code as I want to extend the current functionality. Unfortunately I do not have much experience in MSDN and need help with the ...
Jordan Austin's user avatar
1 vote
1 answer
639 views

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 ...
VDeuce's user avatar
  • 11
0 votes
0 answers
432 views

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 ...
Fatih's user avatar
  • 1,135
0 votes
0 answers
306 views

How to trigger RegenerateUserEnvironment forcibly

I'm currently having trouble applying logon script(powershell) on windows servers. The logon script has the line to set user environment variables but the variables don't look like being applying ...
정해원's user avatar
2 votes
2 answers
359 views

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 ...
Mick Bruno's user avatar
  • 1,423
3 votes
1 answer
1k views

How to get the list of file in recycle bin by using c# console application

I am working on homework to get the file count of the recycle bin by using shell32.dll. However, I am struggling to display the list of the files in the recycle bin and keep getting a System....
coderSquirrel's user avatar
0 votes
1 answer
617 views

shell.NameSpace(path) returns null when path is a portable device's folder

I am trying to move files from one path to another, the destination path needs to support portable devices like android phones. After discovering FolderBrowserDialog does not support portable devices ...
cnc's user avatar
  • 23
3 votes
1 answer
2k views

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 ...
Gildon's user avatar
  • 51
1 vote
1 answer
754 views

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 ...
Roy Avidan's user avatar
1 vote
0 answers
1k views

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....
S. Cuth's user avatar
  • 11
0 votes
0 answers
420 views

IShellDispatch NameSpace-call fails, don't know why

First time working with COM from C++, been using C# and Delphi before. So here's the code HRESULT Result; Result = CoInitialize(nullptr); if (!SUCCEEDED(Result)) return Result; ...
ReBoot's user avatar
  • 27
1 vote
1 answer
368 views

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 ...
Ian Boyd's user avatar
  • 256k
1 vote
2 answers
269 views

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. ...
user3535647's user avatar
1 vote
1 answer
799 views

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 { ...
Patrick's user avatar
  • 371
-1 votes
3 answers
1k views

DeleteFile (kernel32.dll) vs DeleteItem (shell32.dll)

What is the difference between the two functions? DeleteFile function IFileOperation::DeleteItem method
user8056359's user avatar
1 vote
1 answer
274 views

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 ...
IS4's user avatar
  • 13.1k
1 vote
0 answers
1k views

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,...
Kamarur Rama's user avatar
0 votes
1 answer
8k views

Iterating over an array batch script

While following a tutorial for iterating over arrays in a batch script I didn't get the same result: @echo off setlocal enabledelayedexpansion set topic[0] = comments set topic[1] = variables set ...
Adrian Elder's user avatar
  • 2,061
1 vote
0 answers
110 views

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, ...
Bob Saget's user avatar
2 votes
1 answer
445 views

Read Date Taken of a video

Is it possible to read date taken of a video not the Created Date or Modified Date ... i tried to check the video details but i always see the Date Taken is Empty List<string> ...
Lemo's user avatar
  • 519
3 votes
1 answer
589 views

SHChangeNotify with SHCNE_RMDIR behavior inconsistent between Windows 7 and Windows 10

Overview I am using SHChangeNotify with SHCNE_RMDIR to notify the shell of a folder that has been removed from within my shell namespace extension. My expectation is that this will cause any ...
Matt Smith's user avatar
  • 17.4k
0 votes
2 answers
648 views

How to delete multi-selected items from recyclebin using C#?

how to delete multi-items via C# or windows api, I have search for this for a long time and no solution. I used FolderItemVerb in Shell32.dll to delete file one by one, but it would pop a dialog at ...
roy's user avatar
  • 11
1 vote
1 answer
259 views

How to change windows recyclebin properties

How can I get this property of recyclebin and switch it using C#.
roy's user avatar
  • 11
2 votes
1 answer
666 views

shell32 copyhere not working neither in .Net nor powershell script

There is a powershell script to copy files between pc and android via MTP programmatically,see access-file-system-against-mtp-connection,and it works when it running under powershell console,then i ...
coder's user avatar
  • 203
2 votes
0 answers
2k views

Send files to printer without printer dialoge in VB.net using InvokeVerbEx("Print")

I'd like to send several types of files to the printer wihtout the printer dialog; I've found a vbs script which works and translate it to vb.net like so; Private Sub SendToPrinter2(MyPj As PrintJob,...
Dennis's user avatar
  • 1,548
1 vote
2 answers
1k views

How To Compress Folder-Contents in 1 Statement on Windows?

I'm attempting to zip a folder containing subfolders and items, using Windows shell CopyHere command: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx https://msdn....
johny why's user avatar
  • 2,191
3 votes
1 answer
600 views

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, ...
user2120666's user avatar
-6 votes
1 answer
365 views

Show Window specific JumpList in Windows

My program opens multiple windows on taskbar (not MDI). I want to display a Jumplist that is specific for each Window. How is it done?
tunafish24's user avatar
  • 2,459
2 votes
1 answer
2k views

Export ordinal without def file

We can export ordinal using def file.But the system dlls doesn't use def files.Still shell32.dll have 569 ordinal exports and user32.dll have 181 ordinal exports. Is there any way to export ordinal ...
Junaid Jamil's user avatar
1 vote
1 answer
276 views

What is the reason for null entries in address export table of a windows pe file?

I have a project I have built that inspects a Windows PE file. When processing certain files, such as User32 and Shell32, I notice there are entries in the export address table that are 0. What is the ...
David Jones's user avatar
1 vote
1 answer
5k views

Visual Basic (vb.net): Get details of video file eg. frame width

I am using the shell32.dll to retrieve extended properties of a file. My textbox will display every property of the file (iCollumn -1 to 300) but it won't show the framewidth or frameheight (and many ...
user207913's user avatar
6 votes
1 answer
2k views

Internet Shortcut IDList value decoding

I have been trying to find any information on a value that is stored in an url shortcut that is generated from MS-Office for SharePoint Libraries. We are moving away from Office 2007 to Office 365 and ...
Toby Leduc's user avatar
4 votes
3 answers
619 views

IProgressDialog questions: Do I misunderstand its multithreading, as I seem to need a message pump? Can I avoid opening another dialog before it ends?

I'm trying to use IProgressDialog in PROGDLG_MODAL mode and I'm hitting two snags. First, from what I gather from MSDN and the block comment in the <shlobj.h> header file describing ...
andlabs's user avatar
  • 11.5k