diff --git a/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp b/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp index 59a4330252b1f..edfea6dc1360e 100644 --- a/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp +++ b/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,10 +72,10 @@ class ProductInfo { void findInstalledProducts(const Guid& upgradeCode, std::vector& products) { - const LPCTSTR upgradeCodeStr = upgradeCode.toMsiString().c_str(); + const tstring upgradeCodeStr = upgradeCode.toMsiString(); for (DWORD productCodeIdx = 0; true; ++productCodeIdx) { TCHAR productCode[39 /* http://msdn.microsoft.com/en-us/library/aa370101(v=vs.85).aspx */]; - const UINT status = MsiEnumRelatedProducts(upgradeCodeStr, 0, + const UINT status = MsiEnumRelatedProducts(upgradeCodeStr.c_str(), 0, productCodeIdx, productCode); if (ERROR_NO_MORE_ITEMS == status) { break;