For those who are developing SHA/SHV components, please take a moment to read the following changes in the document. The sample code will be modified in the future version of the SDK.
If you need further clarification, please use the public forum http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=576&SiteID=17 to post your question.
The documentation for the SoHAttributeValue union is incomplete. The description of the vendorId member of SoHAttributeValue should read as follows:
The ID value for the SHA/SHV pair. This is a 4-byte code; the first 3 bytes are the IETF-assigned SMI code of the vendor and the last byte identifies the component itself. See NapMicrosoftVendorIds.h for IDs used to identify internal Microsoft enforcers and system health components.
When implementing a SHA or SHV, do not use the ID values assigned to internal Microsoft enforcers.
In the future, the SoHAttributeValue documentation on MSDN will be updated with this new description.
Before you can use the sample shipping with the SDK, you must change the vendorId value used by the sample SHA and SHV. You must also remove an unnecessary line of code. Here are the required changes:
- Open Callback.cpp. If you installed the SDK to the default location, this file will be found in C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\NetDs\NAP\SHA\EXE.
- Find the line value.vendorSpecificVal.vendorId = MicrosoftVendorId;
- Change this line to value.vendorSpecificVal.vendorId = QuarSampleSystemHealthId;
- Save your changes.
- Open SampleShv.cpp. If you installed the SDK to the default location, this file will be found in C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\NetDs\NAP\SHV.
- Delete line 348, which reads goto Cleanup;
- Replace all instances of the line (pAttrValue->vendorSpecificVal.vendorId == MicrosoftVendorId) with (pAttrValue->vendorSpecificVal.vendorId == QuarSampleSystemHealthId). In the original version of SampleShv.cpp, there are two instances of this conditional statement, one at line 514 and one at line 524.
- Save your changes and build the sample.