internal void SecureIUnknown(object unknown) { if (this.scope != null) { IntPtr password = this.scope.Options.GetPassword(); int errorCode = WmiNetUtilsHelper.BlessIWbemServicesObject_f(unknown, this.scope.Options.Username, password, this.scope.Options.Authority, (int)this.scope.Options.Impersonation, (int)this.scope.Options.Authentication); Marshal.ZeroFreeBSTR(password); if (errorCode < 0) { Marshal.ThrowExceptionForHR(errorCode); } } }