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

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

Unloading Driver in WinDbg

Hello,

My Win2K Bus Driver seems to hang the target system when it boots up. Is
there any way I can unload my driver using WinDbg, so as to enable the
target system to boot properly ?

Thanks!
Puja

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    If it is WDM, you can do the following:

    1. enable initial breakpoint in WnDbg;
    2. when it breaks in, set a breakpoint at your DriverEntry routine;
    bp MyDriver.SYS!DriverEntry
    3. when it breaks there step thru (pro'lly you do nothing there but fill in
    structs) and upon exit from it set
    EAX=0xC0000099

    That'l tell the system not to leave the driver alone for this session.

    Later, you can go to Device Manager and remove the device (or delete the
    driver)

    -----

    Alternatively, try booting in safe mode (F8 at start) and delete your SYS
    file from disk.
    (This is what I'd do first!!!)

    -----

    Ilko Dossev
    SR Sw Eng
    Intelligraphics, Inc.


    ----- Original Message -----
    From: <[email protected]>
    To: "Kernel Debugging Interest List" <[email protected]>
    Sent: Friday, May 12, 2000 6:55 PM
    Subject: [windbg] Unloading Driver in WinDbg


    > Hello,
    >
    > My Win2K Bus Driver seems to hang the target system when it boots up. Is
    > there any way I can unload my driver using WinDbg, so as to enable the
    > target system to boot properly ?
    >
    > Thanks!
    > Puja
    >
    > ---
    > You are currently subscribed to windbg as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
  • Hello,

    My driver is a Win2K driver but not WDM (I donot include "wdm.h" file
    anywhere).
    So does it mean the technique you describe below will not work for me ?

    Thanks
    Puja

    On 05/12/00, ""Ilko Dossev" " wrote:
    > If it is WDM, you can do the following:
    >
    > 1. enable initial breakpoint in WnDbg;
    > 2. when it breaks in, set a breakpoint at your DriverEntry routine;
    > bp MyDriver.SYS!DriverEntry
    > 3. when it breaks there step thru (pro'lly you do nothing there but fill in
    > structs) and upon exit from it set
    > EAX=0xC0000099
    >
    > That'l tell the system not to leave the driver alone for this session.
    >
    > Later, you can go to Device Manager and remove the device (or delete the
    > driver)
    >
    > -----
    >
    > Alternatively, try booting in safe mode (F8 at start) and delete your SYS
    > file from disk.
    > (This is what I'd do first!!!)
    >
    > -----
    >
    > Ilko Dossev
    > SR Sw Eng
    > Intelligraphics, Inc.
    >
    >
    > ----- Original Message -----
    > From:
    > To: "Kernel Debugging Interest List"
    > Sent: Friday, May 12, 2000 6:55 PM
    > Subject: [windbg] Unloading Driver in WinDbg
    >
    >
    > > Hello,
    > >
    > > My Win2K Bus Driver seems to hang the target system when it boots up. Is
    > > there any way I can unload my driver using WinDbg, so as to enable the
    > > target system to boot properly ?
    > >
    > > Thanks!
    > > Puja
    > >
    > > ---
    > > You are currently subscribed to windbg as: [email protected]
    > > To unsubscribe send a blank email to $subst('Email.Unsub')
    > >
  • Thank you much, I pressed F8 and chose the option to Boot with Last Good HW
    Profile and the system booted fine. Is this what you are referring to as
    "safe mode" or is it different ?

    Thanks a lot!
    Puja


    > Alternatively, try booting in safe mode (F8 at start) and delete your SYS
    > file from disk.
    > (This is what I'd do first!!!)
    >
    > -----
    >
    > Ilko Dossev
    > SR Sw Eng
    > Intelligraphics, Inc.
    >
    >
    > ----- Original Message -----
    > From:
    > To: "Kernel Debugging Interest List"
    > Sent: Friday, May 12, 2000 6:55 PM
    > Subject: [windbg] Unloading Driver in WinDbg
    >
    >
    > > Hello,
    > >
    > > My Win2K Bus Driver seems to hang the target system when it boots up. Is
    > > there any way I can unload my driver using WinDbg, so as to enable the
    > > target system to boot properly ?
    > >
    > > Thanks!
    > > Puja
    > >
    > > ---
    > > You are currently subscribed to windbg as: [email protected]
    > > To unsubscribe send a blank email to $subst('Email.Unsub')
    > >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    I am not absolutely certain, but pro'lly not.

    DriverEntry is *mandatory* export for WDM drivers.
    If it returns FALSE, no more processing, no more calls, no GPFs.
    (I use to do that myself, that's why I keep DriverEntry as simple as
    possible)

    Ilko



    ----- Original Message -----
    From: <[email protected]>
    To: "Kernel Debugging Interest List" <[email protected]>
    Sent: Monday, May 15, 2000 1:00 PM
    Subject: [windbg] Re: Unloading Driver in WinDbg


    > Hello,
    >
    > My driver is a Win2K driver but not WDM (I donot include "wdm.h" file
    > anywhere).
    > So does it mean the technique you describe below will not work for me ?
    >
    > Thanks
    > Puja
    >
    > On 05/12/00, ""Ilko Dossev" <[email protected]>" wrote:
    > > If it is WDM, you can do the following:
    > >
    > > 1. enable initial breakpoint in WnDbg;
    > > 2. when it breaks in, set a breakpoint at your DriverEntry routine;
    > > bp MyDriver.SYS!DriverEntry
    > > 3. when it breaks there step thru (pro'lly you do nothing there but fill
    in
    > > structs) and upon exit from it set
    > > EAX=0xC0000099
    > >
    > > That'l tell the system not to leave the driver alone for this session.
    > >
    > > Later, you can go to Device Manager and remove the device (or delete the
    > > driver)
    > >
    > > -----
    > >
    > > Alternatively, try booting in safe mode (F8 at start) and delete your
    SYS
    > > file from disk.
    > > (This is what I'd do first!!!)
    > >
    > > -----
    > >
    > > Ilko Dossev
    > > SR Sw Eng
    > > Intelligraphics, Inc.
    > >
    > >
    > > ----- Original Message -----
    > > From: <[email protected]>
    > > To: "Kernel Debugging Interest List" <[email protected]>
    > > Sent: Friday, May 12, 2000 6:55 PM
    > > Subject: [windbg] Unloading Driver in WinDbg
    > >
    > >
    > > > Hello,
    > > >
    > > > My Win2K Bus Driver seems to hang the target system when it boots up.
    Is
    > > > there any way I can unload my driver using WinDbg, so as to enable the
    > > > target system to boot properly ?
    > > >
    > > > Thanks!
    > > > Puja
    > > >
    > > > ---
    > > > You are currently subscribed to windbg as: [email protected]
    > > > To unsubscribe send a blank email to $subst('Email.Unsub')
    > > >
    >
    > ---
    > You are currently subscribed to windbg as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Absolutely. F8 tels system to avoid loading extra drivvers, only disk access
    and peripherals and VGA.
    Glad to read that you succeeded!

    Ilko :)


    ----- Original Message -----
    From: <[email protected]>
    To: "Kernel Debugging Interest List" <[email protected]>
    Sent: Monday, May 15, 2000 1:33 PM
    Subject: [windbg] Re: Unloading Driver in WinDbg


    >
    > Thank you much, I pressed F8 and chose the option to Boot with Last Good
    HW
    > Profile and the system booted fine. Is this what you are referring to as
    > "safe mode" or is it different ?
    >
    > Thanks a lot!
    > Puja
    >
    >
    > > Alternatively, try booting in safe mode (F8 at start) and delete your
    SYS
    > > file from disk.
    > > (This is what I'd do first!!!)
    > >
    > > -----
    > >
    > > Ilko Dossev
    > > SR Sw Eng
    > > Intelligraphics, Inc.
    > >
    > >
    > > ----- Original Message -----
    > > From: <[email protected]>
    > > To: "Kernel Debugging Interest List" <[email protected]>
    > > Sent: Friday, May 12, 2000 6:55 PM
    > > Subject: [windbg] Unloading Driver in WinDbg
    > >
    > >
    > > > Hello,
    > > >
    > > > My Win2K Bus Driver seems to hang the target system when it boots up.
    Is
    > > > there any way I can unload my driver using WinDbg, so as to enable the
    > > > target system to boot properly ?
    > > >
    > > > Thanks!
    > > > Puja
    > > >
    > > > ---
    > > > You are currently subscribed to windbg as: [email protected]
    > > > To unsubscribe send a blank email to $subst('Email.Unsub')
    > > >
    >
    > ---
    > You are currently subscribed to windbg as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE