{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/Windows-driver-samples/issues/3","labels_url":"https://api.github.com/repos/Microsoft/Windows-driver-samples/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/Windows-driver-samples/issues/3/comments","events_url":"https://api.github.com/repos/Microsoft/Windows-driver-samples/issues/3/events","html_url":"https://github.com/Microsoft/Windows-driver-samples/issues/3","id":71193660,"number":3,"title":"NDIS version macro in NDIS examples","user":{"login":"maxtruxa","id":1788010,"avatar_url":"https://avatars.githubusercontent.com/u/1788010?v=3","gravatar_id":"","url":"https://api.github.com/users/maxtruxa","html_url":"https://github.com/maxtruxa","followers_url":"https://api.github.com/users/maxtruxa/followers","following_url":"https://api.github.com/users/maxtruxa/following{/other_user}","gists_url":"https://api.github.com/users/maxtruxa/gists{/gist_id}","starred_url":"https://api.github.com/users/maxtruxa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxtruxa/subscriptions","organizations_url":"https://api.github.com/users/maxtruxa/orgs","repos_url":"https://api.github.com/users/maxtruxa/repos","events_url":"https://api.github.com/users/maxtruxa/events{/privacy}","received_events_url":"https://api.github.com/users/maxtruxa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-27T06:40:20Z","updated_at":"2015-07-24T20:52:15Z","closed_at":null,"body":"The [netvmini](https://github.com/Microsoft/Windows-driver-samples/blob/master/network/ndis/netvmini) example uses custom macros ([`MP_NDIS_MAJOR_VERSION`/`MP_NDIS_MINOR_VERSION`](https://github.com/Microsoft/Windows-driver-samples/blob/master/network/ndis/netvmini/6x/miniport.h#L47), written to `NDIS_MINIPORT_DRIVER_CHARACTERISTICS` [here](https://github.com/Microsoft/Windows-driver-samples/blob/master/network/ndis/netvmini/6x/miniport.c#L137)) to specify the used major/minor NDIS version instead of using the macros defined by NDIS.h itself (`NDIS_MINIPORT_MAJOR_VERSION`/ `NDIS_MINIPORT_MINOR_VERSION`). Same goes for the other NDIS examples.\r\nIs there any particular reason to do so?"},"comment":{"url":"https://api.github.com/repos/Microsoft/Windows-driver-samples/issues/comments/124719201","html_url":"https://github.com/Microsoft/Windows-driver-samples/issues/3#issuecomment-124719201","issue_url":"https://api.github.com/repos/Microsoft/Windows-driver-samples/issues/3","id":124719201,"user":{"login":"jtippet","id":10259764,"avatar_url":"https://avatars.githubusercontent.com/u/10259764?v=3","gravatar_id":"","url":"https://api.github.com/users/jtippet","html_url":"https://github.com/jtippet","followers_url":"https://api.github.com/users/jtippet/followers","following_url":"https://api.github.com/users/jtippet/following{/other_user}","gists_url":"https://api.github.com/users/jtippet/gists{/gist_id}","starred_url":"https://api.github.com/users/jtippet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtippet/subscriptions","organizations_url":"https://api.github.com/users/jtippet/orgs","repos_url":"https://api.github.com/users/jtippet/repos","events_url":"https://api.github.com/users/jtippet/events{/privacy}","received_events_url":"https://api.github.com/users/jtippet/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T20:52:15Z","updated_at":"2015-07-24T20:52:15Z","body":"There is not a particular reason to do so.  I suspect that the person who wrote that sample was unaware at the time of `NDIS_MINIPORT_MAJOR_VERSION`.  (Actually I would level all sorts of accusations at the competency of the engineer who wrote that sample, because he was I 😉.)  Anyway, I encourage you to go ahead and use `NDIS_MINIPORT_MAJOR_VERSION` directly.  It eliminates a couple extra lines of code, and makes your driver that much easier to port to a new NDIS version."}}