i built a wdm driver for a device declared as a mouse class device .
i can’t open a handle to the device for IOCTL , i was wondering how to send
info from a user mode app .
i need to send info for calibration of the device .
i was thinking about reading a flag from the registry at each iteration of
the read on the device but i got this bsod :
ATTEMPTED_SWITCH_FROM_DPC (b8)
A wait operation, attach process, or yield was attempted from a DPC routine.
This is an illegal operation and the stack track will lead to the offending
code and original DPC routine.
Arguments:
Arg1: 00000000, Original thread which is the cause of the failure
Arg2: 00000000, New thread
Arg3: 00000000, Stack address of the original thread
Arg4: 00000000
Debugging Details:
DEFAULT_BUCKET_ID: DRIVER_FAULT
BUGCHECK_STR: 0xB8
LAST_CONTROL_TRANSFER: from 805258ca to 805103fa
STACK_TEXT:
80541468 805258ca 00000003 80541798 00000000
nt!RtlpBreakWithStatusInstruction
805414b4 80526160 00000003 8054a6a0 8054a6a0 nt!KiBugCheckDebugBreak+0x19
80541880 805266bf 000000b8 00000000 00000000 nt!KeBugCheck2+0x46d
8054189c 804f1cd1 000000b8 80541950 00000202 nt!KeBugCheck+0x10
805418ac 804f1ace 805418f4 8054a6a0 ffdff120 nt!SwapContext+0x157
805418c0 804ebd36 8054a710 8054a6a0 804ec950 nt!KiSwapContext+0x2e
805418cc 804ec950 00000710 e101b008 e1020350 nt!KiSwapThread+0x44
805418f4 805128d5 00000000 00000000 00000000 nt!KeWaitForSingleObject+0x1c0
80541910 8059231e e2252810 e101a320 e24e4d43
nt!ExAcquireFastMutexUnsafe+0x19
80541960 805861fc e101b008 00135710 e101a2d8 nt!HvpGetCellMapped+0x5f
80541980 80586348 0000004c 80541be8 e101b008 nt!CmpConstructName+0xa8
805419cc 80586462 e101b008 80541c68 e101a2d8 nt!CmpGetSymbolicLink+0x3a
80541ba4 8057f6f0 80000020 00000000 ffb8c3a0 nt!CmpParseKey+0x373
80541c28 80581aba 00000000 80541c68 00000040 nt!ObpLookupObjectName+0x56a
80541c7c 805827cd 00000000 81287e70 00000000 nt!ObOpenObjectByName+0xe9
80541d4c 804da140 80541e54 000f003f 80541e1c nt!NtOpenKey+0x191
80541d4c 8050f27d 80541e54 000f003f 80541e1c nt!KiSystemService+0xc4
80541dd0 f490944a 80541e54 000f003f 80541e1c nt!ZwOpenKey+0x11
80541e64 804ed83c 00000000 811e8af8 810d9820
mmtser!ControllerReadComplete+0xe0 [c:\stock\projet\mmtser\readwrite.cpp @
443]
80541e94 fc5e814c 00000000 ffafda3c 80541ec8 nt!IopfCompleteRequest+0xa0
80541ea4 fc5e810a ffafda3c ffafda1c 80541efc
serial!SerialGetNextIrpLocked+0x4f
80541ec8 fc5e88a2 ffafda3c ffafda1c 80541efc serial!SerialGetNextIrp+0x25
80541ef0 fc5e3a4b ffafd978 00000000 fc5e3902
serial!SerialTryToCompleteCurrent+0x78
80541f2c 804f1e02 ffafdb84 ffafd978 00000000 serial!SerialCompleteRead+0x51
80541f40 804eed89 8054a6a0 ffdffc50 00000000 nt!KiRetireDpcList+0x46
ffdff980 8125642c fc941000 0003739f 00000004 nt!PopIdle0+0x47
WARNING: Frame IP not in any known module. Following frames may be wrong.
fc4f07c4 ffdff980 fc4dec32 00000000 00000000 0x8125642c
fc4f07c4 ffdff980 fc4dec32 00000000 00000000 0xffdff980
8054ace4 fc4f07c4 804ebf58 00000000 000cba19 0xffdff980
81275830 8054ace4 fc4debae 812757f8 00000000 ACPI!AcpiGpeDpc+0x4
8125642c 81275830 fc487380 812560e0 811f95f8 nt!KiTimerExpireDpc+0x4
ffdff980 8125642c fc941000 0003739f 00000004 0x81275830
fc4f07c4 ffdff980 fc4dec32 00000000 00000000 0x8125642c
8054ace4 fc4f07c4 804ebf58 00000000 000cba19 0xffdff980
81275830 8054ace4 fc4debae 812757f8 00000000 ACPI!AcpiGpeDpc+0x4
8125642c 81275830 fc487380 812560e0 811f95f8 nt!KiTimerExpireDpc+0x4
ffdff980 8125642c fc941000 0003739f 00000004 0x81275830
fc4f07c4 ffdff980 fc4dec32 00000000 00000000 0x8125642c
8054ace4 fc4f07c4 804ebf58 00000000 000cba19 0xffdff980
81275830 8054ace4 fc4debae 812757f8 00000000 ACPI!AcpiGpeDpc+0x4
8125642c 81275830 fc487380 812560e0 811f95f8 nt!KiTimerExpireDpc+0x4
ffdff980 8125642c fc941000 0003739f 00000004 0x81275830
fc4f07c4 ffdff980 fc4dec32 00000000 00000000 0x8125642c
8054ace4 fc4f07c4 804ebf58 00000000 000cba19 0xffdff980
81275830 8054ace4 fc4debae 812757f8 00000000 ACPI!AcpiGpeDpc+0x4
8125642c 81275830 fc487380 812560e0 811f95f8 nt!KiTimerExpireDpc+0x4
ffdff980 8125642c fc941000 0003739f 00000004 0x81275830
fc4f07c4 ffdff980 fc4dec32 00000000 00000000 0x8125642c
8054ace4 fc4f07c4 804ebf58 00000000 000cba19 0xffdff980
81275830 8054ace4 fc4debae 812757f8 00000000 ACPI!AcpiGpeDpc+0x4
FOLLOWUP_IP:
mmtser!ControllerReadComplete+e0 [c:\stock\projet\mmtser\readwrite.cpp @
443]
f490944a 8945ac mov [ebp-0x54],eax
SYMBOL_STACK_INDEX: 12
FOLLOWUP_NAME: MachineOwner
SYMBOL_NAME: mmtser!ControllerReadComplete+e0
MODULE_NAME: mmtser
IMAGE_NAME: mmtser.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 41614d01
STACK_COMMAND: kb
BUCKET_ID: 0xB8_mmtser!ControllerReadComplete+e0