cmSystemTools: Use CreateFileW explicitly to pass wchar_t path
The call to CreateFile added by commit ac0bb433
(VS: Windows Store/Phone
package cert thumbprint, 2015-08-21) passes a wide character path
explicitly so we should call CreateFileW directly. Otherwise it does
not build without -DUNICODE (e.g. in bootstrap on MSYS).
This commit is contained in:
parent
ac0bb4333d
commit
e0cf77b310
|
@ -1025,13 +1025,14 @@ std::string cmSystemTools::ComputeCertificateThumbprint(
|
||||||
HCERTSTORE certStore = NULL;
|
HCERTSTORE certStore = NULL;
|
||||||
PCCERT_CONTEXT certContext = NULL;
|
PCCERT_CONTEXT certContext = NULL;
|
||||||
|
|
||||||
HANDLE certFile = CreateFile(cmsys::Encoding::ToWide(source.c_str()).c_str(),
|
HANDLE certFile =
|
||||||
GENERIC_READ,
|
CreateFileW(cmsys::Encoding::ToWide(source.c_str()).c_str(),
|
||||||
FILE_SHARE_READ,
|
GENERIC_READ,
|
||||||
NULL,
|
FILE_SHARE_READ,
|
||||||
OPEN_EXISTING,
|
NULL,
|
||||||
FILE_ATTRIBUTE_NORMAL,
|
OPEN_EXISTING,
|
||||||
NULL);
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (certFile != INVALID_HANDLE_VALUE && certFile != NULL)
|
if (certFile != INVALID_HANDLE_VALUE && certFile != NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue