You may know some ways to control through the DLL in Windows. But I have to write to implement control, which in turn involves some other technologies for some DDK programming. I am using Microsoft Software Microsoft Windows 2000 Driver Development Kit Tool. It is better than the previous version of DDK, but there is a difficulty. This may require some knowledge of driving programming.
For example, the following concepts: equipment, virtual drivers, 0 and 3 rings in Windows, and more, and so on.
The so-called driver is nothing more than a program that is running in Windows. This requires us to know these standards.
Of course, Micrisoft provides us with software that allows us to use to use, these software is the reflection of Windows standards. If you learn to use these software, you will know that Windows has some inner layer standards. Commonly used VTools, DDK, Windrivers. The VTools and Windrivers are more Visual and Easy, and the more Visual and Easy may be limited. That is to say, the more underlying thing is not easy to see and do. DDK is more undergrowed. Software. It can be said to be basically satisfied. But learn to use him. Below "The implementation of Ctrl ALT DEL control in Windows" takes this stuff.
In fact, we must implement the implementation of "Ctrl Alt DEL Control in Windows", you can use DDK to write the keyboard underlayer (filter driver). The required file is Kbfiltr.c and Kbfiltr provided by SRC in DDK. H main file. Other corresponding files (and compiled), of course, also need.
The Nandies are available in Kbfiltr.h:
1.
NTSTATUS
KBFILTER_ADDDEVICE
In PDRIVER_OBJECT DriverObject,
In PDEvice_Object BusDeviceObject BUSDEVICEOBJECT
);
This is an increase in equipment, mainly used to increase your own equipment (may need to communicate with other equipment)
NTSTATUS
Kbfilter_createclose (
In PDEvice_Object DeviceObject,
In PIRP IRP
);
This is the number of servings when the device is created and closed.
NTSTATUS
KBFilter_DispatchPassthrough (
In PDEvice_Object DeviceObject,
In PIRP IRP
);
Transmission down the number of IRPs
NTSTATUS
Kbfilter_internioctl
In PDEvice_Object DeviceObject,
In PIRP IRP
);
IO control at internal IRP transmission
NTSTATUS
Kbfilter_iocTl
In PDEvice_Object DeviceObject,
In PIRP IRP
);
And user layer IO control
NTSTATUS
KBFILTER_PNP (
In PDEvice_Object DeviceObject,
In PIRP IRP
);
NTSTATUS
KBFilter_Power (
In PDEvice_Object DeviceObject,
In PIRP IRP
);
NTSTATUS
Kbfilter_InitializationRoutine
In PDEvice_Object DeviceObject, // InitializationContext
In pvoid synchfunccontext,
IN pi8042_synch_read_port readport,
IN pi8042_synch_write_port writeport,
Out Pboolean Turntranslationon
);
Boolean
Kbfilter_ismock
PDEvice_Object DeviceObject, // isrcontext
PKEYBOARD_INPUT_DATA CURRENTINPUT,
Poutput_packet currentoutput,
Uchar statusbyte,
Puchar Databyte,
Pboolean ContinueProcessing,
PKEYBOARD_SCAN_STATE SCANSTATE
);
Void
KBFilter_ServiceCallback
In PDEvice_Object DeviceObject,
In pkeyboard_input_data inputdatathart,
In pkeyboard_input_data inputdataend,
In Out Pulong InputDataConsumed
);
Void
KBFILTER_UNLOAD
In PDRIVER_OBJECT DriverObject
);
This is useful is Kbfilter_ServiceCallback (), the number of connotations (for this example). This culvert provides us to intercept and control the data when the keyboard is transferred. The parameters are simple:
In PDEvice_Object DeviceObject device.
In pkeyboard_input_data inputdatathart, data start package.
In pkeyboard_input_data inputdatand, data termination package
Between InputDataStart and InputDataend is the current keyboard input data. How to change it if you want to change it.
Design an algorithm to make Ctrl Alt DEL. Complete !!