FilterConnectCommunicationPort return codes?

What is the error 0x80070002 returned from FilterConnectCommunicationPort?
Where are these documented?

I’m calling FilterConnectCommunicationPort with the exact same device name
L"\DeqoCPSPort" that I used in my successful FltCreateCommunicationPort
call in my mini-filter. I put a breakpoint on my port-connect call that was
registered and it never broke when this error happened.

It started working for some reason. I must have had a problem with my
setup. I’m still curious where the return codes are defined though.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> What is the error 0x80070002 returned from FilterConnectCommunicationPort?
> Where are these documented?
>
> I’m calling FilterConnectCommunicationPort with the exact same device name
> L"\DeqoCPSPort" that I used in my successful FltCreateCommunicationPort
> call in my mini-filter. I put a breakpoint on my port-connect call that
> was registered and it never broke when this error happened.
>
>

In your filter manager IFS Kit, you should have the include file
fltWinError.h. The error codes are documented there.

Regards,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Tuesday, March 22, 2005 4:25 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] FilterConnectCommunicationPort return codes?

It started working for some reason. I must have had a problem with my
setup. I’m still curious where the return codes are defined though.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> What is the error 0x80070002 returned from
FilterConnectCommunicationPort?
> Where are these documented?
>
> I’m calling FilterConnectCommunicationPort with the exact same device
> name L"\DeqoCPSPort" that I used in my successful
> FltCreateCommunicationPort call in my mini-filter. I put a breakpoint

> on my port-connect call that was registered and it never broke when
this error happened.
>
>


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

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

Molly is actually wrong in this particular case.

The error codes that are returned by all of the “FilterXxx” APIs are
known as HRESULTs. The idea of an HRESULT is to have an nt kernel mode
style error code in user mode. I believe this was introduced with W2K.

Below is the layout of an HRESULT value as defined in winerror.h

//
// Values are 32 bit values laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// ±–±±±----------------------±------------------------------+
// |Sev|C|R| Facility | Code |
// ±–±±±----------------------±------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility’s status code
//
//

Note that HRESULT values do not distinguish between a “warning” and an
“error” value which is why most of them have a warning severity code
value.

When they added HRESULT values they needed a plan for dealing with all
of the existing error codes that don’t look like HRESULT values. What
they did is defined them with a facility code of 7 (for win32). So any
time you see an HRESULT error code with the following format 8007xxxx
you should grab the low word, convert it to decimal and look it up in
winerror.h. In this case the xxxx value was 2 so this was an
ERROR_FILE_NOT_FOUND failure. You gave a bad port name.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Molly Brown
Sent: Tuesday, March 22, 2005 4:53 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FilterConnectCommunicationPort return codes?

In your filter manager IFS Kit, you should have the include file
fltWinError.h. The error codes are documented there.

Regards,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Tuesday, March 22, 2005 4:25 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] FilterConnectCommunicationPort return codes?

It started working for some reason. I must have had a problem with my
setup. I’m still curious where the return codes are defined though.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> What is the error 0x80070002 returned from
FilterConnectCommunicationPort?
> Where are these documented?
>
> I’m calling FilterConnectCommunicationPort with the exact same device
> name L"\DeqoCPSPort" that I used in my successful
> FltCreateCommunicationPort call in my mini-filter. I put a breakpoint

> on my port-connect call that was registered and it never broke when
this error happened.
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.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: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

HRESULT is COM style of the error code, introduced with COM in 16bit
Windows.

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

----- Original Message -----
From: “Neal Christiansen”
To: “Windows File Systems Devs Interest List”
Sent: Friday, March 25, 2005 9:25 AM
Subject: RE: [ntfsd] FilterConnectCommunicationPort return codes?

Molly is actually wrong in this particular case.

The error codes that are returned by all of the “FilterXxx” APIs are
known as HRESULTs. The idea of an HRESULT is to have an nt kernel mode
style error code in user mode. I believe this was introduced with W2K.

Below is the layout of an HRESULT value as defined in winerror.h

//
// Values are 32 bit values laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// ±–±±±----------------------±------------------------------+
// |Sev|C|R| Facility | Code |
// ±–±±±----------------------±------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility’s status code
//
//

Note that HRESULT values do not distinguish between a “warning” and an
“error” value which is why most of them have a warning severity code
value.

When they added HRESULT values they needed a plan for dealing with all
of the existing error codes that don’t look like HRESULT values. What
they did is defined them with a facility code of 7 (for win32). So any
time you see an HRESULT error code with the following format 8007xxxx
you should grab the low word, convert it to decimal and look it up in
winerror.h. In this case the xxxx value was 2 so this was an
ERROR_FILE_NOT_FOUND failure. You gave a bad port name.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Molly Brown
Sent: Tuesday, March 22, 2005 4:53 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FilterConnectCommunicationPort return codes?

In your filter manager IFS Kit, you should have the include file
fltWinError.h. The error codes are documented there.

Regards,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Tuesday, March 22, 2005 4:25 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] FilterConnectCommunicationPort return codes?

It started working for some reason. I must have had a problem with my
setup. I’m still curious where the return codes are defined though.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> What is the error 0x80070002 returned from
FilterConnectCommunicationPort?
> Where are these documented?
>
> I’m calling FilterConnectCommunicationPort with the exact same device
> name L"\DeqoCPSPort" that I used in my successful
> FltCreateCommunicationPort call in my mini-filter. I put a breakpoint

> on my port-connect call that was registered and it never broke when
this error happened.
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.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: unknown lmsubst tag argument:
‘’
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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks for the clarification Maxim, I didn’t realize it had been
introduced that long ago.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
Rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Friday, March 25, 2005 5:37 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] FilterConnectCommunicationPort return codes?

HRESULT is COM style of the error code, introduced with COM in 16bit
Windows.

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

----- Original Message -----
From: “Neal Christiansen”
To: “Windows File Systems Devs Interest List”
Sent: Friday, March 25, 2005 9:25 AM
Subject: RE: [ntfsd] FilterConnectCommunicationPort return codes?

Molly is actually wrong in this particular case.

The error codes that are returned by all of the “FilterXxx” APIs are
known as HRESULTs. The idea of an HRESULT is to have an nt kernel mode
style error code in user mode. I believe this was introduced with W2K.

Below is the layout of an HRESULT value as defined in winerror.h

//
// Values are 32 bit values laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// ±–±±±----------------------±------------------------------+
// |Sev|C|R| Facility | Code |
// ±–±±±----------------------±------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility’s status code
//
//

Note that HRESULT values do not distinguish between a “warning” and an
“error” value which is why most of them have a warning severity code
value.

When they added HRESULT values they needed a plan for dealing with all
of the existing error codes that don’t look like HRESULT values. What
they did is defined them with a facility code of 7 (for win32). So any
time you see an HRESULT error code with the following format 8007xxxx
you should grab the low word, convert it to decimal and look it up in
winerror.h. In this case the xxxx value was 2 so this was an
ERROR_FILE_NOT_FOUND failure. You gave a bad port name.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Molly Brown
Sent: Tuesday, March 22, 2005 4:53 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] FilterConnectCommunicationPort return codes?

In your filter manager IFS Kit, you should have the include file
fltWinError.h. The error codes are documented there.

Regards,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Tuesday, March 22, 2005 4:25 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] FilterConnectCommunicationPort return codes?

It started working for some reason. I must have had a problem with my
setup. I’m still curious where the return codes are defined though.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> What is the error 0x80070002 returned from
FilterConnectCommunicationPort?
> Where are these documented?
>
> I’m calling FilterConnectCommunicationPort with the exact same device
> name L"\DeqoCPSPort" that I used in my successful
> FltCreateCommunicationPort call in my mini-filter. I put a breakpoint

> on my port-connect call that was registered and it never broke when
this error happened.
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.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: unknown lmsubst tag argument:
‘’
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: unknown lmsubst tag argument:
‘’
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@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com