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().