Skip to content

Instantly share code, notes, and snippets.

zero MACRO p1
xor p1,p1
ENDM
#pragma once
// Define a device type for your driver (if you haven't already)
#define FILE_DEVICE_MY_COMM_DRIVER 0x8001 // Example vendor-specific device type
// Define the function code for sending the UNICODE_STRING
#define IOCTL_SEND_UNICODE_STRING \
CTL_CODE(FILE_DEVICE_MY_COMM_DRIVER, 0x200, METHOD_BUFFERED, FILE_READ_ACCESS)
// Function code 0x200 (you can choose a different value in the custom range)