How to load/unload dynamically lower filter driver under Windows 98SE

Hello all:

Does anyone have experience on loading/unloading dynamically lower filter
driver for USB device under Windows 98SE?

Now I am doing above task like the followings:

  1. Loading procedure:
    (1) Add LowerFilters value in Registry;
    (2) Call following API to stop and restart device:
    SetupDiCallClassInstaller( DIF_PROPERTYCHANGE,
    DeviceInfoSet,
    DeviceInfoData
    );
    2.Unloading procedure:
    (1) Delete LowerFilters value in Registry;
    (2) Call same API to stop and restart device.

Currently, above methods work very well under Win2k, WinXP and even WinMe,
but I have problem under Win98SE.

The problem is as follows:

  1. In loading procedure, after step (1) and (2), the device cannot take
    effect immediately. This is completely different with other OS. Therefore,
    I use API SetupDiGetDeviceInstallParams() to check status at this point. I
    found that returned Flags include DI_NEEDREBOOT, which indicates the device
    reboot needed. After continuing to execute my program, the device can be
    correctly used, even in Window Explorer.

  2. However, when I do unloading procedure, the program hangs on step (2)
    immediately after calling above API. I have to use CTRL+ALT+DEL and found
    that msgsrv32 not responding. This is the reason why my system hangs.

If you have any idea to sovle above problem, please drop me a line. I
really need your help urgently!

Thank you in advance!

Regards,
Shunnian


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com