FltSendMessage() timeout

Hello to everybody,

I’m writing a simple minifilter driver which intercepts IRP_MJ_CREATE to files
with specific reparse point tags and sends this information to a user-space
application.

I’m using the Filter Manager API FltSendMessage() to communicate with
user-space but I have a little problem with the timeout parameter. The OS is
Windows XP Service Pack 2.

The code looks roughly like this:

LARGE_INTEGER Timeout;

Timeout.QuadPart = (LONGLONG)seconds_to_wait * 10 * 1000 * 1000;

FltSendMessage(FilterHandle, ClientPort, Message, MessageLength, Reply,
ReplyLenght, &Timeout);

The problem is that FltSendMessage() returns STATUS_TIMEOUT immediatelly
regardless of the value of the Timeout variable. I even tried with larger
values, but the result is always the same - FltSendMessage() returns with
STATUS_TIMEOUT strightaway.

The problem here is that I must wait for a reply from user-space, or a
timeout, in which case I must fail the operation.

On the other side, if I pass a NULL pointer as the timeout, FltSendMessage()
blocks indefinitely just as documented.

I’m not sure if I’m doing something wrong or if this is a bug in
FltSendMessage(), but any help on this issue would be really appreciated.

Thank you in advance.

Regards,
Mitja Horvat

Relative times should be negative. Try this:

Timeout.QuadPart = -((LONGLONG)seconds_to_wait * 10 * 1000 * 1000);

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mitja Horvat
Sent: Wednesday, February 09, 2005 9:32 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltSendMessage() timeout

Hello to everybody,

I’m writing a simple minifilter driver which intercepts IRP_MJ_CREATE to
files
with specific reparse point tags and sends this information to a user-space
application.

I’m using the Filter Manager API FltSendMessage() to communicate with
user-space but I have a little problem with the timeout parameter. The OS is

Windows XP Service Pack 2.

The code looks roughly like this:

LARGE_INTEGER Timeout;

Timeout.QuadPart = (LONGLONG)seconds_to_wait * 10 * 1000 * 1000;

FltSendMessage(FilterHandle, ClientPort, Message, MessageLength, Reply,
ReplyLenght, &Timeout);

The problem is that FltSendMessage() returns STATUS_TIMEOUT immediatelly
regardless of the value of the Timeout variable. I even tried with larger
values, but the result is always the same - FltSendMessage() returns with
STATUS_TIMEOUT strightaway.

The problem here is that I must wait for a reply from user-space, or a
timeout, in which case I must fail the operation.

On the other side, if I pass a NULL pointer as the timeout, FltSendMessage()

blocks indefinitely just as documented.

I’m not sure if I’m doing something wrong or if this is a bug in
FltSendMessage(), but any help on this issue would be really appreciated.

Thank you in advance.

Regards,
Mitja Horvat


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

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

Ken,

you were correct. FltSendMessage() now works as expected.

Thank you VERY much!

Rergards,
Mitja Horvat

On Wednesday 09 of February 2005 15:41, Ken Cross wrote:

Relative times should be negative. Try this:

Timeout.QuadPart = -((LONGLONG)seconds_to_wait * 10 * 1000 * 1000);

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mitja Horvat
Sent: Wednesday, February 09, 2005 9:32 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltSendMessage() timeout

Hello to everybody,

I’m writing a simple minifilter driver which intercepts IRP_MJ_CREATE to
files
with specific reparse point tags and sends this information to a user-space
application.

I’m using the Filter Manager API FltSendMessage() to communicate with
user-space but I have a little problem with the timeout parameter. The OS
is

Windows XP Service Pack 2.

The code looks roughly like this:

LARGE_INTEGER Timeout;

Timeout.QuadPart = (LONGLONG)seconds_to_wait * 10 * 1000 * 1000;

FltSendMessage(FilterHandle, ClientPort, Message, MessageLength, Reply,
ReplyLenght, &Timeout);

The problem is that FltSendMessage() returns STATUS_TIMEOUT immediatelly
regardless of the value of the Timeout variable. I even tried with larger
values, but the result is always the same - FltSendMessage() returns with
STATUS_TIMEOUT strightaway.

The problem here is that I must wait for a reply from user-space, or a
timeout, in which case I must fail the operation.

On the other side, if I pass a NULL pointer as the timeout,
FltSendMessage()

blocks indefinitely just as documented.

I’m not sure if I’m doing something wrong or if this is a bug in
FltSendMessage(), but any help on this issue would be really appreciated.

Thank you in advance.

Regards,
Mitja Horvat


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

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


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

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

Hi,

A positive value specifies an absolute time, relative to January 1, 1601. A
negative value specifies an interval relative to the current time. Absolute
expiration times track any changes in the system time; relative expiration
times are not affected by system time changes.

mK.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mitja Horvat
Sent: Wednesday, February 09, 2005 3:32 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltSendMessage() timeout

Hello to everybody,

I’m writing a simple minifilter driver which intercepts IRP_MJ_CREATE to
files with specific reparse point tags and sends this information to a
user-space application.

I’m using the Filter Manager API FltSendMessage() to communicate with
user-space but I have a little problem with the timeout parameter. The OS is
Windows XP Service Pack 2.

The code looks roughly like this:

LARGE_INTEGER Timeout;

Timeout.QuadPart = (LONGLONG)seconds_to_wait * 10 * 1000 * 1000;

FltSendMessage(FilterHandle, ClientPort, Message, MessageLength, Reply,
ReplyLenght, &Timeout);

The problem is that FltSendMessage() returns STATUS_TIMEOUT immediatelly
regardless of the value of the Timeout variable. I even tried with larger
values, but the result is always the same - FltSendMessage() returns with
STATUS_TIMEOUT strightaway.

The problem here is that I must wait for a reply from user-space, or a
timeout, in which case I must fail the operation.

On the other side, if I pass a NULL pointer as the timeout, FltSendMessage()
blocks indefinitely just as documented.

I’m not sure if I’m doing something wrong or if this is a bug in
FltSendMessage(), but any help on this issue would be really appreciated.

Thank you in advance.

Regards,
Mitja Horvat


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/

Hi Misha,

I somehow suspected something like that when Ken Cross told me to use a
negative value. I guess I should read the documentation more carefully next
time.

Anyway, thank you very much for your answer. The help on this list is really
appreciated.

Regards,
Mitja Horvat

On Wednesday 09 of February 2005 16:27, Misha Karpin wrote:

Hi,

A positive value specifies an absolute time, relative to January 1, 1601. A
negative value specifies an interval relative to the current time. Absolute
expiration times track any changes in the system time; relative expiration
times are not affected by system time changes.

mK.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mitja Horvat
Sent: Wednesday, February 09, 2005 3:32 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltSendMessage() timeout

Hello to everybody,

I’m writing a simple minifilter driver which intercepts IRP_MJ_CREATE to
files with specific reparse point tags and sends this information to a
user-space application.

I’m using the Filter Manager API FltSendMessage() to communicate with
user-space but I have a little problem with the timeout parameter. The OS
is Windows XP Service Pack 2.

The code looks roughly like this:

LARGE_INTEGER Timeout;

Timeout.QuadPart = (LONGLONG)seconds_to_wait * 10 * 1000 * 1000;

FltSendMessage(FilterHandle, ClientPort, Message, MessageLength, Reply,
ReplyLenght, &Timeout);

The problem is that FltSendMessage() returns STATUS_TIMEOUT immediatelly
regardless of the value of the Timeout variable. I even tried with larger
values, but the result is always the same - FltSendMessage() returns with
STATUS_TIMEOUT strightaway.

The problem here is that I must wait for a reply from user-space, or a
timeout, in which case I must fail the operation.

On the other side, if I pass a NULL pointer as the timeout,
FltSendMessage() blocks indefinitely just as documented.

I’m not sure if I’m doing something wrong or if this is a bug in
FltSendMessage(), but any help on this issue would be really appreciated.

Thank you in advance.

Regards,
Mitja Horvat


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/


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

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