问题描述
如果获得了该文件夹的IShellFolder接口,我们如何获取该文件夹中某些文件的PIDL?
我使用了IShellFolder :: GetAttributesOf方法,但是它不起作用.以下代码中是否存在任何错误?请提出建议.
ShellLib.IShellFolder pShellFolder;
phellFolder = ShellLib.ShellFunctions.GetDesktopFolder();
IntPtr pidlRoot;
ShellLib.ShellApi.SHGetFolderLocation(IntPtr.Zero,(short)ShellLib.ShellApi.CSIDL.CSIDL_SYSTEM,IntPtr.Zero,0,out pidlRoot);
IntPtr [] arry = {};
uint rgf = 0;
pShellFolder.GetAttributesOf(1,arry,ref rgf);
How can we obtain the PIDLs of some files in a folder, if we got the IShellFolder Interface of that folder?
I used IShellFolder::GetAttributesOf Method, but it doesn''t work. Is there any mistake in the following code? Please suggest.
ShellLib.IShellFolder pShellFolder;
phellFolder = ShellLib.ShellFunctions.GetDesktopFolder();
IntPtr pidlRoot;
ShellLib.ShellApi.SHGetFolderLocation( IntPtr.Zero, (short)ShellLib.ShellApi.CSIDL.CSIDL_SYSTEM, IntPtr.Zero,0,out pidlRoot);
IntPtr[] arry ={ };
uint rgf = 0;
pShellFolder.GetAttributesOf(1, arry, ref rgf);
推荐答案
这篇关于IShellFolder :: GetAttributesOf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!