FwpsConstructIpHeaderForTransportPacket returning 0xc0220035

I am calling FwpsConstructIpHeaderForTransportPacket and I always get a
status of 0xC0220035. Can anyone give me an idea what that status code
means, or common problems that are likely to cause this call to fail?

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

You must check the parameters.

#define STATUS_FWP_INVALID_PARAMETER ((NTSTATUS)0xC0220035L)

>#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

Yes he got me, I thought I had searched for that, but somehow I must not
have. As you point out if would have been really nice if they used
something useful in error codes. For that matter, even a sample that
didn’t have hundreds of wrappers, of the sort of call wrapperA to call
wrapperB to call wrapperC to call actual API would be nice.

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 xxxxx@osr.com
Sent: Thursday, March 09, 2017 4:15 PM
To: Windows System Software Devs Interest List
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:>