INetCfgComponent::GetCharacteristics returns incorrect value
-
2012년 2월 29일 수요일 오전 11:18If I want to hide an installed network adapter the only solution I currently know is to set the appropriate 'Characteristics' under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx. This works well. But when I call INetCfgComponent::GetCharacteristics it returns a value that indicates that the device is _not_ hidden (even after reboot). I expected that this function returns the charateristics currently applied to the adapter. Is this a bug or has the function an another meaning?
모든 응답
-
2012년 3월 7일 수요일 오후 2:46Does the Device Manager still display the network adapter? What value have you assigned to 'Characteristics'? What does INetCfgComponent::GetCharacteristics() return?
-
2012년 3월 12일 월요일 오후 12:32The network adapter is hidden in the device manager while INetCfgComponent::GetCharacteristics() returns a value that does not contain the expected NCF_HIDDEN flag (e.g. 0x84). The value I assigned to the 'Characteristics' value in the registry contains this flag (e.g. 0x8C).
-
2012년 3월 12일 월요일 오후 7:01
Does the INetCfgComponent::GetCharacteristics() call return 0 (S_OK)? Does INetCfgComponent::GetDisplayName() show the correct name? Have you tried to change other Characteristics of this network adapter. Do you see the changes when calling INetCfgComponent::GetCharacteristics()?
-
2012년 3월 13일 화요일 오전 6:57Yes it returns S_OK and GetDisplayName() shows the correct name. I haven't tried to change other characteristic because there are probably not much characteristics that makes sense with a network adapter and I have not enough knowledge about the remaining to evaluate their changes. I'm only interested in the hidden state.
-
2012년 3월 13일 화요일 오후 8:28
Actually, there is no supported way to modify Characteristics after installation. As you've noticed, reaching into the registry and modifying the 'Characteristics' field doesn't work (because NetCfg has already cached that data in other places).
- 답변으로 표시됨 Doron Holan [MSFT]Microsoft Community Contributor, Owner 2012년 3월 14일 수요일 오전 4:27
-
2012년 3월 14일 수요일 오전 6:53
That's a clear statement. So I at least know that I didn't made something wrong, except using an unsupported way ;-)
Thanks Jeffrey.

