Click here to Skip to main content
15,884,628 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I am newbies in driver programmer

I would like to create driver filter on the Mo (Magneto-Optical Disk) device.
Now, I can detect device plugin via DriverObject->DriverExtension->AddDevice

Code:

C++
NTSTATUS DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
	DriverObject->DriverExtension->AddDevice = DriverAddDevice;

	for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; ++i)
	{
		DriverObject->MajorFunction[i] = DispatchQueueIRP;
	}

	DriverObject->DriverUnload =  UnloadDriver;
	return  CreateRootDeviceObject (DriverObject);
}


I would like to detect the event for remove media or exchange a new media(MO disk).
What is IRP_MJ ? i choose handleing.

Thank you.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900