I want to use Loadfilter to load a minifilter from user space.
I want to configure the filter before it begins operation (i.e. before
FltStartFiltering)

I plan to use the FltCreateCommunicationPort and
FilterConnectCommunicationPort and FilterSendMessage to pass in the config
info.

My question (s)
* When I return from DriverEntry without calling FltStartFiltering but
instead call IoRegisterDriverReinitialization then return an OK status from
DriverEntry, when does the reinit-routine get called?

And if I finally get all that working:

* Can I issue the FltStartFiltering call from a CommPort Message
callback ???

Gak -
Finecats

Re: Load Filter synchronous question by Doron

Doron
Mon Aug 27 18:59:21 CDT 2007

if the system is already initialized, i don't think your reinit routine is
called at all.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"usfinecats" <usfinecats@nospam.nospam> wrote in message
news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
>I want to use Loadfilter to load a minifilter from user space.
> I want to configure the filter before it begins operation (i.e. before
> FltStartFiltering)
>
> I plan to use the FltCreateCommunicationPort and
> FilterConnectCommunicationPort and FilterSendMessage to pass in the config
> info.
>
> My question (s)
> * When I return from DriverEntry without calling FltStartFiltering but
> instead call IoRegisterDriverReinitialization then return an OK status
> from
> DriverEntry, when does the reinit-routine get called?
>
> And if I finally get all that working:
>
> * Can I issue the FltStartFiltering call from a CommPort Message
> callback ???
>
> Gak -
> Finecats


RE: Load Filter synchronous question by usfinecats

usfinecats
Mon Aug 27 22:20:02 CDT 2007

I read the 1st sentence to mean indicate that you need to return
STATUS_SUCCESS otherwise you won't get a call to the reinit routine.
--
Gak -
Finecats


"usfinecats" wrote:

> I want to use Loadfilter to load a minifilter from user space.
> I want to configure the filter before it begins operation (i.e. before
> FltStartFiltering)
>
> I plan to use the FltCreateCommunicationPort and
> FilterConnectCommunicationPort and FilterSendMessage to pass in the config
> info.
>
> My question (s)
> * When I return from DriverEntry without calling FltStartFiltering but
> instead call IoRegisterDriverReinitialization then return an OK status from
> DriverEntry, when does the reinit-routine get called?
>
> And if I finally get all that working:
>
> * Can I issue the FltStartFiltering call from a CommPort Message
> callback ???
>
> Gak -
> Finecats

Re: Load Filter synchronous question by usfinecats

usfinecats
Wed Aug 29 11:32:09 CDT 2007

Doron,
Since Microsoft has the source code for the kernel, and I don't and since
the documentation is sufficiently sketchy that these questions can arise, and
since there are no examples of how to use this call and no guidelines I
think you as a representative of MICROSOFT have a responsibility to take a
look at the question, do some homework and come up with something that is a
definitive answer or at least a rebuke as to why this is a stupid question.


I do not think a hip shot is appropriate.
--
Gak -
Finecats


"Doron Holan [MSFT]" wrote:

> if the system is already initialized, i don't think your reinit routine is
> called at all.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "usfinecats" <usfinecats@nospam.nospam> wrote in message
> news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
> >I want to use Loadfilter to load a minifilter from user space.
> > I want to configure the filter before it begins operation (i.e. before
> > FltStartFiltering)
> >
> > I plan to use the FltCreateCommunicationPort and
> > FilterConnectCommunicationPort and FilterSendMessage to pass in the config
> > info.
> >
> > My question (s)
> > * When I return from DriverEntry without calling FltStartFiltering but
> > instead call IoRegisterDriverReinitialization then return an OK status
> > from
> > DriverEntry, when does the reinit-routine get called?
> >
> > And if I finally get all that working:
> >
> > * Can I issue the FltStartFiltering call from a CommPort Message
> > callback ???
> >
> > Gak -
> > Finecats
>
>

Re: Load Filter synchronous question by Doron

Doron
Wed Aug 29 16:53:07 CDT 2007

what? i have no idea where you coming from that i am being sarcastic or
short. i gave you the information i had off the top of my head. whatever.
anyways, after the system as has started the init routine you register will
be called immediately after DriverEntry has returned back to the io manager

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"usfinecats" <usfinecats@nospam.nospam> wrote in message
news:656A3407-E843-40BB-8A26-DE4FD958B846@microsoft.com...
> Doron,
> Since Microsoft has the source code for the kernel, and I don't and since
> the documentation is sufficiently sketchy that these questions can arise,
> and
> since there are no examples of how to use this call and no guidelines I
> think you as a representative of MICROSOFT have a responsibility to take a
> look at the question, do some homework and come up with something that is
> a
> definitive answer or at least a rebuke as to why this is a stupid
> question.
>
>
> I do not think a hip shot is appropriate.
> --
> Gak -
> Finecats
>
>
> "Doron Holan [MSFT]" wrote:
>
>> if the system is already initialized, i don't think your reinit routine
>> is
>> called at all.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "usfinecats" <usfinecats@nospam.nospam> wrote in message
>> news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
>> >I want to use Loadfilter to load a minifilter from user space.
>> > I want to configure the filter before it begins operation (i.e. before
>> > FltStartFiltering)
>> >
>> > I plan to use the FltCreateCommunicationPort and
>> > FilterConnectCommunicationPort and FilterSendMessage to pass in the
>> > config
>> > info.
>> >
>> > My question (s)
>> > * When I return from DriverEntry without calling FltStartFiltering
>> > but
>> > instead call IoRegisterDriverReinitialization then return an OK status
>> > from
>> > DriverEntry, when does the reinit-routine get called?
>> >
>> > And if I finally get all that working:
>> >
>> > * Can I issue the FltStartFiltering call from a CommPort Message
>> > callback ???
>> >
>> > Gak -
>> > Finecats
>>
>>


Re: Load Filter synchronous question by Paul

Paul
Thu Aug 30 08:57:39 PDT 2007

you should re-read his comment

it was not a hipshot or sarcastic .... re-init wont fire in the model you
described in your original post.


"usfinecats" <usfinecats@nospam.nospam> wrote in message
news:656A3407-E843-40BB-8A26-DE4FD958B846@microsoft.com...
> Doron,
> Since Microsoft has the source code for the kernel, and I don't and since
> the documentation is sufficiently sketchy that these questions can arise,
> and
> since there are no examples of how to use this call and no guidelines I
> think you as a representative of MICROSOFT have a responsibility to take a
> look at the question, do some homework and come up with something that is
> a
> definitive answer or at least a rebuke as to why this is a stupid
> question.
>
>
> I do not think a hip shot is appropriate.
> --
> Gak -
> Finecats
>
>
> "Doron Holan [MSFT]" wrote:
>
>> if the system is already initialized, i don't think your reinit routine
>> is
>> called at all.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "usfinecats" <usfinecats@nospam.nospam> wrote in message
>> news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
>> >I want to use Loadfilter to load a minifilter from user space.
>> > I want to configure the filter before it begins operation (i.e. before
>> > FltStartFiltering)
>> >
>> > I plan to use the FltCreateCommunicationPort and
>> > FilterConnectCommunicationPort and FilterSendMessage to pass in the
>> > config
>> > info.
>> >
>> > My question (s)
>> > * When I return from DriverEntry without calling FltStartFiltering
>> > but
>> > instead call IoRegisterDriverReinitialization then return an OK status
>> > from
>> > DriverEntry, when does the reinit-routine get called?
>> >
>> > And if I finally get all that working:
>> >
>> > * Can I issue the FltStartFiltering call from a CommPort Message
>> > callback ???
>> >
>> > Gak -
>> > Finecats
>>
>>


Re: Load Filter synchronous question by usfinecats

usfinecats
Thu Aug 30 10:32:00 PDT 2007

Doron,

I apologize for what appeared to be a slam.

In the documentation for IoRegisterDriverReinitialization it says:

Comments
A driver can call this routine only if its DriverEntry routine will return
STATUS_SUCCESS.

So I assume that means you need to return from DriverEntry with
STATUS_SUCCESS inorder to allow this mechanism to WORK AT ALL. If that is
incorrect, please let me know.

Let me rephrase my question: I want to load the Driver dynamically and
setup Filter Comm ports before I call FltStartFiltering. Once the ports are
up the driver needs to be configured by the same user that called
FilterLoad().

So my plan was to call FltCreateCommunicationPort() in DriverEntry. Then I
need to allow the user mode to connect, and send some messages to complete
the configuration

IoRegisterDriverReinitialization() seems like a candidate way to do this if
there is enough time between when FilterLoad returning and the users ability
to set up the ports and the configuration. (or a clear way to delay the
calls, or just call the routine over and over until it is configured?, etc)

Once the configuration is complete, then it will be ok to call
FltStartFiltering .

Is this a correct approach or can you suggest an alternative?

Thanks





--
Gak -
Finecats


"Doron Holan [MSFT]" wrote:

> what? i have no idea where you coming from that i am being sarcastic or
> short. i gave you the information i had off the top of my head. whatever.
> anyways, after the system as has started the init routine you register will
> be called immediately after DriverEntry has returned back to the io manager
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "usfinecats" <usfinecats@nospam.nospam> wrote in message
> news:656A3407-E843-40BB-8A26-DE4FD958B846@microsoft.com...
> > Doron,
> > Since Microsoft has the source code for the kernel, and I don't and since
> > the documentation is sufficiently sketchy that these questions can arise,
> > and
> > since there are no examples of how to use this call and no guidelines I
> > think you as a representative of MICROSOFT have a responsibility to take a
> > look at the question, do some homework and come up with something that is
> > a
> > definitive answer or at least a rebuke as to why this is a stupid
> > question.
> >
> >
> > I do not think a hip shot is appropriate.
> > --
> > Gak -
> > Finecats
> >
> >
> > "Doron Holan [MSFT]" wrote:
> >
> >> if the system is already initialized, i don't think your reinit routine
> >> is
> >> called at all.
> >>
> >> d
> >>
> >> --
> >> Please do not send e-mail directly to this alias. this alias is for
> >> newsgroup purposes only.
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "usfinecats" <usfinecats@nospam.nospam> wrote in message
> >> news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
> >> >I want to use Loadfilter to load a minifilter from user space.
> >> > I want to configure the filter before it begins operation (i.e. before
> >> > FltStartFiltering)
> >> >
> >> > I plan to use the FltCreateCommunicationPort and
> >> > FilterConnectCommunicationPort and FilterSendMessage to pass in the
> >> > config
> >> > info.
> >> >
> >> > My question (s)
> >> > * When I return from DriverEntry without calling FltStartFiltering
> >> > but
> >> > instead call IoRegisterDriverReinitialization then return an OK status
> >> > from
> >> > DriverEntry, when does the reinit-routine get called?
> >> >
> >> > And if I finally get all that working:
> >> >
> >> > * Can I issue the FltStartFiltering call from a CommPort Message
> >> > callback ???
> >> >
> >> > Gak -
> >> > Finecats
> >>
> >>
>
>

Re: Load Filter synchronous question by Doron

Doron
Thu Aug 30 10:48:34 PDT 2007

I am not familiar enough with the FS filter manager to give you a clear
answer. Certainly you need to return STATUS_SUCCESS from DriverEntry for
the reinit routine to be called. it appears to me that you can delay
calling FltStartFiltering until after DriverEntry but i would make your
driver resilient to never having its communications port connected (e.g.
relying on a um application to function properly).

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"usfinecats" <usfinecats@nospam.nospam> wrote in message
news:564E2995-4DFE-40CE-9C0D-3EC2138D3151@microsoft.com...
> Doron,
>
> I apologize for what appeared to be a slam.
>
> In the documentation for IoRegisterDriverReinitialization it says:
>
> Comments
> A driver can call this routine only if its DriverEntry routine will return
> STATUS_SUCCESS.
>
> So I assume that means you need to return from DriverEntry with
> STATUS_SUCCESS inorder to allow this mechanism to WORK AT ALL. If that
> is
> incorrect, please let me know.
>
> Let me rephrase my question: I want to load the Driver dynamically and
> setup Filter Comm ports before I call FltStartFiltering. Once the ports
> are
> up the driver needs to be configured by the same user that called
> FilterLoad().
>
> So my plan was to call FltCreateCommunicationPort() in DriverEntry. Then
> I
> need to allow the user mode to connect, and send some messages to complete
> the configuration
>
> IoRegisterDriverReinitialization() seems like a candidate way to do this
> if
> there is enough time between when FilterLoad returning and the users
> ability
> to set up the ports and the configuration. (or a clear way to delay the
> calls, or just call the routine over and over until it is configured?,
> etc)
>
> Once the configuration is complete, then it will be ok to call
> FltStartFiltering .
>
> Is this a correct approach or can you suggest an alternative?
>
> Thanks
>
>
>
>
>
> --
> Gak -
> Finecats
>
>
> "Doron Holan [MSFT]" wrote:
>
>> what? i have no idea where you coming from that i am being sarcastic or
>> short. i gave you the information i had off the top of my head.
>> whatever.
>> anyways, after the system as has started the init routine you register
>> will
>> be called immediately after DriverEntry has returned back to the io
>> manager
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "usfinecats" <usfinecats@nospam.nospam> wrote in message
>> news:656A3407-E843-40BB-8A26-DE4FD958B846@microsoft.com...
>> > Doron,
>> > Since Microsoft has the source code for the kernel, and I don't and
>> > since
>> > the documentation is sufficiently sketchy that these questions can
>> > arise,
>> > and
>> > since there are no examples of how to use this call and no guidelines I
>> > think you as a representative of MICROSOFT have a responsibility to
>> > take a
>> > look at the question, do some homework and come up with something that
>> > is
>> > a
>> > definitive answer or at least a rebuke as to why this is a stupid
>> > question.
>> >
>> >
>> > I do not think a hip shot is appropriate.
>> > --
>> > Gak -
>> > Finecats
>> >
>> >
>> > "Doron Holan [MSFT]" wrote:
>> >
>> >> if the system is already initialized, i don't think your reinit
>> >> routine
>> >> is
>> >> called at all.
>> >>
>> >> d
>> >>
>> >> --
>> >> Please do not send e-mail directly to this alias. this alias is for
>> >> newsgroup purposes only.
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >>
>> >>
>> >> "usfinecats" <usfinecats@nospam.nospam> wrote in message
>> >> news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
>> >> >I want to use Loadfilter to load a minifilter from user space.
>> >> > I want to configure the filter before it begins operation (i.e.
>> >> > before
>> >> > FltStartFiltering)
>> >> >
>> >> > I plan to use the FltCreateCommunicationPort and
>> >> > FilterConnectCommunicationPort and FilterSendMessage to pass in the
>> >> > config
>> >> > info.
>> >> >
>> >> > My question (s)
>> >> > * When I return from DriverEntry without calling
>> >> > FltStartFiltering
>> >> > but
>> >> > instead call IoRegisterDriverReinitialization then return an OK
>> >> > status
>> >> > from
>> >> > DriverEntry, when does the reinit-routine get called?
>> >> >
>> >> > And if I finally get all that working:
>> >> >
>> >> > * Can I issue the FltStartFiltering call from a CommPort
>> >> > Message
>> >> > callback ???
>> >> >
>> >> > Gak -
>> >> > Finecats
>> >>
>> >>
>>
>>


Re: Load Filter synchronous question by Maxim

Maxim
Thu Aug 30 13:32:11 PDT 2007

Usually, IoRegisterDriverReinitialization is for boot drivers only, to get
them the 2nd init chance at a later stage where the \SystemRoot filesystem is
accessible.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"usfinecats" <usfinecats@nospam.nospam> wrote in message
news:564E2995-4DFE-40CE-9C0D-3EC2138D3151@microsoft.com...
> Doron,
>
> I apologize for what appeared to be a slam.
>
> In the documentation for IoRegisterDriverReinitialization it says:
>
> Comments
> A driver can call this routine only if its DriverEntry routine will return
> STATUS_SUCCESS.
>
> So I assume that means you need to return from DriverEntry with
> STATUS_SUCCESS inorder to allow this mechanism to WORK AT ALL. If that is
> incorrect, please let me know.
>
> Let me rephrase my question: I want to load the Driver dynamically and
> setup Filter Comm ports before I call FltStartFiltering. Once the ports are
> up the driver needs to be configured by the same user that called
> FilterLoad().
>
> So my plan was to call FltCreateCommunicationPort() in DriverEntry. Then I
> need to allow the user mode to connect, and send some messages to complete
> the configuration
>
> IoRegisterDriverReinitialization() seems like a candidate way to do this if
> there is enough time between when FilterLoad returning and the users ability
> to set up the ports and the configuration. (or a clear way to delay the
> calls, or just call the routine over and over until it is configured?, etc)
>
> Once the configuration is complete, then it will be ok to call
> FltStartFiltering .
>
> Is this a correct approach or can you suggest an alternative?
>
> Thanks
>
>
>
>
>
> --
> Gak -
> Finecats
>
>
> "Doron Holan [MSFT]" wrote:
>
> > what? i have no idea where you coming from that i am being sarcastic or
> > short. i gave you the information i had off the top of my head. whatever.
> > anyways, after the system as has started the init routine you register will
> > be called immediately after DriverEntry has returned back to the io manager
> >
> > d
> >
> > --
> > Please do not send e-mail directly to this alias. this alias is for
> > newsgroup purposes only.
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
> > "usfinecats" <usfinecats@nospam.nospam> wrote in message
> > news:656A3407-E843-40BB-8A26-DE4FD958B846@microsoft.com...
> > > Doron,
> > > Since Microsoft has the source code for the kernel, and I don't and
since
> > > the documentation is sufficiently sketchy that these questions can arise,
> > > and
> > > since there are no examples of how to use this call and no guidelines I
> > > think you as a representative of MICROSOFT have a responsibility to take
a
> > > look at the question, do some homework and come up with something that is
> > > a
> > > definitive answer or at least a rebuke as to why this is a stupid
> > > question.
> > >
> > >
> > > I do not think a hip shot is appropriate.
> > > --
> > > Gak -
> > > Finecats
> > >
> > >
> > > "Doron Holan [MSFT]" wrote:
> > >
> > >> if the system is already initialized, i don't think your reinit routine
> > >> is
> > >> called at all.
> > >>
> > >> d
> > >>
> > >> --
> > >> Please do not send e-mail directly to this alias. this alias is for
> > >> newsgroup purposes only.
> > >> This posting is provided "AS IS" with no warranties, and confers no
> > >> rights.
> > >>
> > >>
> > >> "usfinecats" <usfinecats@nospam.nospam> wrote in message
> > >> news:44C63744-C38E-427B-B367-8BAD30E57286@microsoft.com...
> > >> >I want to use Loadfilter to load a minifilter from user space.
> > >> > I want to configure the filter before it begins operation (i.e. before
> > >> > FltStartFiltering)
> > >> >
> > >> > I plan to use the FltCreateCommunicationPort and
> > >> > FilterConnectCommunicationPort and FilterSendMessage to pass in the
> > >> > config
> > >> > info.
> > >> >
> > >> > My question (s)
> > >> > * When I return from DriverEntry without calling FltStartFiltering
> > >> > but
> > >> > instead call IoRegisterDriverReinitialization then return an OK status
> > >> > from
> > >> > DriverEntry, when does the reinit-routine get called?
> > >> >
> > >> > And if I finally get all that working:
> > >> >
> > >> > * Can I issue the FltStartFiltering call from a CommPort Message
> > >> > callback ???
> > >> >
> > >> > Gak -
> > >> > Finecats
> > >>
> > >>
> >
> >