Thursday, May 26, 2011

Windows CE LoadDriver

A while ago I developed a small tool to help develop drivers for Windows CE. The tool is a command line application that can dynamically load and unload drivers, and lets the user specify a number of options using command line switches.

To give you an idea about what the tool can do, here is the help output:

Windows CE LoadDriver 0.2 (Compile time: Oct 30 2009 06:53:06)
Copyright (C) 2009 by Bogong (www.bogong.dk)

Options:

 -l <regkey>           Load driver with registry key <regkey>
 -ld <dll>             Load specified DLL (also requires -p)
 -u <id>               Unload driver with handle ID <id>
 -i                    List drivers and their handle IDs
 -f <flags>            Set flags value (overrides registry if exists)
 -p <prefix>           Set prefix value (overrides registry if exists)
 -o <order>            Set order value (overrides registry if exists)
 -n <index>            Set index value (overrides registry if exists)
 -c <name>=<value>     Create custom registry key (overrides registry if exists)
                       Use dword:<num> as value to create a dword. Default is string
 -h                    This help

Examples:

 To load a driver with settings already specified in registry
 HKLM\Drivers\BuiltIn\Serial1, use:

    loaddriver -l Serial1

 To load a custom driver with no settings in registry you must
 specify everything on the command line, e.g.:

    loaddriver -ld serial.dll -p COM -n 4 -c TxBufferSize=dword:1024

The tool is hosted at bogong.codeplex.com where both a binary version (for ARM) and the source is available for download. You can also find a little more details about the tool at codeplex.

Let me know if you find the tool useful!

0 comments:

Post a Comment