From c7e1fb1b22ac4127dd34b084489fb90ddd9655b6 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 9 Apr 2015 08:50:39 +0000 Subject: [PATCH] --- MSICALib/MSICALib.h | 26 -------------------------- MSICALib/OpWLAN.cpp | 4 ++-- MSICALib/stdafx.h | 1 + 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/MSICALib/MSICALib.h b/MSICALib/MSICALib.h index e52ebed..2a6cbf4 100644 --- a/MSICALib/MSICALib.h +++ b/MSICALib/MSICALib.h @@ -684,32 +684,6 @@ UINT ExecuteSequence(MSIHANDLE hInstall); // Inline helper functions //////////////////////////////////////////////////////////////////// -namespace MSICA { - -inline VOID GuidToString(const GUID &guid, ATL::CAtlStringA &str) -{ - str.Format("{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - guid.Data1, - guid.Data2, - guid.Data3, - guid.Data4[0], guid.Data4[1], - guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); -} - - -inline VOID GuidToString(const GUID &guid, ATL::CAtlStringW &str) -{ - str.Format(L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - guid.Data1, - guid.Data2, - guid.Data3, - guid.Data4[0], guid.Data4[1], - guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); -} - -} // namespace MSICA - - inline UINT MsiRecordFormatStringA(MSIHANDLE hInstall, MSIHANDLE hRecord, unsigned int iField, ATL::CAtlStringA &sValue) { UINT uiResult; diff --git a/MSICALib/OpWLAN.cpp b/MSICALib/OpWLAN.cpp index 9325fd9..27c3639 100644 --- a/MSICALib/OpWLAN.cpp +++ b/MSICALib/OpWLAN.cpp @@ -78,7 +78,7 @@ HRESULT COpWLANProfileDelete::Execute(CSession *pSession) else { PMSIHANDLE hRecordProg = ::MsiCreateRecord(4); ATL::CAtlStringW sGUID; - GuidToString(m_guidInterface, sGUID); + GuidToString(&m_guidInterface, sGUID); ::MsiRecordSetInteger(hRecordProg, 1, ERROR_INSTALL_WLAN_PROFILE_DELETE); ::MsiRecordSetStringW(hRecordProg, 2, sGUID ); ::MsiRecordSetStringW(hRecordProg, 3, m_sValue ); @@ -135,7 +135,7 @@ HRESULT COpWLANProfileSet::Execute(CSession *pSession) DWORD dwSize = 1024, dwResult; LPWSTR szBuffer = sReason.GetBuffer(dwSize); - GuidToString(m_guidInterface, sGUID); + GuidToString(&m_guidInterface, sGUID); dwResult = ::WlanReasonCodeToString(wlrc, dwSize, szBuffer, NULL); sReason.ReleaseBuffer(dwSize); if (dwResult != NO_ERROR) sReason.Format(L"0x%x", wlrc); diff --git a/MSICALib/stdafx.h b/MSICALib/stdafx.h index 9b99433..69ae9d5 100644 --- a/MSICALib/stdafx.h +++ b/MSICALib/stdafx.h @@ -22,6 +22,7 @@ #include "MSICALib.h" #include "../../../lib/atl/atlcrypt.h" +#include "../../../lib/atl/atlwin.h" #include #include