顯示具有 windows driver 標籤的文章。 顯示所有文章
顯示具有 windows driver 標籤的文章。 顯示所有文章

2009年9月23日 星期三

driver extension

mac: .kext

linux: .ko

windows: .sys

2009年9月21日 星期一

GUID & com

Globally unique identifiers (GUIDs)
1.Interface ID (IID)
a GUID that uniquely identifies a particular COM interface

2.Class ID (CLSID)
a GUID that uniquely identifies a particular COM object

com & interface

An interface is the COM mechanism for exposing public methods on an object

If an object exposes a standard interface, the object must implement every method in that interface.

A typical COM object exposes at least two and sometimes many interfaces.

IUnknown
IUnknown is the key COM interface. Every COM object must expose this interface

package windows driver

WDF driver package consists of the following components
1. driver binaries
2. either or both WDF co-installer
3. INF
a text file that contains directives that instruct Windows how to install the driver
use .inx file to create .inf files for different architecture

2009年9月20日 星期日

compile windows project

1. open a build environment window
start -> all programs -> windows driver kits -> wdk 7600.16385.0 -> build environments -> windows 7 -> x64 free build environment

2. In the project directory, two supporting files are needed
1. Makefile
2. sources
This file contains project-specific information that is used to build the driver, such as the list of source files.

options files:
Makefile.inc:
the directives for building the custom targets are placed in Makefile.inc. Makefile itself should never be modified.

.inx file:
An INX file is an architecture-independent INF file. When the appropriate instructions are specified, the Build utility uses the data in an INX file to produce an appropriate INF file for the project.

3. compile driver
in the project directory, type "build -g"
-g:Uses colored text to display warnings, errors, and summaries.
usually use "build -ceZ"
4. the file created from building
a output directory :
ex: objfre_wxp_x86\i386 for windows xp
objfre_wnet_x86\i386 for windows 2003
files in the directory:
(1) driver binary:
for KMDF, it is .sys file
for UMDF, it is .dll file
(2) object files for source file
(3)symbol file
.pdf file, for debugging