shell32

Show More Details Option in Windows Vista Progress Dialog

折月煮酒 提交于 2019-12-12 17:34:19
问题 I use the IProgressDialog interface in order to create a ProgressDialog with Windows-Vista style like this: Dialogs that are shown while copying, pasting and moving files in Windows Explorer usually offer an additional button "More Details" that provides further information about the current progress. Is there any possibility to display and work with this button regarding the IProgressDialog interface? Best regards 回答1: Second screenshot is screenshot of IOperationsProgressDialog dialog.

P/Invoke for shell32.dll's SHMultiFileProperties

不羁岁月 提交于 2019-12-12 04:34:12
问题 I'm not very good with P/Invoke. Can anyone tell me how to declare and use the following shell32.dll function in .NET? From http://msdn.microsoft.com/en-us/library/bb762230%28VS.85%29.aspx: HRESULT SHMultiFileProperties( IDataObject *pdtobj, DWORD dwFlags ); It is for displaying the Windows Shell Properties dialog for multiple file system objects. I already figured out how to use SHObjectProperties for one file or folder: [DllImport("shell32.dll", SetLastError = true)] static extern bool

shell32 copyhere not working neither in .Net nor powershell script

南笙酒味 提交于 2019-12-11 07:34:17
问题 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 have made a script as below: function Usage() { echo "Usage:mtpcmd cp srcfile dstfolder" } function main { param($mainargs) # echo "args2:$mainargs" if(-not($mainargs.length -eq 2)) { Usage return } $srcfile=$mainargs[0] $dstfolder=$mainargs[1] $phone = Get-ChildShellItem | where { $_.Path -like '

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

耗尽温柔 提交于 2019-12-11 07:33:36
问题 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.microsoft.com/en-us/library/windows/desktop/ms723207(v=vs.85).aspx Update: Note, prefer a native solution-- this is for a distributed Excel VBA tool, so bundling 3rd-party files is not ideal. And, need synchronous compression. I can easily add a folder and its contents to the zip: oShell.Namespace

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

做~自己de王妃 提交于 2019-12-11 02:46:16
问题 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 pbc, [In][MarshalAs(UnmanagedType.LPStruct)] Guid iIdIShellItem, [Out][MarshalAs(UnmanagedType.Interface, IidParameterIndex = 2)] out IShellItem iShellItem); [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")] interface

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

孤街浪徒 提交于 2019-12-10 18:06:48
问题 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 system32/shell32.dll directly]. Both adds the shell32 reference to my references. But when I look at the properties, I see the path of the reference looks like this: "C:\Users\Tim\Documents\Visual Studio 2008\Projects\Wing\FileWing\obj\Debug\Interop.Shell32.dll" ...

Get list of selected files from Windows Desktop

跟風遠走 提交于 2019-12-09 16:12:11
问题 I am trying to get a list of selected files from the Windows Desktop and the Explorer Windows. The requirement is that I should be able to retrieve the current selection from the active explorer window or the Desktop. I have managed to put together the following code, after going through online resources, but it does not provide a list of selected items from the Desktop. ArrayList selected = new ArrayList(); var shell = new Shell32.Shell(); IntPtr handle = IntPtr.Zero; handle =

get the date when the file was sent to recycle bin

孤街浪徒 提交于 2019-12-07 09:22:56
问题 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. 回答1: OK - as usual it is very simple when you know how. I was thinking this would be a property of the file - but it is not - it is a property of the recycle bin. So once a link to the recycle bin has been got: var Shl = new Shell(); Folder Recycler = Shl

What is the correct way to implement a Managed Property Handler Shell Extension?

这一生的挚爱 提交于 2019-12-07 05:25:38
问题 Now that .NET CLR 4.0 supports side by side (SxS) operation it should now be possible to write shell extensions in managed code. I have attempted this and successfully coded a Property Handler that implements IPropertyStore, IInitializeWithStream and IPropertyStoreCapabilities. The handler works fine and is called as expected when browsing files via the explorer. It also works fine in displaying the custom properties in the preview panel and the file properties "detail" panel. However, when I

Referencing shell32 again, C# Visual Studio

↘锁芯ラ 提交于 2019-12-07 01:59:24
问题 Hmmm. Okay after revisiting PInvoke, I'm sure that I don't quite get it :-/ (just asked this question) Let me illustrate the code I need to handle. It works when I use "Add Reference --> COM --> Microsoft Shell Controls and Automatation" ... but sadly it places a reference in my project that looks like this: "C:\Users\Tim\Documents\Visual Studio 2008\Projects\Wing\FileWing\obj\Debug\Interop.Shell32.dll" I'm digging though the recycling bin and seek for a item that I want to recover. Is there