If this throws an exception, `productKey` will be leaked. Perhaps change `productKey` to a `std::vector<TCHAR>`?