How to tell if a key matches a product/version?

I have to check for multiple possible license product/versions in my app, so I have an array of PDets and GUIDs. When the user enters a key to activate it, I'd like to see which product/version it goes with. Is there any way to validate a product key and see if it's valid for a particular PDets/GUID (preferably without trying to activate it on every one)?

You call TA_CheckAndSavePKey() on every product version and it will verify locally (no connection made) whether the key is valid or not.