Sample Code

windows driver samples/ Sample KMDF Function Driver for OSR USB-FX2/ C++/ driver/ osrusbfx2.inx/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
;/*++
;
;Copyright (c) Microsoft Corporation.  All rights reserved.
;
;   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
;   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
;   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
;   PURPOSE.
;
;Module Name:
;
;    OSRUSBFX2.INF
;
;Abstract:
;    Installation inf for OSR USB-FX2 Learning Kit
;
;--*/
 
[Version]
Signature="$WINDOWS NT$"
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFT%
DriverVer=03/20/2003,5.00.3788
CatalogFile=KmdfSamples.cat
 
 
; ================= Class section =====================
 
[ClassInstall32]
Addreg=SampleClassReg    
 
[SampleClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-5
 
 
; ================= Device section =====================
 
[Manufacturer]
%MfgName%=Microsoft,NT$ARCH$
 
; For Win2K
[Microsoft]
%USB\VID_045E&PID_930A.DeviceDesc%=osrusbfx2.Dev, USB\VID_0547&PID_1002
%Switch.DeviceDesc%=Switch.Dev, {6FDE7521-1B65-48ae-B628-80BE62016026}\OsrUsbFxRawPdo
 
; For XP and later
[Microsoft.NT$ARCH$]
%USB\VID_045E&PID_930A.DeviceDesc%=osrusbfx2.Dev, USB\VID_0547&PID_1002
%Switch.DeviceDesc%=Switch.Dev, {6FDE7521-1B65-48ae-B628-80BE62016026}\OsrUsbFxRawPdo
 
 
[osrusbfx2.Dev.NT]
CopyFiles=osrusbfx2.Files.Ext
 
[Switch.Dev.NT]
;dummy section
 
[Switch.Dev.NT.Services]
AddService = , %SPSVCINST_ASSOCSERVICE%,
 
[osrusbfx2.Dev.NT.Services]
AddService = osrusbfx2, %SPSVCINST_ASSOCSERVICE%, osrusbfx2.AddService
 
[osrusbfx2.AddService]
DisplayName    = %osrusbfx2.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %10%\System32\Drivers\osrusbfx2.sys
LoadOrderGroup = Base
 
[osrusbfx2.Files.Ext]
osrusbfx2.sys
 
[SourceDisksNames]
1=%Disk_Description%,,,
 
[SourceDisksFiles]
osrusbfx2.sys = 1
 
[DestinationDirs]
DefaultDestDir = 12
 
;-------------- WDF Coinstaller installation
 
[DestinationDirs]
CoInstaller_CopyFiles = 11
 
[osrusbfx2.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
 
[CoInstaller_CopyFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll
 
[SourceDisksFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames
 
[CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
 
[osrusbfx2.Dev.NT.Wdf]
KmdfService = osrusbfx2, osrusbfx2_wdfsect
[osrusbfx2_wdfsect]
KmdfLibraryVersion = $KMDFVERSION$
 
;---------------------------------------------------------------;
 
[Strings]
MSFT="Microsoft"
MfgName="OSR"
Disk_Description="OSRUSBFX2 Installation Disk"
USB\VID_045E&PID_930A.DeviceDesc="WDF Sample Driver for OSR USB-FX2 Learning Kit"
osrusbfx2.SvcDesc="WDF Sample Driver for OSR USB-FX2 Learning Kit"
ClassName       = "Sample Device"
Switch.DeviceDesc = "OsrUsbFX2 RawPdo For Switch"
SPSVCINST_ASSOCSERVICE= 0x00000002

Our Services

  • What our customers say about us?

© 2011-2025 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS