Windows CE: Stream Interface Driver Registry Settings

Windows CE: Stream Interface Driver Registry Settings
Created by samphung on 11/20/2010 10:54:27 PM

If you have looked at my other posts on stream interface drivers, you have seen that the registry ... 


 

If you have looked at my other posts on stream interface drivers, you have seen that the registry settings that I use for Driver Shell are:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\DriverShell]
    "Dll"="DriverShell.dll"
    "Order"=dword:4
    "Prefix"="XXX"
    "DeviceArrayIndex"=dword:1
    "IClass"="{A32942B7-920C-486b-B0E6-92A702A99B35}"

I thought that I would discuss these a little more, and includes some other settings.

Let’s start with the key HKEY_LOCAL_MACHINE\Drivers\Builtin\DriverShell. The key HKEY_LOCAL_MACHINE\Drivers\Builtin is the default key for listing drivers to be loaded by the device manager, via BusEnum (see Windows CE: Enhanced BusEnum), but like so much in Windows CE this is configurable. I don’t see a reason to change the default so I won’t go further into that. Each driver that you want to be loaded this way needs to have a unique key under Builtin, in this case the name is DriverShell.

The values under HKEY_LOCAL_MACHINE\Drivers\Builtin\DriverShell are:

Value Name







Value That I Used







Description







Dll







DriverShell.dll







The name of the driver dll file. I prefer to have drivers in the system path, but you can explicitly set the path to the dll here as well.







Order







4







This sets the order that the driver will be loaded relative to other drivers. The higher the number, the later the driver will be loaded, but if you don’t set a value it will be loaded last. If more than one driver has the same order value, then the load order is not define (or subject to change without notice anyway.)







Prefix







XXX







This is the three letter prefix used in your driver to replace the XXX_FunctionName.   In this case, I left the prefix as XXX, but I don’t recommend that for a real driver, use one that makes more sense.







IClass







{A32942B7-920C-486b-B0E6-92A702A99B35}







Defines an interface class for the driver. In this case I added IClass when I added power management to the driver (see Windows CE: Stream Interface Driver Power Management)







DeviceArrayIndex







1







This one is really specific to the driver. It identifies the hardware that it will manage.







 

Values that I did not use, but could have:

Value Name







Value That I Could have Used







Description







Index







1







This sets the value that you will use when opening the driver from your application, the n value in COMn or XXXn. If you do not explicitly set this value in the registry, then the value will be set for you based on the when the driver loads. That is the first instance loaded will be 1 and the second 2, and so on.







Flags







4







I don’t use Flags much, but I do find setting Flags to 4 can be useful for debugging, or providing optional drivers that my customers can enable later by changing the registry.

 

Possible values:

DEVFLAGS_NONE           0x00000000

-          The default value of no flags set

DEVFLAGS_UNLOAD         0x00000001

-          Tells the device manager to unload the driver after loading it and calling XXX_Init

DEVFLAGS_LOADLIBRARY    0x00000002

-          Causes the driver to be loaded with a call to LoadLibrary instead of LoadDriver

DEVFLAGS_NOLOAD         0x00000004

-          Allows you to have the registry settings, but not actually have the driver loaded. You can use this to keep the driver from loading until you call ActivateDeviceEx() you can set this flag, but you must clear it before calling ActivateDeviceEx()     

DEVFLAGS_NAKEDENTRIES   0x00000008

-          Use this flag If you want to leave the prefix off of the driver functions

DEVFLAGS_BOOTPHASE_1    0x00001000

-          Use this flag for drivers that must be loaded to load the hive registry

DEVFLAGS_IRQ_EXCLUSIVE        0x00000100

-          This flag prevents drivers from loading if they will share an IRQ







 

This is certainly not an exhaustive list of registry settings, but it should be enough to get you started.

------------------------------------------------------------------------------------------------------------------------------

Note:  This article is written by Bruce Eitman, and is posted to the Embedded101 site with Bruce’s permission.



Copyright © 2010 – Bruce Eitman – All Rights Reserved



http://geekswithblogs.net/BruceEitman/

Embedded101 Articles

Click to Expand/Collapse Groups
Skip Navigation Links.
Collapse Windows Embedded Compact (CE)Windows Embedded Compact (CE)
Collapse Compact 7Compact 7
Build A Windows Network Projector wi...
Filter Device Drivers
Asynchronous I/O request support
Configure Flash Storage to Launch Co...
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse CE 6.0CE 6.0
Stream Driver with CEDriverWiz rev 0...
Connecting Visual Studio IDE to CE 6...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Enhanced BusEnum
Windows CE: Soft Reset
Windows CE: Reading a String from th...
Windows CE: Displaying Disk Informa...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Hive-Based Registry for CE 6.0
AutoLaunch for CE 6.0
Configure Flash Storage to Launch Co...
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse CE 5.0CE 5.0
Configure Flash Storage to Launch Co...
Collapse Platform Builder & OS DesignPlatform Builder & OS Design
Platform Builder: Automatically Flus...
Windows CE: Enhanced BusEnum
Windows CE: Soft Reset
Windows CE: Displaying Disk Informa...
Build A Windows Network Projector wi...
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse BSP, OAL & BootloaderBSP, OAL & Bootloader
Windows CE 6.0: User Mode KernelIoC...
Windows CE: Displaying Disk Informa...
Collapse RegistryRegistry
Platform Builder: Automatically Flus...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Reading a String from th...
Hive-Based Registry for CE 6.0
Collapse Device DriverDevice Driver
Stream Driver with CEDriverWiz rev 0...
Windows CE: Stream Interface Driver...
Windows CE: Enhanced BusEnum
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
Collapse File SystemFile System
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Collapse Application DevelopmentApplication Development
Connecting Visual Studio IDE to CE 6...
Windows CE: Persisting Registry Chan...
Windows CE: Reading a String from th...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
AutoLaunch for CE 6.0
Windows CE: Stream Interface Driver ...
IBW & ICE
Stream Driver with CEDriverWiz rev 0...
Connecting Visual Studio IDE to CE 6...
Platform Builder: Automatically Flus...
Windows CE: Save and Restore the Re...
Windows CE: Stream Interface Driver...
Windows CE: Persisting Registry Chan...
Windows CE: Enhanced BusEnum
Windows CE: Reading a String from th...
Windows CE: Displaying Disk Informa...
Windows CE: Formatting TFAT
Windows CE: C# Application to Format...
Build A Windows Network Projector wi...
Hive-Based Registry for CE 6.0
AutoLaunch for CE 6.0
Hello all
Filter Device Drivers
Asynchronous I/O request support
Configure Flash Storage to Launch Co...
CEDriverWiz Version 2.00 User Manual
CEDriverWiz V2.00: About this releas...
Installing CEDriverWiz for Visual St...
CEDriverWiz Version 2.00: An Example
CEDriverWiz Version 2.00: Using the ...
Collapse Windows Embedded StandardWindows Embedded Standard
WES7
WES-2009
Windows XP Embedded
Target Designer
Enhanced Write Filter
Collapse NET Compact FrameworkNET Compact Framework
Windows CE: C# Application to Format...
Windows Phone 7
Misc.
Turkish porno izle video site in rokettubeporno izle