CheckAndSavePKey is returning 1 for exceeding max installs

I am a new user and I'm basing new code on your examples.

I am getting a return value of 1 when I test exceeding the maximum number of installs. I am using InnoSetup. Do your examples need updating or is something else going on. I have changed my logic so "1" means too many installs, but I'd like clarification.

The actual call: ret := CheckAndSavePKey(PkeyPage.Values[0], 1);

The demo code I got was not entirely right. Further tracing with showed I was landing at the Activate line. So it's activate that's returning 1. There needs to be a "and not activated" in the page insertion logic.

I'm not really sure what the question is. The InnoSetup logic is correct for what it's designed to do (which is a little bit different than what you would want to do with a regular application). If you want to see a better demo of a real-live application, then look at the Delphi example.