Is scanuser.c in the latest IFS kit completed?

I am trying to understand the sample code scanuser.c in the latest beta IFS
Kit. The main thread only called FilterGetMessage() without any additional
operation such as dispatching received messages to other sub threads by
using the I/O completion port. The sub threads listen the I/O completion
port to which there is no any trigger. Is this a workable sample or just a
hint?

Regards,

Shangwu

Shangwu, why don´t you try to build and test the sample to solve your
doubts? It can be done in 5 minutes.

Thanks,
mK

-----Mensaje original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] En nombre de Shangwu
Enviado el: martes, 03 de mayo de 2005 22:47
Para: Windows File Systems Devs Interest List
Asunto: [ntfsd] Is scanuser.c in the latest IFS kit completed?

I am trying to understand the sample code scanuser.c in the latest beta IFS
Kit. The main thread only called FilterGetMessage() without any additional
operation such as dispatching received messages to other sub threads by
using the I/O completion port. The sub threads listen the I/O completion
port to which there is no any trigger. Is this a workable sample or just a
hint?

Regards,

Shangwu


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@pandasoftware.es
To unsubscribe send a blank email to xxxxx@lists.osr.com


Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Misha,

Thanks for the input. Even if it runs, the result could be totally
different. Have you tried the sample? I need use those functions to build my
own application. So I am interested in the relationship between those
functions.
It seems that several key steps are missing in the sample.

Regards,
Shangwu

“Misha Karpin” wrote in message
news:xxxxx@ntfsd…
> Shangwu, why don´t you try to build and test the sample to solve your
> doubts? It can be done in 5 minutes.
>
> Thanks,
> mK
>
> -----Mensaje original-----
> De: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] En nombre de Shangwu
> Enviado el: martes, 03 de mayo de 2005 22:47
> Para: Windows File Systems Devs Interest List
> Asunto: [ntfsd] Is scanuser.c in the latest IFS kit completed?
>
> I am trying to understand the sample code scanuser.c in the latest beta
> IFS
> Kit. The main thread only called FilterGetMessage() without any additional
> operation such as dispatching received messages to other sub threads by
> using the I/O completion port. The sub threads listen the I/O completion
> port to which there is no any trigger. Is this a workable sample or just a
> hint?
>
> Regards,
>
> Shangwu
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@pandasoftware.es
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it’s FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>

Shangwu,

The communication port is associated with a completion port in
CreateIoCompletionPort() and GetQueuedCompletionStatus() waits for pending
I/O operations to complete.

That is, when you call FltSendMessage() successfully, FilterGetMessage
completes, and the I/O system sends a completion notification packet to the
completion port. GetQueuedCompletionStatus function will retrieve this
queued completion packet.

Apart from this, the last line “free( message );” in ScannerWorker thread is
not enough to avoid memory leaking ((threadCount * requestCount) -
threadCount) SCANNER_MESSAGE buffers. I would prefer to free the memory
after WaitForMultipleObjects in main.

My last IFSKit is v3790.1414. I hope this helps to solve your doubts.

Thanks,
mK


Don’t just search. Find. Check out the new MSN Search!
http://search.msn.com/

Misha,

Thank you for the information. You are right. The completion port is
associated with the filter communication port. Probably the function
FilterGetMessage internally calls PostQueuedCompletionStatus after it
receives a message.

Regards,
Shangwu

“Misha Karpin” wrote in message
news:xxxxx@ntfsd…
> Shangwu,
>
> The communication port is associated with a completion port in
> CreateIoCompletionPort() and GetQueuedCompletionStatus() waits for pending
> I/O operations to complete.
>
> That is, when you call FltSendMessage() successfully, FilterGetMessage
> completes, and the I/O system sends a completion notification packet to
> the completion port. GetQueuedCompletionStatus function will retrieve this
> queued completion packet.
>
> Apart from this, the last line “free( message );” in ScannerWorker thread
> is not enough to avoid memory leaking ((threadCount * requestCount) -
> threadCount) SCANNER_MESSAGE buffers. I would prefer to free the memory
> after WaitForMultipleObjects in main.
>
> My last IFSKit is v3790.1414. I hope this helps to solve your doubts.
>
> Thanks,
> mK
>
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search!
> http://search.msn.com/
>
>