阅读:1415回复:1
如何让两个应用程序都可以createfile一个packet驱动程序的句柄?
我有两个应用程序都要用到packet驱动程序,可是一个应用程序createfile成功了之后,另外一个就失败了,
请问有什么最简洁的方法可以让两个应用程序都可以createfile呢? |
|
沙发#
发布于:2002-10-28 10:57
IoCreateDevice
NTSTATUS IoCreateDevice( IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName OPTIONAL, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject ); 将倒数第二个参数Exclusive置为FALSE即可。 Exclusive Indicates whether the device object represents an exclusive device. That is, only one handle at a time can send I/O requests to the corresponding device object. If the underlying device supports overlapped I/O, multiple threads of the same process can send requests through a single handle. |
|
|