String Handle

Hi, Alll.

I’m new to DDK, so please don’t laugh :slight_smile:

I’m modifying a sample driver.
There is a function in it that accepts a handle to a file, that is created via
ZwCreateFile.
But I want to modify it to store data not on the filesystem, but in some
string variable.

But I can’t figure out how can I get a handle of a string?

Thanks.


uname -a
Linux TRUSK 2.6.8-2-686 #1 Thu May 19 17:53:30 JST 2005 i686 GNU/Linux

xxxxx@voliacable.com wrote:

Hi, Alll.

I’m new to DDK, so please don’t laugh :slight_smile:

I’m modifying a sample driver.
There is a function in it that accepts a handle to a file, that is created via
ZwCreateFile.
But I want to modify it to store data not on the filesystem, but in some
string variable.

But I can’t figure out how can I get a handle of a string?

Not possible. If you have a function that wants to write to a file,
there is no way to have it write to a string instead. The kernel APIs
simply do not support that kind of thing. You will have to modify the
fuinction, or give it a handle to a temporary file and read the file
back afterward.

This kind of file and string manipulation is not typically done in a
kernel driver. What are you actually trying to do?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.