Don
Wed Apr 18 09:32:38 CDT 2007
What Max is saying is that Mailslots are a terrible way to communicate from
the application to the driver. You may have gotten the open to work, but
you still need to handle detection and cleanup when the application fails,
the lack of security with Mailslots (unless you do a lot of work), and the
shared nature of mailslots that makes it easy for an application to attempt
to attack the system through your driver.
An inverted call, is an IOCTL that you pend till you need to request
something from the application, you then complete it and when the app has
done the work it calls back with the IOCTL. See
http://www.osronline.com/login.cfm?prompt=ntInsider&id=94 for details and
code samples. This approach has good security, since the application has
to open your driver, automatic notification of application failures since
the request is canceled, and protection against sharing attacks, since you
can distinguish the sender.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website:
http://www.windrvr.com
Blog:
http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"KuRLiC" <KuRLiC@discussions.microsoft.com> wrote in message
news:635A0FEF-C974-4207-9669-E121CB10F337@microsoft.com...
>
> ^^ i'm new with drivers and i don't know what is an
> "inverted call" but i solved the problem,
> there was a flag (FILE_SHARE_READ) required to open a mailslot
> thank you anyway :P
>
> "Maxim S. Shatskih" wrote:
>
>> Use inverted call instead, it's easier.
>>
>> --
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> maxim@storagecraft.com
>>
http://www.storagecraft.com