mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
bbdf6b3f49
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1613 21ef857c-d57f-4fe0-8362-d861dc6d29cd
22 lines
571 B
C#
22 lines
571 B
C#
using ProcessHacker.Native.Api;
|
|
|
|
namespace ProcessHacker.Native.Objects
|
|
{
|
|
public class DeviceHandle : NativeHandle
|
|
{
|
|
public DeviceHandle(string name, ObjectFlags objectFlags, DirectoryHandle rootDirectory)
|
|
{
|
|
ObjectAttributes oa = new ObjectAttributes(name, objectFlags, rootDirectory);
|
|
|
|
try
|
|
{
|
|
this.Handle = KProcessHacker.Instance.KphOpenDevice(oa).ToIntPtr();
|
|
}
|
|
finally
|
|
{
|
|
oa.Dispose();
|
|
}
|
|
}
|
|
}
|
|
}
|