public void SetEndpointVisibility(string deviceId, bool isVisible) { try { policyConfig.SetEndpointVisibility(deviceId, isVisible ? (short)1 : (short)0); } catch { } }
public void SetEndpointVisibility(string devID, bool eVisible) { if (_PolicyConfig != null) { Marshal.ThrowExceptionForHR(_PolicyConfig.SetEndpointVisibility(devID, eVisible)); return; } if (_PolicyConfigVista != null) { Marshal.ThrowExceptionForHR(_PolicyConfigVista.SetEndpointVisibility(devID, eVisible)); return; } if (_PolicyConfig10 != null) { Marshal.ThrowExceptionForHR(_PolicyConfig10.SetEndpointVisibility(devID, eVisible)); } }