RE: DeviceIoControl to a filter,the APP how to CreateFile ?

After you successfully create your CDO, add a Symbolic link to the “DOS”
namespace.

Example:
UNICODE_STRING Win32DeviceName
RtlInitUnicodeString(&Win32DeviceName, L"\DosDevices\PkFilter");
status = IoCreateSymbolicLink(&Win32DeviceName, &nameString);

Now you should be able to open your device as: \.\PkFilter

/ted

-----Original Message-----
From: Brilly Wu (HangZhou) [mailto:xxxxx@viatech.com.cn]
Sent: Monday, July 12, 2004 1:41 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

The following is my filter driver code for Create the Control Device Object
(CDO)
Then how to use CreateFile?

//
// Create the Control Device Object (CDO). This object represents
this
// driver. Note that it does not have a device extension.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\Filters\PkFilter" );

status = IoCreateDevice( DriverObject, 0, //has no device extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( status == STATUS_OBJECT_PATH_NOT_FOUND )
{

//
// This must be a version of the OS that doesn’t have the
Filters
// path in its namespace. This was added in Windows XP.
//
// We will try just putting our control device object in
the \FileSystem
// portion of the object name space.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\PkFilterCDO" );

status = IoCreateDevice( DriverObject, 0, //has no device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating
control device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

}
else if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating control
device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

Use the device interface reference strings.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “cnmmd”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 12, 2004 5:52 AM
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

> the filter driver create a CDO,named “pkfilter”,
> in the Application,I want to use CreateFile to get a handle to the
> filter CDO,then use DeviceIoControl.But what first parameter in the
> CreateFile?
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@viatech.com.cn To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com

Attached message was “bounced” by OSR list manager when I replied to NTFSD
using Outlook. Anyway, here’s the (late) repost:

After you successfully create your CDO, add a Symbolic link to the “DOS”
namespace.

Example:
UNICODE_STRING Win32DeviceName
RtlInitUnicodeString(&Win32DeviceName, L"\DosDevices\PkFilter");
status = IoCreateSymbolicLink(&Win32DeviceName, &nameString);

Now you should be able to open your device as: \.\PkFilter

/ted

-----Original Message-----
From: Brilly Wu (HangZhou) [mailto:xxxxx@viatech.com.cn]
Sent: Monday, July 12, 2004 1:41 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

The following is my filter driver code for Create the Control Device Object
(CDO)
Then how to use CreateFile?

//
// Create the Control Device Object (CDO). This object represents
this
// driver. Note that it does not have a device extension.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\Filters\PkFilter" );

status = IoCreateDevice( DriverObject, 0, //has no device extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( status == STATUS_OBJECT_PATH_NOT_FOUND )
{

//
// This must be a version of the OS that doesn’t have the
Filters
// path in its namespace. This was added in Windows XP.
//
// We will try just putting our control device object in
the \FileSystem
// portion of the object name space.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\PkFilterCDO" );

status = IoCreateDevice( DriverObject, 0, //has no device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating
control device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

}
else if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating control
device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

Use the device interface reference strings.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “cnmmd”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 12, 2004 5:52 AM
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

> the filter driver create a CDO,named “pkfilter”,
> in the Application,I want to use CreateFile to get a handle to the
> filter CDO,then use DeviceIoControl.But what first parameter in the
> CreateFile?
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@viatech.com.cn To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@livevault.com To unsubscribe
send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: sevenyears@0451.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Attached message was “bounced” by OSR list manager when I replied to NTFSD
using Outlook. Anyway, here’s the (late) repost:

After you successfully create your CDO, add a Symbolic link to the “DOS”
namespace.

Example:
UNICODE_STRING Win32DeviceName
RtlInitUnicodeString(&Win32DeviceName, L"\DosDevices\PkFilter");
status = IoCreateSymbolicLink(&Win32DeviceName, &nameString);

Now you should be able to open your device as: \.\PkFilter <\.\PkFilter>

/ted

-----Original Message-----
From: Brilly Wu (HangZhou) [mailto:xxxxx@viatech.com.cn
mailto:xxxxx ]
Sent: Monday, July 12, 2004 1:41 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

The following is my filter driver code for Create the Control Device Object
(CDO)
Then how to use CreateFile?

//
// Create the Control Device Object (CDO). This object represents
this
// driver. Note that it does not have a device extension.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\Filters\PkFilter" );

status = IoCreateDevice( DriverObject, 0, //has no device extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( status == STATUS_OBJECT_PATH_NOT_FOUND )
{

//
// This must be a version of the OS that doesn’t have the
Filters
// path in its namespace. This was added in Windows XP.
//
// We will try just putting our control device object in
the \FileSystem
// portion of the object name space.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\PkFilterCDO" );

status = IoCreateDevice( DriverObject, 0, //has no device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating
control device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

}
else if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating control
device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

Use the device interface reference strings.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com http:

----- Original Message -----
From: “cnmmd”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 12, 2004 5:52 AM
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

> the filter driver create a CDO,named “pkfilter”,
> in the Application,I want to use CreateFile to get a handle to the
> filter CDO,then use DeviceIoControl.But what first parameter in the
> CreateFile?
>
></http:></mailto:xxxxx>

What is happening is that someone’s vacation message is sending the note
back to the list. Lyris observes its own header in the message and
rejects it, but sends the rejection back to you. My experience is that
the original message is posted, but the duplicate is bounced, but you
have no way to know this when you get the message from Lyris.

This is just one of the joys of auto-responders!

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class October
18, 2004 in Silicon Valley!

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ted Hess
Sent: Friday, July 16, 2004 9:59 AM
To: ntfsd redirect
Subject: RE: [ntfsd] DeviceIoControl to a filter,the APP how to
CreateFile ?

Attached message was “bounced” by OSR list manager when I replied to
NTFSD
using Outlook. Anyway, here’s the (late) repost:

After you successfully create your CDO, add a Symbolic link to the “DOS”
namespace.

Example:
UNICODE_STRING Win32DeviceName
RtlInitUnicodeString(&Win32DeviceName,
L"\DosDevices\PkFilter");
status = IoCreateSymbolicLink(&Win32DeviceName, &nameString);

Now you should be able to open your device as: \.\PkFilter

/ted

-----Original Message-----
From: Brilly Wu (HangZhou) [mailto:xxxxx@viatech.com.cn]
Sent: Monday, July 12, 2004 1:41 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

The following is my filter driver code for Create the Control Device
Object
(CDO)
Then how to use CreateFile?

//
// Create the Control Device Object (CDO). This object
represents
this
// driver. Note that it does not have a device extension.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\Filters\PkFilter" );

status = IoCreateDevice( DriverObject, 0, //has no device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( status == STATUS_OBJECT_PATH_NOT_FOUND )
{

//
// This must be a version of the OS that doesn’t have
the
Filters
// path in its namespace. This was added in Windows
XP.
//
// We will try just putting our control device object
in
the \FileSystem
// portion of the object name space.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\PkFilterCDO" );

status = IoCreateDevice( DriverObject, 0, //has no
device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating
control device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

}
else if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating control
device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

Use the device interface reference strings.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “cnmmd”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 12, 2004 5:52 AM
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

> the filter driver create a CDO,named “pkfilter”,
> in the Application,I want to use CreateFile to get a handle to the
> filter CDO,then use DeviceIoControl.But what first parameter in the
> CreateFile?
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@viatech.com.cn To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@livevault.com To
unsubscribe
send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: sevenyears@0451.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

And now I received two of them from my response. Tracking into the
message headers I find:

xxxxx@divassoftware.com

and

xxxxx@divassoftware.com

I’ll see if I can get someone here that knows something about lyris and
online to remove these two addresses.

In the interim, just ignore them.

Regards,

Tony

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Friday, July 16, 2004 11:32 AM
To: ntfsd redirect
Subject: RE: [ntfsd] DeviceIoControl to a filter,the APP how to
CreateFile ?

What is happening is that someone’s vacation message is sending the note
back to the list. Lyris observes its own header in the message and
rejects it, but sends the rejection back to you. My experience is that
the original message is posted, but the duplicate is bounced, but you
have no way to know this when you get the message from Lyris.

This is just one of the joys of auto-responders!

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class October
18, 2004 in Silicon Valley!

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ted Hess
Sent: Friday, July 16, 2004 9:59 AM
To: ntfsd redirect
Subject: RE: [ntfsd] DeviceIoControl to a filter,the APP how to
CreateFile ?

Attached message was “bounced” by OSR list manager when I replied to
NTFSD
using Outlook. Anyway, here’s the (late) repost:

After you successfully create your CDO, add a Symbolic link to the “DOS”
namespace.

Example:
UNICODE_STRING Win32DeviceName
RtlInitUnicodeString(&Win32DeviceName,
L"\DosDevices\PkFilter");
status = IoCreateSymbolicLink(&Win32DeviceName, &nameString);

Now you should be able to open your device as: \.\PkFilter

/ted

-----Original Message-----
From: Brilly Wu (HangZhou) [mailto:xxxxx@viatech.com.cn]
Sent: Monday, July 12, 2004 1:41 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

The following is my filter driver code for Create the Control Device
Object
(CDO)
Then how to use CreateFile?

//
// Create the Control Device Object (CDO). This object
represents
this
// driver. Note that it does not have a device extension.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\Filters\PkFilter" );

status = IoCreateDevice( DriverObject, 0, //has no device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( status == STATUS_OBJECT_PATH_NOT_FOUND )
{

//
// This must be a version of the OS that doesn’t have
the
Filters
// path in its namespace. This was added in Windows
XP.
//
// We will try just putting our control device object
in
the \FileSystem
// portion of the object name space.
//

RtlInitUnicodeString( &nameString,
L"\FileSystem\PkFilterCDO" );

status = IoCreateDevice( DriverObject, 0, //has no
device
extension
&nameString, FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN, FALSE, &gPadLockFilter_ControlDeviceObject );

if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating
control device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

}
else if ( !NT_SUCCESS( status ) )
{

KdPrint( ( “PkFilter!DriverEntry: Error creating control
device object "%wZ", status=%08x\n”, &nameString, status ) );
return status;
}

Use the device interface reference strings.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “cnmmd”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 12, 2004 5:52 AM
Subject: [ntfsd] DeviceIoControl to a filter,the APP how to CreateFile?

> the filter driver create a CDO,named “pkfilter”,
> in the Application,I want to use CreateFile to get a handle to the
> filter CDO,then use DeviceIoControl.But what first parameter in the
> CreateFile?
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@viatech.com.cn To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@livevault.com To
unsubscribe
send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: sevenyears@0451.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com