CheckAndSavePKey details

I am thinking about integrating the licensing into our installer, and thus I could use some details on how CheckAndSavePKey works. Note that I'm NOT working with multiple products nor multiple versions of the same product.

Let's say I call CheckAndSavePKey on a certain serial number, and it is rejected. I would presume that this serial number would NOT be saved, since it was rejected, correct?

Let's say that I then call CheckAndSavePKey on another serial number, and it is accepted. I presume that this serial number would be saved, and in particular would overwrite any previous serial number (valid or invalid), correct?

Let's say I call CheckAndSavePKey on a certain serial number, and it is rejected. I would presume that this serial number would NOT be saved, since it was rejected, correct?

Correct. Only valid serials are saved. The valid serial may or may not be able to be activated, but you should only worry about that when you call Activate().

Let's say that I then call CheckAndSavePKey on another serial number, and it is accepted. I presume that this serial number would be saved, and in particular would overwrite any previous serial number (valid or invalid), correct?

It depends. If the first serial number is saved, but not activated, then a second serial number can be saved. If the first serial is saved and activated then you won't be able to save the second serial (you'd have to deactivate the first serial first).

Let's say then that I save a serial number, but don't activate, and then save another serial number. When I call Activate(), then what happens? Which serial number is activated?

What happens if I only save one serial number, activate, and then try to save another serial number? Of course I could avoid this by checking for activation, but just so I know.

Let's say then that I save a serial number, but don't activate, and then save another serial number. When I call Activate(), then what happens? Which serial number is activated?

The second one.

What happens if I only save one serial number, activate, and then try to save another serial number? Of course I could avoid this by checking for activation, but just so I know.

You'll get an error (TA_E_ACTIVATE) when you try to save the second serial.