Re[2]: FltGetMessage with variable size buffer

As I said a mechanism like this is cumbersome using FM ports. But what I
have done is when the port is opened in user mode using
FilterConnectCommunicationPort() you can specify a context structure
which is received in your Connect callback. In here specify the buffer
size for this communication channel. When the kernel component needs to
send a request, it checks this size and if too small sends back a
request indicating it needs a larger request buffer. The user mode
component in turn closes the comm port and re-opens it with a larger
buffer size indicator in the context structure. The kernel thread can
wait until the new port is opened, check the size again and then send
along the request accordingly.

Using this mechanism you can ensure that the buffer size is sufficient
for the kernel mode requests but it is cumbersome.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com http:</http:>
866.263.9295

------ Original Message ------
From: xxxxx@adobe.com
To: “Windows File Systems Devs Interest List”
Sent: 4/9/2015 10:55:48 AM
Subject: RE:[ntfsd] FltGetMessage with variable size buffer

>That makes sense. It’s unclear to me how to negotiate the request for a
>larger buffer using the communications port interface. Do you know of
>some sample code or recommendation? Does it involve use of the
>OVERLAPPED structure?
>
>Thanks.
>
>Nabeel
>
>—
>NTFSD is sponsored by OSR
>
>OSR is hiring!! Info at http://www.osr.com/careers
>
>For our schedule of debugging and file system seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer