Hello Maxim,
No my DriverEntry runs on demand, i.e. I load the driver using SCM
manually.
I tried to do it in dispatch routine as well and it doesn’t work.
I even tried to create an event not in BasedNamedObjects and it
doesn’t work too.
It seems that IoCreateSynchronizationEvent doesn’t work at all.
If I pass a handle and will get KEVENT object for the handle will I
be able to use this object in context of other processes?
–
Roman Kudinov
Monday, August 30, 2004, 1:45:03 PM, you wrote:
MSS> Surely.
MSS> Your DriverEntry runs too early, when BaseNamedObjects is not created yet.
MSS> Do not use named events. Instead, register the event by passing its handle
MSS> via IOCTL parameter.
MSS> Maxim Shatskih, Windows DDK MVP
MSS> StorageCraft Corporation
MSS> xxxxx@storagecraft.com
MSS> http://www.storagecraft.com
MSS> ----- Original Message -----
MSS> From: “Roman Kudinov”
MSS> To: “Windows File Systems Devs Interest List”
MSS> Sent: Monday, August 30, 2004 1:36 PM
MSS> Subject: [ntfsd] IoCreateSynchronizationEvent
>> Hi,
>>
>> I can’t create a named event in my DriverEntry routine. Here is the
>> snippet of code:
>> --------------------------------------------
>> RtlInitUnicodeString(&strEventName,
MSS> L"\\BasedNamedObjects\DITEvent");
>>
>> pEvent = IoCreateSynchronizationEvent(&strEventName, &hEvent);
>> if(!pEvent) //I can’t create a named event, so for the
>> //testing purposes I create a regular event
>> {
>> KeInitializeEvent(&kEvent, SynchronizationEvent, FALSE);
>> pEvent = &kEvent;
>> }
>> --------------------------------------------
>>
>> I tried both
>> - to create the named event in user mode first
>> - to create the named event in kernel mode first
>>
>> pEvent and hEvent are NULL after call to IoCreateSynchronizationEvent.
>>
>>
>>
>> I define variables on the global scope:
>> PKEVENT pEvent;
>> HANDLE hEvent;
>>
>>
>>
>> –
>> Roman Kudinov
>>
>>
>> mailto:xxxxx@rbcmail.ru
>>
>>
>> —
>> Questions? First check the IFS FAQ at
MSS> https://www.osronline.com/article.cfm?id=17
>>
>> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to
>> xxxxx@lists.osr.com
MSS> —
MSS> Questions? First check the IFS FAQ at
MSS> https://www.osronline.com/article.cfm?id=17
MSS> You are currently subscribed to ntfsd as: xxxxx@rbcmail.ru
MSS> To unsubscribe send a blank email to
MSS> xxxxx@lists.osr.com