阅读:1564回复:1
users受限用户怎么打开驱动?
users受限用户怎么打开驱动?
HANDLE m_hDevice = CreateFile( \\\\.\\test, GENERIC_READ , FILE_SHARE_READ , 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE)INVALID_HANDLE_VALUE); 在user用户时失败, 怎么办? |
|
沙发#
发布于:2011-09-09 10:32
用安全描述符创建设备,允许低权限用户打开。
RtlInitUnicodeString(&ustrSecDDL,L"D:P(A;;GA;;;AU)"); RtlInitUnicodeString( &nameString, L"\\FileSystem\\Filters\\zzzCDO" ); status = IoCreateDeviceSecure( DriverObject, 0, //has no device extension &nameString, FILE_DEVICE_DISK_FILE_SYSTEM, FILE_DEVICE_SECURE_OPEN, FALSE, &ustrSecDDL, NULL, &gSFilterControlDeviceObject ); |
|
|