-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
… + Upgrading to latest VS2022 toolset
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.user | ||
*.filters | ||
Debug/ | ||
Release/ | ||
Backup/ | ||
libusbK/package/ | ||
*.AssemblyReference.cache | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/*++ | ||
Module Name: | ||
Trace.h | ||
Abstract: | ||
Header file for the debug tracing related function defintions and macros. | ||
Environment: | ||
Kernel mode | ||
--*/ | ||
|
||
// | ||
// Define the tracing flags. | ||
// | ||
// Tracing GUID - d751eb99-2ce3-4f86-b9fe-54d8a391a330 | ||
// | ||
|
||
#define WPP_CONTROL_GUIDS \ | ||
WPP_DEFINE_CONTROL_GUID( \ | ||
libusbKTraceGuid, (d751eb99,2ce3,4f86,b9fe,54d8a391a330), \ | ||
\ | ||
WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \ | ||
WPP_DEFINE_BIT(TRACE_DRIVER) \ | ||
WPP_DEFINE_BIT(TRACE_DEVICE) \ | ||
WPP_DEFINE_BIT(TRACE_QUEUE) \ | ||
) | ||
|
||
#define WPP_FLAG_LEVEL_LOGGER(flag, level) \ | ||
WPP_LEVEL_LOGGER(flag) | ||
|
||
#define WPP_FLAG_LEVEL_ENABLED(flag, level) \ | ||
(WPP_LEVEL_ENABLED(flag) && \ | ||
WPP_CONTROL(WPP_BIT_ ## flag).Level >= level) | ||
|
||
#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \ | ||
WPP_LEVEL_LOGGER(flags) | ||
|
||
#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \ | ||
(WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl) | ||
|
||
// | ||
// WPP orders static parameters before dynamic parameters. To support the Trace function | ||
// defined below which sets FLAGS=MYDRIVER_ALL_INFO, a custom macro must be defined to | ||
// reorder the arguments to what the .tpl configuration file expects. | ||
// | ||
#define WPP_RECORDER_FLAGS_LEVEL_ARGS(flags, lvl) WPP_RECORDER_LEVEL_FLAGS_ARGS(lvl, flags) | ||
#define WPP_RECORDER_FLAGS_LEVEL_FILTER(flags, lvl) WPP_RECORDER_LEVEL_FLAGS_FILTER(lvl, flags) | ||
|
||
// | ||
// This comment block is scanned by the trace preprocessor to define our | ||
// Trace function. | ||
// | ||
// begin_wpp config | ||
// FUNC Trace{FLAGS=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...); | ||
// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...); | ||
// end_wpp | ||
// |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
; | ||
; libusbK.inf | ||
; | ||
|
||
[Version] | ||
Signature="$WINDOWS NT$" | ||
Class=USBDevice | ||
ClassGuid={88BAE032-5A81-49f0-BC3D-A4FF138216D6} | ||
Provider=%ManufacturerName% | ||
CatalogFile=libusbK.cat | ||
DriverVer= | ||
PnpLockDown=1 | ||
|
||
[DestinationDirs] | ||
DefaultDestDir = 12 | ||
libusbK_Device_CoInstaller_CopyFiles = 11 | ||
|
||
[SourceDisksNames] | ||
1 = %DiskName%,,,"" | ||
|
||
[SourceDisksFiles] | ||
libusbK.sys = 1,, | ||
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames | ||
|
||
;***************************************** | ||
; Install Section | ||
;***************************************** | ||
|
||
[Manufacturer] | ||
%ManufacturerName%=Standard,NT$ARCH$ | ||
|
||
[Standard.NT$ARCH$] | ||
%libusbK.DeviceDesc%=libusbK_Device, USB\VID_1500&PID_0008 | ||
|
||
[libusbK_Device.NT] | ||
CopyFiles=Drivers_Dir | ||
|
||
[Drivers_Dir] | ||
libusbK.sys | ||
|
||
[libusbK_Device.NT.HW] | ||
AddReg=libusbK_AddReg | ||
|
||
[libusbK_AddReg] | ||
; By default, USBDevice class uses iProduct descriptor to name the device in | ||
; Device Manager on Windows 8 and higher. | ||
; Uncomment for this device to use %DeviceName% on Windows 8 and higher: | ||
;HKR,,FriendlyName,,%libusbK.DeviceDesc% | ||
|
||
;-------------- Service installation | ||
[libusbK_Device.NT.Services] | ||
AddService = libusbK,%SPSVCINST_ASSOCSERVICE%, libusbK_Service_Inst | ||
|
||
; -------------- libusbK driver install sections | ||
[libusbK_Service_Inst] | ||
DisplayName = %libusbK.SVCDESC% | ||
ServiceType = 1 ; SERVICE_KERNEL_DRIVER | ||
StartType = 3 ; SERVICE_DEMAND_START | ||
ErrorControl = 1 ; SERVICE_ERROR_NORMAL | ||
ServiceBinary = %12%\libusbK.sys | ||
|
||
; | ||
;--- libusbK_Device Coinstaller installation ------ | ||
; | ||
|
||
[libusbK_Device.NT.CoInstallers] | ||
AddReg=libusbK_Device_CoInstaller_AddReg | ||
CopyFiles=libusbK_Device_CoInstaller_CopyFiles | ||
|
||
[libusbK_Device_CoInstaller_AddReg] | ||
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" | ||
|
||
[libusbK_Device_CoInstaller_CopyFiles] | ||
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll | ||
|
||
[libusbK_Device.NT.Wdf] | ||
KmdfService = libusbK, libusbK_wdfsect | ||
[libusbK_wdfsect] | ||
KmdfLibraryVersion = $KMDFVERSION$ | ||
|
||
[Strings] | ||
SPSVCINST_ASSOCSERVICE= 0x00000002 | ||
ManufacturerName="Ellisys" ;TODO: Replace with your manufacturer name | ||
ClassName="Universal Serial Bus devices" | ||
DiskName = "libusbK Installation Disk" | ||
libusbK.DeviceDesc = "libusbK Device" | ||
libusbK.SVCDESC = "libusbK Service" | ||
REG_MULTI_SZ = 0x00010000 |