Upper filter driver for parallel port class driver not loading

Discussion in 'Windows Vista Drivers' started by Rafael Ottmann, Jun 23, 2005.

  1. Hi,

    I´ve written a filter driver for the parallel class driver. But it never
    gets loaded by WinXP (DriverEntry is not called at all).

    I´m using the following ini file to install it:

    [Version]
    signature = "$Windows NT$"
    Class=Ports
    ; Distribution Media information
    ;
    [SourceDisksNames]
    1 = %ClasFilt.MediaDesc%

    [SourceDisksFiles]
    bemafilt.sys = 1

    [DestinationDirs]
    DefaultDestDir = 12 ; DIRID_DRIVERS

    [DefaultInstall.NT]
    CopyFiles = @bemafilt.sys
    AddReg = ClassFilter_AddReg

    [ClassFilter_AddReg]
    HKLM,
    System\CurrentControlSet\Control\Class\{811FC6A5-F728-11D0-A537-0000F8753ED1},UpperFilters,0x00010008,Bemafilter

    [DefaultInstall.NT.Services]
    AddService = Bemafilter, , clasfilt_Service_Inst, clasfilt_EventLog_Inst


    [clasfilt_Service_Inst]
    DisplayName = %ClasFilt.SvcDesc%
    ServiceType = %SERVICE_KERNEL_DRIVER%
    StartType = %SERVICE_DEMAND_START%
    ErrorControl = %SERVICE_ERROR_IGNORE%
    ServiceBinary = %12%\bemafilt.sys ;change clasfilt.sys to the name of your
    driver binary.

    [clasfilt_EventLog_Inst]
    AddReg = clasfilt_EventLog_AddReg

    [clasfilt_EventLog_AddReg]
    HKR,,EventMessageFile,
    %REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\bemafilt.sys"
    HKR,,TypesSupported, %REG_DWORD%, 7

    [Strings]
    ClasFilt.SvcDesc = "Bem Filter Driver"
    ClasFilt.MediaDesc = "Bem Class Filter"


    ; Useful constants
    SERVICE_KERNEL_DRIVER = 1
    SERVICE_DEMAND_START = 3
    SERVICE_ERROR_IGNORE = 0
    REG_EXPAND_SZ = 0x00020000
    REG_DWORD = 0x00010001

    I´ve taken the parallel port GUID (GUID_PARCLASS_DEVICE) from ntddpar.h
    The ini is successfully installed (right clicking - install); I have checked
    the registry many times for confirmation. Seems OK.

    The driver should get loaded by the OS at boot time, correct? Any clues?

    Thanks in advance
    Rafael
     
    Rafael Ottmann, Jun 23, 2005
    #1
    1. Advertisements

  2. GUID_PARCLASS_DEVICE is an interface guid for parallel port and its devices.

    What you need is a setup class guid - GUID_DEVCLASS_PORTS. HOwever, this
    setup class is common for com ports and parallel ports. So if you install a
    class filter, it will get loaded for com port devices also. I don't know
    what your objective is in writing a filter for paraport, but whatever it may
    be, you should consider using your filter as a device filter by installing
    on the device node
    (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0401).


    -Eliyas
    This posting is provided "AS IS" with no warranties, and confers no rights.
    http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx
     
    Eliyas Yakub [MSFT], Jun 24, 2005
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.