{"id":74,"date":"2006-11-03T07:00:10","date_gmt":"2006-11-03T12:00:10","guid":{"rendered":"http:\/\/www.nynaeve.net\/?p=74"},"modified":"2019-12-13T17:39:49","modified_gmt":"2019-12-13T22:39:49","slug":"resolution-to-createipforwardentry-failing-on-vista","status":"publish","type":"post","link":"http:\/\/www.nynaeve.net\/?p=74","title":{"rendered":"Resolution to CreateIpForwardEntry failing on Vista"},"content":{"rendered":"<p><a title=\"CreateIpForwardEntry failing on Vista\" href=\"?p=59\">Previously<\/a>, I had posted about a compatibility problem with Windows Vista if you used <em>CreateIpForwardEntry<\/em> to manage the IP routing table.  In particular, if you call this routine on Vista with the intent to create a new route in the IP routing table, you may get an inexpicibly ERROR_BAD_ARGUMENTS error code returned.<\/p>\n<p>There is an officially supported workaround, though it is not very well documented, and was in fact only recently made available in the Platform SDK documentation to my knowledge.<\/p>\n<p>The official line is that you must call the <em><a title=\"GetIpInterfaceEntry\" href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/iphlp\/iphlp\/getipinterfaceentry.asp\">GetIpInterfaceEntry<\/a><\/em> function on Vista, if you wish to continue to be able to add routes.<\/p>\n<p>(Yes, this does suck.  It is a total breaking change for anyone who did route manipulation on OS&#8217;s prior to Vista, until you patch your programs out in the field.  If this is unacceptable to you, I would encourage you to provide feedback to Microsoft about how this issue impacts customer experiences and your ability to deploy and use your product on Vista.)<\/p>\n<p>I would encourage you to use this documented API instead of the undocumented solution that I posted about earlier, simply because it will (ostensibly) continue to work on future OS versions.  (Although, given that the reason you have to call this is because of a breaking future-compatibility change in Vista, I am not sure that it is really justified to use that line here&#8230;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously, I had posted about a compatibility problem with Windows Vista if you used CreateIpForwardEntry to manage the IP routing table. In particular, if you call this routine on Vista with the intent to create a new route in the IP routing table, you may get an inexpicibly ERROR_BAD_ARGUMENTS error code returned. There is an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,8,5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/74"}],"collection":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":1,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":646,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions\/646"}],"wp:attachment":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}