rem *** Windows 7 SDK with Visual Studio 2017 Compiler
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64;C:\SDK\Windows 7 SDK\Bin\x64;C:\SDK\Windows 7 SDK\Bin;%PATH%
-set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\SDK\Windows 7 SDK\Include;C:\SDK\WINDDK\inc\wnet;%JAVA_HOME%\include;%JAVA_HOME%\include\win32
+set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\SDK\Windows 7 SDK\Include;C:\SDK\WINDDK\inc\wnet;%JAVA_HOME%\include;%JAVA_HOME%\include\win32;C:\SDK\VSSSDK72\inc
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\lib\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64;C:\SDK\Windows 7 SDK\Lib\x64;C:\SDK\WINDDK\lib\wnet\amd64
set LIBPATH=%LIB%
rem *** Windows 7 SDK with Visual Studio 2017 Compiler
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x86;C:\SDK\Windows 7 SDK\Bin;%PATH%
-set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\SDK\Windows 7 SDK\Include;C:\SDK\WINDDK\inc\wnet;%JAVA_HOME%\include;%JAVA_HOME%\include\win32
+set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\SDK\Windows 7 SDK\Include;C:\SDK\WINDDK\inc\wnet;%JAVA_HOME%\include;%JAVA_HOME%\include\win32;C:\SDK\VSSSDK72\inc
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\ATLMFC\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\lib\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x86;C:\SDK\Windows 7 SDK\Lib;C:\SDK\WINDDK\lib\wnet\i386
set LIBPATH=%LIB%
<ClCompile Include="parser.cpp" />
<ClCompile Include="rule.cpp" />
<ClCompile Include="vss.cpp" />
+ <ClCompile Include="vss_srv2003.cpp" />
+ <ClCompile Include="vss_xp.cpp" />
<ClCompile Include="wevt.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="vss.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="vss_srv2003.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="vss_xp.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="libnxlp.h">
#include <win2003/vsbackup.h>
#include <comdef.h>
+#define DEBUG_TAG _T("logwatch.vss")
+
/**
* Entry point
*/
inline FileSnapshot *CreateFailure(HRESULT hr, IVssBackupComponents *bc, const TCHAR *format)
{
_com_error err(hr);
- TCHAR buffer[8192];
- _sntprintf(buffer, 8192, format, err.ErrorMessage(), hr);
- nxlog_debug(3, _T("LogWatch: %s"), buffer);
+ nxlog_debug_tag(DEBUG_TAG, 3, format, err.ErrorMessage(), hr);
if (bc != NULL)
bc->Release();
return NULL;
TCHAR device[64];
_tcslcpy(device, path, std::min(static_cast<size_t>(64), len + 1));
_tcslcat(device, _T("\\"), 64);
- nxlog_debug(7, _T("LogWatch: Adding device %s to VSS snapshot"), device);
+ nxlog_debug_tag(DEBUG_TAG, 7, _T("LogWatch: Adding device %s to VSS snapshot"), device);
VSS_ID snapshotId;
hr = bc->AddToSnapshotSet(device, GUID_NULL, &snapshotId);
if (FAILED(hr))
return CreateFailure(hr, bc, _T("Call to IVssBackupComponents::GetSnapshotProperties failed (%s) HRESULT=0x%08X"));
- nxlog_debug(7, _T("LogWatch: Created VSS snapshot %s"), prop.m_pwszSnapshotDeviceObject);
+ nxlog_debug_tag(DEBUG_TAG, 7, _T("LogWatch: Created VSS snapshot %s"), prop.m_pwszSnapshotDeviceObject);
String sname(prop.m_pwszSnapshotDeviceObject);
sname.append(s);
#include <winxp/vsbackup.h>
#include <comdef.h>
+#define DEBUG_TAG _T("logwatch.vss")
+
/**
* Entry point
*/
inline FileSnapshot *CreateFailure(HRESULT hr, IVssBackupComponents *bc, const TCHAR *format)
{
_com_error err(hr);
- TCHAR buffer[8192];
- _sntprintf(buffer, 8192, format, err.ErrorMessage(), hr);
- nxlog_debug(3, _T("LogWatch: %s"), buffer);
+ nxlog_debug_tag(DEBUG_TAG, 3, format, err.ErrorMessage(), hr);
if (bc != NULL)
bc->Release();
return NULL;
TCHAR device[64];
_tcslcpy(device, path, std::min(static_cast<size_t>(64), len + 1));
_tcslcat(device, _T("\\"), 64);
- nxlog_debug(7, _T("LogWatch: Adding device %s to VSS snapshot"), device);
+ nxlog_debug_tag(DEBUG_TAG, 7, _T("LogWatch: Adding device %s to VSS snapshot"), device);
VSS_ID snapshotId;
hr = bc->AddToSnapshotSet(device, GUID_NULL, &snapshotId);
if (FAILED(hr))
return CreateFailure(hr, bc, _T("Call to IVssBackupComponents::GetSnapshotProperties failed (%s) HRESULT=0x%08X"));
- nxlog_debug(7, _T("LogWatch: Created VSS snapshot %s"), prop.m_pwszSnapshotDeviceObject);
+ nxlog_debug_tag(DEBUG_TAG, 7, _T("LogWatch: Created VSS snapshot %s"), prop.m_pwszSnapshotDeviceObject);
String sname(prop.m_pwszSnapshotDeviceObject);
sname.append(s);