When calling SecureLicenseManager.Deactivate, the result is always false.
If SecureLicenseManager.Deactivate(_license, Me, Nothing, Nothing) Then MessageBox.Show("Deactivated") End If
if (SecureLicenseManager.Deactivate(_license, this, null, null)) { MessageBox.Show("Deactivated"); }
Cause: Not Passing a Valid License
You are not passing an activated license to the Deactivate call.
_license = SecureLicenseManager.Validate(Me, Nothing, Nothing) If Not _license.IsActivated Then MessageBox.Show("Oops, no activated license found!") ElseIf SecureLicenseManager.Deactivate(_license, Me, Nothing, Nothing) Then MessageBox.Show("Deactivated") End If
_license = SecureLicenseManager.Validate( this, null, null ); if( !_license.IsActivated ) MessageBox.Show( "Oops, no activated license found!" ); else if( SecureLicenseManager.Deactivate( _license, this, null, null ) ) MessageBox.Show( "Deactivated" );
See How-to: Deactivate a License when Customer Uninstalls for a sample.
Cause: Bug in 3.2 R3140
If you have a valid activated license you may still get false when using the latest released version 3.2 R3140. We've fixed the issue and it's available in the latest release.