Skip to content

Commit 111b5ee

Browse files
author
Fredrik Orderud
committed
Rename firefly.mof to TailLight.mof.
1 parent d7ca68a commit 111b5ee

File tree

10 files changed

+25
-26
lines changed

10 files changed

+25
-26
lines changed

IntelliMouse.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Must be run with admin privileges
22

33
# get IntelliMouse WMI object
4-
$mouse = Get-CimInstance -Namespace root\WMI -Class FireflyDeviceInformation
4+
$mouse = Get-CimInstance -Namespace root\WMI -Class TailLightDeviceInformation
55

66
Write-Host("IntelliMouse device:")
77

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Filter driver for Microsoft Pro IntelliMouse that exposes a WMI interface. Based on the [KMDF filter driver for a HID device](https://github.com/microsoft/Windows-driver-samples/tree/main/hid/firefly) sample from Microsoft that have been updated to work with more recent IntelliMouse models. The mouse should report itself with `VendorID=045E` (Microsoft) and `ProductID=082A` (Pro IntelliMouse).
22

33
### Projects
4-
* `firefly.sys`: An upper device filter driver for the HID class for Microsoft Pro Intellimouse. Registers a [FireflyDeviceInformation](TailLight/firefly.mof) WMI class that can be accessed from user mode to control the tail light.
4+
* `firefly.sys`: An upper device filter driver for the HID class for Microsoft Pro Intellimouse. Registers a [TailLightDeviceInformation](TailLight/TailLight.mof) WMI class that can be accessed from user mode to control the tail light.
55
* `IntelliMouse.ps1`: PowerShell script for sending commands through the WMI interface.
66
* `flicker.exe`: Application for causing the mouse to blink by sending commands through the WMI interface.
77
* `HidUtil.exe`: Command-line utility for querying and communicating with HID devices.

TailLight/firefly.mof renamed to TailLight/TailLight.mof

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
[Dynamic, Provider("WMIProv"),
44
WMI,
5-
Description("Firefly driver information"),
5+
Description("TailLight driver information"),
66
guid("{AB27DB29-DB25-42E6-A3E7-28BD46BDB666}"),
77
locale("MS\\0x409")]
8-
class FireflyDeviceInformation
8+
class TailLightDeviceInformation
99
{
1010
[key, read]
1111
string InstanceName;

TailLight/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ typedef struct _DEVICE_CONTEXT
77

88
WDF_DECLARE_CONTEXT_TYPE(DEVICE_CONTEXT)
99

10-
WDF_DECLARE_CONTEXT_TYPE(FireflyDeviceInformation)
10+
WDF_DECLARE_CONTEXT_TYPE(TailLightDeviceInformation)
1111

1212
EVT_WDF_DEVICE_CONTEXT_CLEANUP EvtDeviceContextCleanup;
1313

TailLight/driver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#include <initguid.h>
66
#include <wdmguid.h>
77

8-
// Our drivers generated include from firefly.mof
8+
// Our drivers generated include from TailLight.mof
99
// See makefile.inc for wmi commands
10-
#include "fireflymof.h"
10+
#include "TailLightmof.h"
1111

1212
// Our drivers modules includes
1313
#include "device.h"

TailLight/firefly.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
4444
</ImportGroup>
4545
<ItemGroup Label="WrappedTaskItems">
46-
<MofComp Include="firefly.mof">
47-
<CreateBinaryMofFile>".\$(IntDir)\firefly.bmf"</CreateBinaryMofFile>
46+
<MofComp Include="TailLight.mof">
47+
<CreateBinaryMofFile>".\$(IntDir)\TailLight.bmf"</CreateBinaryMofFile>
4848
</MofComp>
49-
<Wmimofck Include=".\$(IntDir)\firefly.bmf" />
50-
<Wmimofck Include=".\$(IntDir)\firefly.bmf">
51-
<HeaderOutputFile>.\$(IntDir)\fireflymof.h</HeaderOutputFile>
49+
<Wmimofck Include=".\$(IntDir)\TailLight.bmf" />
50+
<Wmimofck Include=".\$(IntDir)\TailLight.bmf">
51+
<HeaderOutputFile>.\$(IntDir)\TailLightmof.h</HeaderOutputFile>
5252
</Wmimofck>
5353
</ItemGroup>
5454
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

TailLight/module.rc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99

1010
#include "common.ver"
1111

12-
FireflyWMI MOFDATA Firefly.bmf
13-
12+
TailLightWMI MOFDATA TailLight.bmf

TailLight/wmi.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "driver.h"
22

33

4-
// Register our GUID and Datablock generated from the Firefly.mof file.
4+
// Register our GUID and Datablock generated from the TailLight.mof file.
55
NTSTATUS
66
WmiInitialize(
77
WDFDEVICE Device,
@@ -21,8 +21,8 @@ WmiInitialize(
2121
}
2222

2323
WDF_WMI_PROVIDER_CONFIG providerConfig = {};
24-
WDF_WMI_PROVIDER_CONFIG_INIT(&providerConfig, &FireflyDeviceInformation_GUID);
25-
providerConfig.MinInstanceBufferSize = sizeof(FireflyDeviceInformation);
24+
WDF_WMI_PROVIDER_CONFIG_INIT(&providerConfig, &TailLightDeviceInformation_GUID);
25+
providerConfig.MinInstanceBufferSize = sizeof(TailLightDeviceInformation);
2626

2727
WDF_WMI_INSTANCE_CONFIG instanceConfig = {};
2828
WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER_CONFIG(&instanceConfig, &providerConfig);
@@ -32,7 +32,7 @@ WmiInitialize(
3232
instanceConfig.EvtWmiInstanceSetItem = EvtWmiInstanceSetItem;
3333

3434
WDF_OBJECT_ATTRIBUTES woa = {};
35-
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&woa, FireflyDeviceInformation);
35+
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&woa, TailLightDeviceInformation);
3636

3737
// No need to store the WDFWMIINSTANCE in the device context because it is
3838
// passed back in the WMI instance callbacks and is not referenced outside
@@ -41,7 +41,7 @@ WmiInitialize(
4141
status = WdfWmiInstanceCreate(Device, &instanceConfig, &woa, &WmiInstance);
4242

4343
if (NT_SUCCESS(status)) {
44-
FireflyDeviceInformation* info = WdfObjectGet_FireflyDeviceInformation(WmiInstance);
44+
TailLightDeviceInformation* info = WdfObjectGet_TailLightDeviceInformation(WmiInstance);
4545
info->TailLight = 0x000000; // black
4646
}
4747

@@ -62,7 +62,7 @@ EvtWmiInstanceQueryInstance(
6262

6363
KdPrint(("FireFly: WMI QueryInstance\n"));
6464

65-
FireflyDeviceInformation* pInfo = WdfObjectGet_FireflyDeviceInformation(WmiInstance);
65+
TailLightDeviceInformation* pInfo = WdfObjectGet_TailLightDeviceInformation(WmiInstance);
6666

6767
// Our mininum buffer size has been checked by the Framework
6868
// and failed automatically if too small.
@@ -87,7 +87,7 @@ EvtWmiInstanceSetInstance(
8787

8888
KdPrint(("FireFly: WMI SetInstance\n"));
8989

90-
FireflyDeviceInformation* pInfo = WdfObjectGet_FireflyDeviceInformation(WmiInstance);
90+
TailLightDeviceInformation* pInfo = WdfObjectGet_TailLightDeviceInformation(WmiInstance);
9191

9292
// Our mininum buffer size has been checked by the Framework
9393
// and failed automatically if too small.
@@ -120,11 +120,11 @@ EvtWmiInstanceSetItem(
120120
if (DataItemId != 1)
121121
return STATUS_INVALID_DEVICE_REQUEST;
122122

123-
if (InBufferSize < FireflyDeviceInformation_TailLight_SIZE)
123+
if (InBufferSize < TailLightDeviceInformation_TailLight_SIZE)
124124
return STATUS_BUFFER_TOO_SMALL;
125125

126-
FireflyDeviceInformation* pInfo = WdfObjectGet_FireflyDeviceInformation(WmiInstance);
127-
pInfo->TailLight = ((FireflyDeviceInformation*)InBuffer)->TailLight;
126+
TailLightDeviceInformation* pInfo = WdfObjectGet_TailLightDeviceInformation(WmiInstance);
127+
pInfo->TailLight = ((TailLightDeviceInformation*)InBuffer)->TailLight;
128128

129129
// Tell the HID device about the new tail light state
130130
NTSTATUS status = FireflySetFeature(

TailLight/wmi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Where they are described.
2-
#define MOFRESOURCENAME L"FireflyWMI"
2+
#define MOFRESOURCENAME L"TailLightWMI"
33

44
// Initialize the FireFly drivers WMI support
55
NTSTATUS WmiInitialize(

flicker/luminous.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <stdexcept>
33

44
const wchar_t NAME_SPACE[] = L"root\\WMI";
5-
const wchar_t CLASS_NAME[] = L"FireflyDeviceInformation";
5+
const wchar_t CLASS_NAME[] = L"TailLightDeviceInformation";
66
const wchar_t PROPERTY_NAME[] = L"TailLight";
77

88

0 commit comments

Comments
 (0)