Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Function to find if system is fully initialized

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Hello,

Is there any function I can call in my Win2K Bus Driver, to find out if the
system has been fully initialized ?

Thanks
Puja

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Define fully initialized. Does you driver have to wait for another driver to
    load?

    Jim

    -----Original Message-----
    From: [email protected]
    [mailto:[email protected]]On Behalf Of [email protected]
    Sent: Tuesday, May 30, 2000 3:00 PM
    To: NT Developers Interest List
    Subject: [ntdev] Function to find if system is fully initialized


    Hello,

    Is there any function I can call in my Win2K Bus Driver, to find out if the
    system has been fully initialized ?

    Thanks
    Puja

    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    No my driver does NOT have to wait for another driver to load. The problem
    is that I was creating a RealTime thread in my Bus Driver (priority
    HIGH_PRIORITY),
    and everything would work fine if my driver was loaded when the system was
    up and running.

    But if the system was rebooted with my driver, then it would (appear to)
    hang at initialization time. I verified that this was because of the RT
    thread (as soon as I NOT set the priority of my thread to RT, the system
    boots fine).

    So I would like to modify my driver such that it waits for the system to
    fully initialize (I'm hoping there's some function I can call to check
    this), and then sets the priority of my thread to RT.

    Any suggestions are appreciated!

    Thanks
    Puja


    On 05/30/00, ""Jim Young" " wrote:
    > Define fully initialized. Does you driver have to wait for another driver to
    > load?
    >
    > Jim
    >
    > -----Original Message-----
    > From: [email protected]
    > [mailto:[email protected]]On Behalf Of [email protected]
    > Sent: Tuesday, May 30, 2000 3:00 PM
    > To: NT Developers Interest List
    > Subject: [ntdev] Function to find if system is fully initialized
    >
    >
    > Hello,
    >
    > Is there any function I can call in my Win2K Bus Driver, to find out if the
    > system has been fully initialized ?
    >
    > Thanks
    > Puja
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    I hope you are not setting your startup paramater for the driver to
    be boot time startup.

    You can setup the Group order for the driver so that it starts up in some
    sequence which will work fine,

    alternatively,

    if you want to change the priority of your thread after system boots up
    then you can add an I/O request in your driver which changes the priority
    of the thread and call it through an application.

    sachin

    > -----Original Message-----
    > From: [email protected] [mailto:[email protected]]
    > Sent: Monday, May 29, 2000 6:00 PM
    > To: NT Developers Interest List
    > Subject: [ntdev] RE: Function to find if system is fully initialized
    >
    >
    >
    > No my driver does NOT have to wait for another driver to
    > load. The problem
    > is that I was creating a RealTime thread in my Bus Driver (priority
    > HIGH_PRIORITY),
    > and everything would work fine if my driver was loaded when
    > the system was
    > up and running.
    >
    > But if the system was rebooted with my driver, then it would
    > (appear to)
    > hang at initialization time. I verified that this was
    > because of the RT
    > thread (as soon as I NOT set the priority of my thread to RT,
    > the system
    > boots fine).
    >
    > So I would like to modify my driver such that it waits for
    > the system to
    > fully initialize (I'm hoping there's some function I can call
    > to check
    > this), and then sets the priority of my thread to RT.
    >
    > Any suggestions are appreciated!
    >
    > Thanks
    > Puja
    >
    >
    > On 05/30/00, ""Jim Young" " wrote:
    > > Define fully initialized. Does you driver have to wait for
    > another driver to
    > > load?
    > >
    > > Jim
    > >
    > > -----Original Message-----
    > > From: [email protected]
    > > [mailto:[email protected]]On Behalf Of [email protected]
    > > Sent: Tuesday, May 30, 2000 3:00 PM
    > > To: NT Developers Interest List
    > > Subject: [ntdev] Function to find if system is fully initialized
    > >
    > >
    > > Hello,
    > >
    > > Is there any function I can call in my Win2K Bus Driver, to
    > find out if the
    > > system has been fully initialized ?
    > >
    > > Thanks
    > > Puja
    > >
    > > ---
    > > You are currently subscribed to ntdev as: [email protected]
    > > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hi Sachin,

    The "LoadOrderGroup" parameter in my INF file is set to "Extended Base".
    What are the other possible values for this and their meaning ?

    What is the "Startup" parameter you are referring to ? "StartType" in my
    case is "SERVICE_DEMAND_START".

    Basically I want my Bus to be enumerated by the PNP Manager, should this
    be done at a particular time ? If so, when ?

    Thanks
    Puja

    On 05/30/00, "Sachin Maheshwari " wrote:
    > This message is in MIME format. Since your mail reader does not understand
    > this format, some or all of this message may not be legible.
    >
    > ------_=_NextPart_001_01BFCA8E.B8BF7E6C
    > Content-Type: text/plain;
    > charset="iso-8859-1"
    >
    > I hope you are not setting your startup paramater for the driver to
    > be boot time startup.
    >
    > You can setup the Group order for the driver so that it starts up in some
    > sequence which will work fine,
    >
    > alternatively,
    >
    > if you want to change the priority of your thread after system boots up
    > then you can add an I/O request in your driver which changes the priority
    > of the thread and call it through an application.
    >
    > sachin
    >
    > > -----Original Message-----
    > > From: [email protected] [mailto:[email protected]]
    > > Sent: Monday, May 29, 2000 6:00 PM
    > > To: NT Developers Interest List
    > > Subject: [ntdev] RE: Function to find if system is fully initialized
    > >
    > >
    > >
    > > No my driver does NOT have to wait for another driver to
    > > load. The problem
    > > is that I was creating a RealTime thread in my Bus Driver (priority
    > > HIGH_PRIORITY),
    > > and everything would work fine if my driver was loaded when
    > > the system was
    > > up and running.
    > >
    > > But if the system was rebooted with my driver, then it would
    > > (appear to)
    > > hang at initialization time. I verified that this was
    > > because of the RT
    > > thread (as soon as I NOT set the priority of my thread to RT,
    > > the system
    > > boots fine).
    > >
    > > So I would like to modify my driver such that it waits for
    > > the system to
    > > fully initialize (I'm hoping there's some function I can call
    > > to check
    > > this), and then sets the priority of my thread to RT.
    > >
    > > Any suggestions are appreciated!
    > >
    > > Thanks
    > > Puja
    > >
    > >
    > > On 05/30/00, ""Jim Young" " wrote:
    > > > Define fully initialized. Does you driver have to wait for
    > > another driver to
    > > > load?
    > > >
    > > > Jim
    > > >
    > > > -----Original Message-----
    > > > From: [email protected]
    > > > [mailto:[email protected]]On Behalf Of [email protected]
    > > > Sent: Tuesday, May 30, 2000 3:00 PM
    > > > To: NT Developers Interest List
    > > > Subject: [ntdev] Function to find if system is fully initialized
    > > >
    > > >
    > > > Hello,
    > > >
    > > > Is there any function I can call in my Win2K Bus Driver, to
    > > find out if the
    > > > system has been fully initialized ?
    > > >
    > > > Thanks
    > > > Puja
    > > >
  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,752
    If you aren't a BootStart PnP driver then load order is determined by the
    undisclosed enumeration ordering of the PnP Manager, i.e. it is unspecified
    and out of your control. The rules are somewhat different for BootStart PnP
    drivers. Your driver entry routine, if I recall correctly will behave like
    an NT4 driver with respect to group, tag etc. Your AddDevice routine will
    behave like any other PnP driver: its called when the PnP Manager feels like
    it as a result of enumeration.

    Might I suggest that a small service application would be sufficient to
    inform your driver about when it would be a good time to start or activate
    your real time thread? This would guarantee that the system is operational
    enough to permit user space applications. You can simply clone the available
    C++ or C templates for service applications and build the puppy in a day or
    less. Search MSDN and you will find sample source code.

    Mark Roddy
    Windows 2000/NT Consultant
    Hollis Technology Solutions
    www.hollistech.com

    -----Original Message-----
    From: [email protected]
    [mailto:[email protected]]On Behalf Of [email protected]
    Sent: Tuesday, May 30, 2000 8:22 PM
    To: NT Developers Interest List
    Subject: [ntdev] RE: Function to find if system is fully initialized


    Hi Sachin,

    The "LoadOrderGroup" parameter in my INF file is set to "Extended Base".
    What are the other possible values for this and their meaning ?

    What is the "Startup" parameter you are referring to ? "StartType" in my
    case is "SERVICE_DEMAND_START".

    Basically I want my Bus to be enumerated by the PNP Manager, should this
    be done at a particular time ? If so, when ?

    Thanks
    Puja

    On 05/30/00, "Sachin Maheshwari <[email protected]>" wrote:
    > This message is in MIME format. Since your mail reader does not understand
    > this format, some or all of this message may not be legible.
    >
    > ------_=_NextPart_001_01BFCA8E.B8BF7E6C
    > Content-Type: text/plain;
    > charset="iso-8859-1"
    >
    > I hope you are not setting your startup paramater for the driver to
    > be boot time startup.
    >
    > You can setup the Group order for the driver so that it starts up in some
    > sequence which will work fine,
    >
    > alternatively,
    >
    > if you want to change the priority of your thread after system boots up
    > then you can add an I/O request in your driver which changes the priority
    > of the thread and call it through an application.
    >
    > sachin
    >
    > > -----Original Message-----
    > > From: [email protected] [mailto:[email protected]]
    > > Sent: Monday, May 29, 2000 6:00 PM
    > > To: NT Developers Interest List
    > > Subject: [ntdev] RE: Function to find if system is fully initialized
    > >
    > >
    > >
    > > No my driver does NOT have to wait for another driver to
    > > load. The problem
    > > is that I was creating a RealTime thread in my Bus Driver (priority
    > > HIGH_PRIORITY),
    > > and everything would work fine if my driver was loaded when
    > > the system was
    > > up and running.
    > >
    > > But if the system was rebooted with my driver, then it would
    > > (appear to)
    > > hang at initialization time. I verified that this was
    > > because of the RT
    > > thread (as soon as I NOT set the priority of my thread to RT,
    > > the system
    > > boots fine).
    > >
    > > So I would like to modify my driver such that it waits for
    > > the system to
    > > fully initialize (I'm hoping there's some function I can call
    > > to check
    > > this), and then sets the priority of my thread to RT.
    > >
    > > Any suggestions are appreciated!
    > >
    > > Thanks
    > > Puja
    > >
    > >
    > > On 05/30/00, ""Jim Young" <[email protected]>" wrote:
    > > > Define fully initialized. Does you driver have to wait for
    > > another driver to
    > > > load?
    > > >
    > > > Jim
    > > >
    > > > -----Original Message-----
    > > > From: [email protected]
    > > > [mailto:[email protected]]On Behalf Of [email protected]
    > > > Sent: Tuesday, May 30, 2000 3:00 PM
    > > > To: NT Developers Interest List
    > > > Subject: [ntdev] Function to find if system is fully initialized
    > > >
    > > >
    > > > Hello,
    > > >
    > > > Is there any function I can call in my Win2K Bus Driver, to
    > > find out if the
    > > > system has been fully initialized ?
    > > >
    > > > Thanks
    > > > Puja
    > > >

    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    > So I would like to modify my driver such that it waits for the system to
    > fully initialize (I'm hoping there's some function I can call to check
    > this), and then sets the priority of my thread to RT.

    Maybe IoRegisterDriverReinitialization can help?

    Max
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    > If you aren't a BootStart PnP driver then load order is determined by the
    > undisclosed enumeration ordering of the PnP Manager, i.e. it is
    unspecified
    > and out of your control. The rules are somewhat different for BootStart
    PnP

    IIRC it is not advisable to have any load order dependencies in the PnP
    world.
    If you have 2 drivers - A and B - then they must be designed to work OK
    regardless of their load order.
    Registering a device interface in A and a device interface arrival
    notification
    in B is a way to do this. Any inter-driver binding must be done by B in the
    device interface arrival notification routine by opening the A's device
    object
    and sending IRPs to it.
    Unbinding is done in the similar way.
    The disk stack in w2k (PartMgr and friends) uses this approach.

    If your driver has load-order dependency on other driver which is not
    yours -
    maybe this is a good idea to write a proxy driver A and register it as
    UpperFilter for the third-party driver.

    Max
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online