@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Creates a new file or directory, or opens an existing file, device, directory, or volume. !!!!C# Signature: [DllImport("ntdll.dll")] public static extern int NtOpenDirectoryObject( out SafeFileHandle DirectoryHandle, uint DesiredAccess, ref OBJECT_ATTRIBUTES ObjectAttributes); !!!!User-Defined Types: [OBJECT_ATTRIBUTES] !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: static void ObjectManagerTest() { SafeFileHandle h; var attr = new OBJECT_ATTRIBUTES("\\", 0); var st = Win32.NtOpenDirectoryObject( out h, 1, ref attr); if (st < 0) return; var bufsz = 1024; var buf = Marshal.AllocHGlobal(bufsz); uint context = 0, len; for (; ; ) { st = Win32.NtQueryDirectoryObject(h, buf, bufsz, true, context == 0, ref context, out len); if (st < 0) break; var odi = (OBJECT_DIRECTORY_INFORMATION) Marshal.PtrToStructure(buf, typeof(OBJECT_DIRECTORY_INFORMATION)); System.Diagnostics.Debug.Print( "0x{0:X2}:{1,-25}{2}", context, odi.TypeName, odi.Name); } Marshal.FreeHGlobal(buf); h.Dispose(); } Documentation: NtOpenDirectoryObject@msdn on MSDN
Edit ntdll.NtOpenDirec...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.