Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CreatIpForwardEntry not working under Vista

57 views
Skip to first unread message

aes

unread,
Nov 1, 2006, 5:36:02 PM11/1/06
to
I have an application that does 'route add' using CreateIpForwardEntry.
The code base is from the sample associated with CreateIpForwardEntry from
MSDN doc. The application does not work with Vista. The return value is 0xa0
(ERROR_BAD_ARGUMENTS). I did some research and found that others are also
having this compatibility problem with Vista. The problem is around
dwForwardMetric1 of PMIB_IPFORWARDROW. If I use GetBestRoute using the
destination address for CreateIpForwardEntry and copy the
dwForwardMetric* info from there then CreateIpForwardEntry succeeds. I don't
know whether I'm doing the right thing with this workaround, therefore, I
would like to know how to get the value of
dwForwardMetric* to use with CreateIpForwardEntry?

Also, there is a note in MSDN doc regarding CreateIpForwardEntry

"On Windows Vista and Windows Server "Longhorn", the CreateIpForwardEntry
only works on interfaces with a single sub-interface (where the interface
LUID and subinterface LUID are the same). The dwForwardIfIndex member of the
MIB_IPFORWARDROW structure specifies the interface."


What is subinterface LUID? How to get this? I see some API for interface
LUID such as ConvertInterfaceIndexToLuid, none for subinterface LUID( also I
don't what it is).

Skywing [MVP]

unread,
Nov 2, 2006, 2:11:13 PM11/2/06
to
This the result of a nice little breaking change that was (only in the most
minimal sense) documented after the August SDK bits. Check out my post
here < http://www.nynaeve.net/?p=59 > for the raw details.

Executive summary: Anyone using CreateIpForwardEntry pre-Vista is broken on
Vista until they use a new API - GetIpInterfaceEntry - to retrieve a minimum
metric that can be used for any routes created over a particular interface.

--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net

"aes" <a...@discussions.microsoft.com> wrote in message
news:6AF93186-6199-4176...@microsoft.com...

aes

unread,
Nov 2, 2006, 3:06:02 PM11/2/06
to
Thank you very much for the info.

Since the work around is not backward compatible with WinXP, it would really
be best if this was fixed by MS.

Allan

Skywing [MVP]

unread,
Nov 2, 2006, 3:18:39 PM11/2/06
to
I agree, however at this point I wouldn't hold my breath for it being fixed
before RTM...

--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net

"aes" <a...@discussions.microsoft.com> wrote in message

news:9698AD8A-B503-4EA6...@microsoft.com...

0 new messages