0

I'm developing a kernel-mode driver for an Anti Virus program, but I've a problem in Drivers section

I want to send a string value (For example "String") from Kernel-mode driver to user-mode application . can anyone help me to do this ?

Behrooz
  • 684
  • 1
  • 9
  • 19

2 Answers2

1

This question was asked a long ago, and I hope you have found the solution. I am posting this solution as there was none.

It depends on how you want to send the string to the user mode client application.

One way is IOCTL command. You issue a simple IOCTL command with METHOD_BUFFERED (assuming that string is little data) and voila, you are done.

Other way is to make client wait for an event, and make driver fire an event when that string is available to kernel driver. Then, as the wait in the user mode application is over, you will get the data. (of course, if wait didn't timed out or many other things)

0

There is function copy_to_user defined here include/asm/uaccess.h. With help of it you can safely copy data from kernel mode to user mode.

Pirate
  • 97
  • 8