Re[2]: FwpsConstructIpHeaderForTransportPacket returning 0xc0220035

+1


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

------ Original Message ------
From: xxxxx@osr.com
To: “Windows System Software Devs Interest List”
Sent: 3/9/2017 2:14:51 PM
Subject: RE:[ntdev] FwpsConstructIpHeaderForTransportPacket returning
0xc0220035

>
>>#define STATUS_FWP_INVALID_PARAMETER ((NTSTATUS)0xC0220035L)
>
>He got you there, Don (it’s even in NTSTATUS.H…)
>
>Now… There are actually 13 parameters (I shit you not) to this
>function. Which one is invalid?
>
>Gosh… You know what would be great? Somebody should invent status
>codes that will tell you this. We could call them
>
>STATUS_INVALID_PARAMETER_1
>STATUS_INVALID_PARAMETER_2
>STATUS_INVALID_PARAMETER_3
>…
>
>All the way to 13… or maybe just up to 12 to make it an even dozen.
>
>Wouldn’t that be a great idea? Then, all we’d need to do is get the
>guys who write code that return a generic error code to actually USE
>them. But, of course, it’s clearly such a good idea that they’ll want
>to do this just naturally.
>
>OR, instead… maybe people who write validation routines could just
>create a new status code that means “invalid parameter” that’s specific
>to their component, leaving the caller to wonder what the unique status
>code means, and NOT signal any extra info back to the caller regarding
>which parameter was in error.
>
>Yeah, that second idea is obviously better.
>
>Peter
>OSR
>@OSRDrivers
>
>
>—
>NTDEV is sponsored by OSR
>
>Visit the list online at:
>http:
>
>MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>software drivers!
>Details at http:
>
>To unsubscribe, visit the List Server section of OSR Online at
>http:</http:></http:></http:>

xxxxx@osr.com wrote:

> #define STATUS_FWP_INVALID_PARAMETER ((NTSTATUS)0xC0220035L)
He got you there, Don (it’s even in NTSTATUS.H…)

Makes you wonder why they had to invent a new code, when
STATUS_INVALID_PARAMETER already exists, and even has a kernel-to-user
mapping.

“The great thing about standards is that there are so many to choose from.”

Now… There are actually 13 parameters (I shit you not) to this function. Which one is invalid?

Gosh… You know what would be great? Somebody should invent status codes that will tell you this. We could call them

STATUS_INVALID_PARAMETER_1
STATUS_INVALID_PARAMETER_2
STATUS_INVALID_PARAMETER_3

All the way to 13… or maybe just up to 12 to make it an even dozen.

Wouldn’t that be a great idea? Then, all we’d need to do is get the guys who write code that return a generic error code to actually USE them

For those who had some trouble picking it out through the rather thick
sarcasm here, allow me to point out that these codes already exist, and
have been there nearly since the dawn of time…


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

Tim,

That is part of what threw me, since other calls from the same API set
do return STATUS_INVALID_PARAMETER.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Friday, March 10, 2017 1:11 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] FwpsConstructIpHeaderForTransportPacket returning
0xc0220035

xxxxx@osr.com wrote:
>> #define STATUS_FWP_INVALID_PARAMETER ((NTSTATUS)0xC0220035L)
> He got you there, Don (it’s even in NTSTATUS.H…)

Makes you wonder why they had to invent a new code, when
STATUS_INVALID_PARAMETER already exists, and even has a kernel-to-user
mapping.

“The great thing about standards is that there are so many to choose from.”

> Now… There are actually 13 parameters (I shit you not) to this function.
Which one is invalid?
>
> Gosh… You know what would be great? Somebody should invent status
> codes that will tell you this. We could call them
>
> STATUS_INVALID_PARAMETER_1
> STATUS_INVALID_PARAMETER_2
> STATUS_INVALID_PARAMETER_3
> …
>
> All the way to 13… or maybe just up to 12 to make it an even dozen.
>
> Wouldn’t that be a great idea? Then, all we’d need to do is get the
> guys who write code that return a generic error code to actually USE
> them

For those who had some trouble picking it out through the rather thick
sarcasm here, allow me to point out that these codes already exist, and have
been there nearly since the dawn of time…


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


NTDEV is sponsored by OSR

Visit the list online at:
http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:></http:>