From 90bd57fe40e66fc829ecb01482d32d604b0df19c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 25 Nov 2015 01:41:37 +0100 Subject: Windows: Full UNICODE rewrite and implement support for UNICODE passwords. --- src/Common/BaseCom.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/Common/BaseCom.cpp') diff --git a/src/Common/BaseCom.cpp b/src/Common/BaseCom.cpp index 74d44320..a3bc42fe 100644 --- a/src/Common/BaseCom.cpp +++ b/src/Common/BaseCom.cpp @@ -128,16 +128,9 @@ BOOL BaseCom::IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly) DWORD BaseCom::ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone) { - USES_CONVERSION; - CW2A szFilePathA(filePath); - if (!szFilePathA.m_psz) - { - return ERROR_NOT_ENOUGH_MEMORY; - } - try { - auto_ptr file (device ? new Device (string (szFilePathA.m_psz), !write) : new File (string (szFilePathA.m_psz), !write)); + auto_ptr file (device ? new Device (filePath, !write) : new File (filePath, !write)); file->CheckOpened (SRC_POS); file->SeekAt (offset); @@ -246,7 +239,7 @@ DWORD BaseCom::SetDriverServiceStartType (DWORD startType) DWORD BaseCom::WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value) { - if (!::WriteLocalMachineRegistryDwordW (keyPath, valueName, value)) + if (!::WriteLocalMachineRegistryDword (keyPath, valueName, value)) return GetLastError(); return ERROR_SUCCESS; -- cgit v1.2.3