Deactivate(1) fails for revoked licenses

Hi,

I can do all regular operations, add license, Activate it, Deactivate... etc.I want to delete an installed license but revoked (manually revoked from webui), so I call Deactivate(1). I get error 3. If I try to read again the license using getpkey I manage to do this so the key is still there...

Any workaround would be appreciated as it seems to be an issue with the library.

Thanks

You can deactivate keys when the key is revoked. Error 3 can be found in TurboActivate.h and it tells you exactly what is wrong:

/* MessageId: TA_E_ACTIVATE Message code (in Hex): 0x3 Message code (in Decimal): 3

MessageText:

The product needs to be activated.*/#define TA_E_ACTIVATE ((HRESULT)0x00000003L)

In other words, you've already deactivated the computer for that product key. So when you call it again it's failing (because it's not activated). Activate the key first, and then ensure IsActivated returns TA_OK, then you can call Deactivate().