[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH 1/4] Add a new monitor service



This patch adds the boilerplate for a service called XENBUS_MONITOR.
The service does not yet have any functionality. This will be added
by subsequent patches.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/coinst/coinst.c                               |  80 +++-
 src/monitor/messages.mc                           |  24 +
 src/monitor/monitor.c                             | 524 ++++++++++++++++++++++
 src/monitor/xenbus_monitor.rc                     |  57 +++
 src/xenbus.inf                                    |  39 +-
 vs2012/package/package.vcxproj                    |   3 +
 vs2012/xenbus.sln                                 |  82 ++--
 vs2012/xenbus_monitor/xenbus_monitor.vcxproj      |  82 ++++
 vs2012/xenbus_monitor/xenbus_monitor.vcxproj.user |   8 +
 vs2013/package/package.vcxproj                    |   3 +
 vs2013/xenbus.sln                                 | 170 ++++---
 vs2013/xenbus_monitor/xenbus_monitor.vcxproj      |  82 ++++
 vs2013/xenbus_monitor/xenbus_monitor.vcxproj.user |   8 +
 13 files changed, 1063 insertions(+), 99 deletions(-)
 create mode 100644 src/monitor/messages.mc
 create mode 100644 src/monitor/monitor.c
 create mode 100644 src/monitor/xenbus_monitor.rc
 create mode 100644 vs2012/xenbus_monitor/xenbus_monitor.vcxproj
 create mode 100644 vs2012/xenbus_monitor/xenbus_monitor.vcxproj.user
 create mode 100644 vs2013/xenbus_monitor/xenbus_monitor.vcxproj
 create mode 100644 vs2013/xenbus_monitor/xenbus_monitor.vcxproj.user

diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c
index f8ef92e..66359e0 100644
--- a/src/coinst/coinst.c
+++ b/src/coinst/coinst.c
@@ -62,6 +62,8 @@ __user_code;
 
 #define ENUM_KEY    "SYSTEM\\CurrentControlSet\\Enum"
 
+#define MONITOR_NAME    "XENBUS_MONITOR"
+
 static VOID
 #pragma prefast(suppress:6262) // Function uses '1036' bytes of stack: exceeds 
/analyze:stacksize'1024'
 __Log(
@@ -1465,6 +1467,78 @@ fail1:
     return FALSE;
 }
 
+static BOOL
+MonitorDelete(
+    VOID
+    )
+{
+    SC_HANDLE           SCManager;
+    SC_HANDLE           Service;
+    BOOL                Success;
+    SERVICE_STATUS      Status;
+    HRESULT             Error;
+
+    Log("====>");
+
+    SCManager = OpenSCManager(NULL,
+                              NULL,
+                              SC_MANAGER_ALL_ACCESS);
+
+    if (SCManager == NULL)
+        goto fail1;
+
+    Service = OpenService(SCManager,
+                          MONITOR_NAME,
+                          SERVICE_ALL_ACCESS);
+
+    if (Service == NULL)
+        goto fail2;
+
+    Success = ControlService(Service,
+                             SERVICE_CONTROL_STOP,
+                             &Status);
+
+    if (!Success)
+        goto fail3;
+
+    Success = DeleteService(Service);
+
+    if (!Success)
+        goto fail4;
+
+    CloseServiceHandle(Service);
+    CloseServiceHandle(SCManager);
+
+    Log("<====");
+
+    return TRUE;
+
+fail4:
+    Log("fail4");
+
+fail3:
+    Log("fail3");
+
+    CloseServiceHandle(Service);
+
+fail2:
+    Log("fail2");
+
+    CloseServiceHandle(SCManager);
+
+fail1:
+    Error = GetLastError();
+
+    {
+        PTCHAR  Message;
+        Message = GetErrorMessage(Error);
+        Log("fail1 (%s)", Message);
+        LocalFree(Message);
+    }
+
+    return FALSE;
+}
+
 static HRESULT
 DifInstallPreProcess(
     IN  HDEVINFO                    DeviceInfoSet,
@@ -1628,7 +1702,11 @@ DifRemovePreProcess(
     UNREFERENCED_PARAMETER(DeviceInfoData);
     UNREFERENCED_PARAMETER(Context);
 
-    Log("<===>");
+    Log("====>");
+
+    (VOID) MonitorDelete();
+
+    Log("<====");
 
     return NO_ERROR;
 }
diff --git a/src/monitor/messages.mc b/src/monitor/messages.mc
new file mode 100644
index 0000000..ab49243
--- /dev/null
+++ b/src/monitor/messages.mc
@@ -0,0 +1,24 @@
+MessageIdTypedef=DWORD
+
+SeverityNames=(
+       Success=0x0:STATUS_SEVERITY_SUCCESS
+       Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
+       Warning=0x2:STATUS_SEVERITY_WARNING
+       Error=0x3:STATUS_SEVERITY_ERROR
+       )
+
+
+FacilityNames=(
+       System=0x0:FACILITY_SYSTEM
+       Runtime=0x2:FACILITY_RUNTIME
+       Stubs=0x3:FACILITY_STUBS
+       Io=0x4:FACILITY_IO_ERROR_CODE
+       )
+
+MessageId=0x1
+Severity=Informational
+Facility=System
+SymbolicName=MONITOR_LOG
+Language=English
+%1
+.
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
new file mode 100644
index 0000000..7aeb5d2
--- /dev/null
+++ b/src/monitor/monitor.c
@@ -0,0 +1,524 @@
+/* Copyright (c) Citrix Systems Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source 1and binary forms,
+ * with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * *   Redistributions of source code must retain the above
+ *     copyright notice, this list of conditions and the23
+ *     following disclaimer.
+ * *   Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the
+ *     following disclaimer in the documentation and/or other
+ *     materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <windows.h>
+#include <tchar.h>
+#include <stdlib.h>
+#include <strsafe.h>
+
+#include <version.h>
+
+#include "messages.h"
+
+#define MONITOR_NAME        __MODULE__
+#define MONITOR_DISPLAYNAME MONITOR_NAME
+
+typedef struct _MONITOR_CONTEXT {
+    SERVICE_STATUS          Status;
+    SERVICE_STATUS_HANDLE   Service;
+    HANDLE                  EventLog;
+    HANDLE                  StopEvent;
+} MONITOR_CONTEXT, *PMONITOR_CONTEXT;
+
+MONITOR_CONTEXT MonitorContext;
+
+#define MAXIMUM_BUFFER_SIZE 1024
+
+static VOID
+#pragma prefast(suppress:6262) // Function uses '1036' bytes of stack: exceeds 
/analyze:stacksize'1024'
+__Log(
+    IN  const CHAR      *Format,
+    IN  ...
+    )
+{
+#if DBG
+    PMONITOR_CONTEXT    Context = &MonitorContext;
+    const TCHAR         *Strings[1];
+#endif
+    TCHAR               Buffer[MAXIMUM_BUFFER_SIZE];
+    va_list             Arguments;
+    size_t              Length;
+    HRESULT             Result;
+
+    va_start(Arguments, Format);
+    Result = StringCchVPrintf(Buffer, MAXIMUM_BUFFER_SIZE, Format, Arguments);
+    va_end(Arguments);
+
+    if (Result != S_OK && Result != STRSAFE_E_INSUFFICIENT_BUFFER)
+        return;
+
+    Result = StringCchLength(Buffer, MAXIMUM_BUFFER_SIZE, &Length);
+    if (Result != S_OK)
+        return;
+
+    Length = __min(MAXIMUM_BUFFER_SIZE - 1, Length + 2);
+
+    __analysis_assume(Length < MAXIMUM_BUFFER_SIZE);
+    __analysis_assume(Length >= 2);
+    Buffer[Length] = '\0';
+    Buffer[Length - 1] = '\n';
+    Buffer[Length - 2] = '\r';
+
+    OutputDebugString(Buffer);
+
+#if DBG
+    Strings[0] = Buffer;
+
+    if (Context->EventLog != NULL)
+        ReportEvent(Context->EventLog,
+                    EVENTLOG_INFORMATION_TYPE,
+                    0,
+                    MONITOR_LOG,
+                    NULL,
+                    ARRAYSIZE(Strings),
+                    0,
+                    Strings,
+                    NULL);
+#endif
+}
+
+#define Log(_Format, ...) \
+        __Log(__MODULE__ "|" __FUNCTION__ ": " _Format, __VA_ARGS__)
+
+static PTCHAR
+GetErrorMessage(
+    IN  HRESULT Error
+    )
+{
+    PTCHAR      Message;
+    ULONG       Index;
+
+    FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                  FORMAT_MESSAGE_FROM_SYSTEM |
+                  FORMAT_MESSAGE_IGNORE_INSERTS,
+                  NULL,
+                  Error,
+                  MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                  (LPTSTR)&Message,
+                  0,
+                  NULL);
+
+    for (Index = 0; Message[Index] != '\0'; Index++) {
+        if (Message[Index] == '\r' || Message[Index] == '\n') {
+            Message[Index] = '\0';
+            break;
+        }
+    }
+
+    return Message;
+}
+
+static const CHAR *
+ServiceStateName(
+    IN  DWORD   State
+    )
+{
+#define _STATE_NAME(_State) \
+    case SERVICE_ ## _State: \
+        return #_State
+
+    switch (State) {
+    _STATE_NAME(START_PENDING);
+    _STATE_NAME(RUNNING);
+    _STATE_NAME(STOP_PENDING);
+    _STATE_NAME(STOPPED);
+    default:
+        break;
+    }
+
+    return "UNKNOWN";
+
+#undef  _STATE_NAME
+}
+
+static VOID
+ReportStatus(
+    IN  DWORD           CurrentState,
+    IN  DWORD           Win32ExitCode,
+    IN  DWORD           WaitHint)
+{
+    PMONITOR_CONTEXT    Context = &MonitorContext;
+    static DWORD        CheckPoint = 1;
+    BOOL                Success;
+    HRESULT             Error;
+
+    Log("====> (%s)", ServiceStateName(CurrentState));
+
+    Context->Status.dwCurrentState = CurrentState;
+    Context->Status.dwWin32ExitCode = Win32ExitCode;
+    Context->Status.dwWaitHint = WaitHint;
+
+    if (CurrentState == SERVICE_START_PENDING)
+        Context->Status.dwControlsAccepted = 0;
+    else
+        Context->Status.dwControlsAccepted = SERVICE_ACCEPT_STOP |
+                                             SERVICE_ACCEPT_SHUTDOWN;
+
+    if (CurrentState == SERVICE_RUNNING ||
+        CurrentState == SERVICE_STOPPED )
+        Context->Status.dwCheckPoint = 0;
+    else
+        Context->Status.dwCheckPoint = CheckPoint++;
+
+    Success = SetServiceStatus(Context->Service, &Context->Status);
+
+    if (!Success)
+        goto fail1;
+
+    Log("<====");
+
+    return;
+
+fail1:
+    Error = GetLastError();
+
+    {
+        PTCHAR  Message;
+        Message = GetErrorMessage(Error);
+        Log("fail1 (%s)", Message);
+        LocalFree(Message);
+    }
+}
+
+DWORD WINAPI
+MonitorCtrlHandlerEx(
+    IN  DWORD           Ctrl,
+    IN  DWORD           EventType,
+    IN  LPVOID          EventData,
+    IN  LPVOID          Argument
+    )
+{
+    PMONITOR_CONTEXT    Context = &MonitorContext;
+
+    UNREFERENCED_PARAMETER(EventType);
+    UNREFERENCED_PARAMETER(EventData);
+    UNREFERENCED_PARAMETER(Argument);
+
+    switch (Ctrl) {
+    case SERVICE_CONTROL_STOP:
+    case SERVICE_CONTROL_SHUTDOWN:
+        ReportStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
+        SetEvent(Context->StopEvent);
+        return NO_ERROR;
+
+    case SERVICE_CONTROL_INTERROGATE:
+        ReportStatus(SERVICE_RUNNING, NO_ERROR, 0);
+        return NO_ERROR;
+
+    default:
+        break;
+    }
+
+    ReportStatus(SERVICE_RUNNING, NO_ERROR, 0);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+VOID WINAPI
+MonitorMain(
+    _In_    DWORD       argc,
+    _In_    LPTSTR      *argv
+    )
+{
+    PMONITOR_CONTEXT    Context = &MonitorContext;
+    HRESULT             Error;
+
+    UNREFERENCED_PARAMETER(argc);
+    UNREFERENCED_PARAMETER(argv);
+
+    Log("====>");
+
+    Context->Service = RegisterServiceCtrlHandlerEx(MONITOR_NAME,
+                                                    MonitorCtrlHandlerEx,
+                                                    NULL);
+    if (Context->Service == NULL)
+        goto fail1;
+
+    Context->EventLog = RegisterEventSource(NULL,
+                                            MONITOR_NAME);
+    if (Context->EventLog == NULL)
+        goto fail2;
+
+    Context->Status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
+    Context->Status.dwServiceSpecificExitCode = 0;
+
+    ReportStatus(SERVICE_START_PENDING, NO_ERROR, 3000);
+
+    Context->StopEvent = CreateEvent(NULL,
+                                     TRUE,
+                                     FALSE,
+                                     NULL);
+
+    if (Context->StopEvent == NULL)
+        goto fail3;
+
+    ReportStatus(SERVICE_RUNNING, NO_ERROR, 0);
+
+    for (;;) {
+        Log("waiting...");
+        WaitForSingleObject(Context->StopEvent, INFINITE);
+        Log("awake");
+
+        break;
+    }
+
+    CloseHandle(Context->StopEvent);
+
+    ReportStatus(SERVICE_STOPPED, NO_ERROR, 0);
+
+    (VOID) DeregisterEventSource(Context->EventLog);
+
+    Log("<====");
+
+    return;
+
+fail3:
+    Log("fail3");
+
+    ReportStatus(SERVICE_STOPPED, GetLastError(), 0);
+
+    (VOID) DeregisterEventSource(Context->EventLog);
+
+fail2:
+    Log("fail2");
+
+fail1:
+    Error = GetLastError();
+
+    {
+        PTCHAR  Message;
+        Message = GetErrorMessage(Error);
+        Log("fail1 (%s)", Message);
+        LocalFree(Message);
+    }
+}
+
+static BOOL
+MonitorCreate(
+    VOID
+    )
+{
+    SC_HANDLE   SCManager;
+    SC_HANDLE   Service;
+    TCHAR       Path[MAX_PATH];
+    HRESULT     Error;
+
+    Log("====>");
+
+    if(!GetModuleFileName(NULL, Path, MAX_PATH))
+        goto fail1;
+
+    SCManager = OpenSCManager(NULL,
+                              NULL,
+                              SC_MANAGER_ALL_ACCESS);
+
+    if (SCManager == NULL)
+        goto fail2;
+
+    Service = CreateService(SCManager,
+                            MONITOR_NAME,
+                            MONITOR_DISPLAYNAME,
+                            SERVICE_ALL_ACCESS,
+                            SERVICE_WIN32_OWN_PROCESS,
+                            SERVICE_AUTO_START,
+                            SERVICE_ERROR_NORMAL,
+                            Path,
+                            NULL,
+                            NULL,
+                            NULL,
+                            NULL,
+                            NULL);
+
+    if (Service == NULL)
+        goto fail3;
+
+    CloseServiceHandle(Service);
+    CloseServiceHandle(SCManager);
+
+    Log("<====");
+
+    return TRUE;
+
+fail3:
+    Log("fail3");
+
+    CloseServiceHandle(SCManager);
+
+fail2:
+    Log("fail2");
+
+fail1:
+    Error = GetLastError();
+
+    {
+        PTCHAR  Message;
+        Message = GetErrorMessage(Error);
+        Log("fail1 (%s)", Message);
+        LocalFree(Message);
+    }
+
+    return FALSE;
+}
+
+static BOOL
+MonitorDelete(
+    VOID
+    )
+{
+    SC_HANDLE           SCManager;
+    SC_HANDLE           Service;
+    BOOL                Success;
+    SERVICE_STATUS      Status;
+    HRESULT             Error;
+
+    Log("====>");
+
+    SCManager = OpenSCManager(NULL,
+                              NULL,
+                              SC_MANAGER_ALL_ACCESS);
+
+    if (SCManager == NULL)
+        goto fail1;
+
+    Service = OpenService(SCManager,
+                          MONITOR_NAME,
+                          SERVICE_ALL_ACCESS);
+
+    if (Service == NULL)
+        goto fail2;
+
+    Success = ControlService(Service,
+                             SERVICE_CONTROL_STOP,
+                             &Status);
+
+    if (!Success)
+        goto fail3;
+
+    Success = DeleteService(Service);
+
+    if (!Success)
+        goto fail4;
+
+    CloseServiceHandle(Service);
+    CloseServiceHandle(SCManager);
+
+    Log("<====");
+
+    return TRUE;
+
+fail4:
+    Log("fail4");
+
+fail3:
+    Log("fail3");
+
+    CloseServiceHandle(Service);
+
+fail2:
+    Log("fail2");
+
+    CloseServiceHandle(SCManager);
+
+fail1:
+    Error = GetLastError();
+
+    {
+        PTCHAR  Message;
+        Message = GetErrorMessage(Error);
+        Log("fail1 (%s)", Message);
+        LocalFree(Message);
+    }
+
+    return FALSE;
+}
+
+static BOOL
+MonitorEntry(
+    VOID
+    )
+{
+    SERVICE_TABLE_ENTRY Table[] = {
+        { MONITOR_NAME, MonitorMain },
+        { NULL, NULL }
+    };
+    HRESULT             Error;
+
+    Log("%s (%s) ====>",
+        MAJOR_VERSION_STR "." MINOR_VERSION_STR "." MICRO_VERSION_STR "." 
BUILD_NUMBER_STR,
+        DAY_STR "/" MONTH_STR "/" YEAR_STR);
+
+    if (!StartServiceCtrlDispatcher(Table))
+        goto fail1;
+
+    Log("%s (%s) <====",
+        MAJOR_VERSION_STR "." MINOR_VERSION_STR "." MICRO_VERSION_STR "." 
BUILD_NUMBER_STR,
+        DAY_STR "/" MONTH_STR "/" YEAR_STR);
+
+    return TRUE;
+
+fail1:
+    Error = GetLastError();
+
+    {
+        PTCHAR  Message;
+        Message = GetErrorMessage(Error);
+        Log("fail1 (%s)", Message);
+        LocalFree(Message);
+    }
+
+    return FALSE;
+}
+
+int CALLBACK
+_tWinMain(
+    _In_        HINSTANCE   Current,
+    _In_opt_    HINSTANCE   Previous,
+    _In_        LPSTR       CmdLine,
+    _In_        int         CmdShow
+    )
+{
+    BOOL                    Success;
+
+    UNREFERENCED_PARAMETER(Current);
+    UNREFERENCED_PARAMETER(Previous);
+    UNREFERENCED_PARAMETER(CmdShow);
+
+    if (_tcslen(CmdLine) != 0) {
+         if (_tcsicmp(CmdLine, TEXT("create")) == 0)
+             Success = MonitorCreate();
+         else if (_tcsicmp(CmdLine, TEXT("delete")) == 0)
+             Success = MonitorDelete();
+         else
+             Success = FALSE;
+    } else
+        Success = MonitorEntry();
+
+    return Success ? 0 : 1;
+}
diff --git a/src/monitor/xenbus_monitor.rc b/src/monitor/xenbus_monitor.rc
new file mode 100644
index 0000000..1948657
--- /dev/null
+++ b/src/monitor/xenbus_monitor.rc
@@ -0,0 +1,57 @@
+/* Copyright (c) Citrix Systems Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms,
+ * with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * *   Redistributions of source code must retain the above
+ *     copyright notice, this list of conditions and the
+ *     following disclaimer.
+ * *   Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the
+ *     following disclaimer in the documentation and/or other
+ *     materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+
+#include <windows.h>
+#include <ntverp.h>
+
+#undef VER_COMPANYNAME_STR
+#undef VER_PRODUCTNAME_STR
+#undef VER_PRODUCTVERSION
+#undef VER_PRODUCTVERSION_STR
+
+#include <version.h>
+
+#define VER_COMPANYNAME_STR         VENDOR_NAME_STR
+#define VER_LEGALCOPYRIGHT_STR      "Copyright (c) Citrix Systems Inc."
+
+#define VER_PRODUCTNAME_STR         "XENBUS"
+#define VER_PRODUCTVERSION          
MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER
+#define VER_PRODUCTVERSION_STR      MAJOR_VERSION_STR "." MINOR_VERSION_STR 
"." MICRO_VERSION_STR "." BUILD_NUMBER_STR
+
+#define VER_INTERNALNAME_STR       "XENBUS_MONITOR.EXE"
+#define VER_FILEDESCRIPTION_STR     "XENBUS_MONITOR"
+
+#define VER_FILETYPE               VFT_APP
+#define VER_FILESUBTYPE                    VFT2_UNKNOWN
+
+#include "common.ver"
+#include "messages.rc"
diff --git a/src/xenbus.inf b/src/xenbus.inf
index 7ece951..ddc1c45 100644
--- a/src/xenbus.inf
+++ b/src/xenbus.inf
@@ -35,10 +35,12 @@ ClassGUID={4d36e97d-e325-11ce-bfc1-08002be10318}
 Provider=%Vendor% 
 CatalogFile=xenbus.cat
 DriverVer=01/01/1900,0.0.0.0
+DriverPackageDisplayName=%DiskDesc%
 
 [DestinationDirs] 
 DefaultDestDir=12 
 CoInst_CopyFiles=11
+Monitor_CopyFiles=11
 
 [SourceDisksNames]
 0=%DiskDesc%
@@ -48,8 +50,10 @@ xen.sys=0,,
 xenbus.sys=0,,
 xenfilt.sys=0,,
 xenbus_coinst.dll=0,,
+xenbus_monitor.exe=0,,
+xenbus_monitor.dll=0,,
 
-[XenBus_Copyfiles]
+[XenBus_CopyFiles]
 xen.sys
 xenbus.sys
 xenfilt.sys
@@ -57,6 +61,10 @@ xenfilt.sys
 [CoInst_CopyFiles]
 
xenbus_coinst_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll,xenbus_coinst.dll
 
+[Monitor_CopyFiles]
+xenbus_monitor_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.exe,xenbus_monitor.exe
+xenbus_monitor_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll,xenbus_monitor.dll
+
 [Manufacturer] 
 %Vendor%=Inst,NT$ARCH$
 
@@ -69,11 +77,13 @@ 
xenbus_coinst_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll
 %XenBusDesc%           =XenBus_Inst,   PCI\VEN_5853&DEV_0001
 
 [XenBus_Inst] 
-CopyFiles=XenBus_Copyfiles
+CopyFiles=XenBus_CopyFiles
+CopyFiles=Monitor_CopyFiles
 
 [XenBus_Inst.Services]
-AddService=xenbus,0x02,XenBus_Service
+AddService=xenbus,%SPSVCINST_ASSOCSERVICE%,XenBus_Service
 AddService=xenfilt,,XenFilt_Service,
+AddService=xenbus_monitor,%SPSVCSINST_STARTSERVICE%,Monitor_Service,Monitor_EventLog
 
 [XenBus_Service] 
 DisplayName=%XenBusDesc%
@@ -109,6 +119,24 @@ HKR,"Parameters",,0x00000010
 HKR,"Parameters","ACPI\PNP0A03",0x00000000,"DEVICE"
 HKR,"Parameters","PCIIDE\IDEChannel",0x00000000,"DISK"
 
+[Monitor_Service]
+DisplayName=%MonitorDesc%
+ServiceType=%SERVICE_WIN32_OWN_PROCESS%
+StartType=%SERVICE_AUTO_START%
+ErrorControl=%SERVICE_ERROR_NORMAL%
+ServiceBinary=%11%\xenbus_monitor_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.exe
+AddReg = Monitor_Request
+
+[Monitor_Request]
+HKR,"Request",,0x00000010
+
+[Monitor_EventLog]
+AddReg=Monitor_EventLog_AddReg
+
+[Monitor_EventLog_AddReg]
+HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\xenbus_monitor_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll"
+HKR,,TypesSupported,0x00010001,7
+
 [XenBus_Inst.CoInstallers]
 CopyFiles=CoInst_CopyFiles
 AddReg=CoInst_AddReg
@@ -122,6 +150,7 @@ Vendor="@VENDOR_NAME@"
 DiskDesc="@PRODUCT_NAME@ PV Bus Package" 
 XenBusDesc="@PRODUCT_NAME@ PV Bus"
 XenFiltDesc="@PRODUCT_NAME@ Generic Bus Filter"
+MonitorDesc="@PRODUCT_NAME@ PV Driver Monitor"
 
 SERVICE_BOOT_START=0x0 
 SERVICE_SYSTEM_START=0x1 
@@ -129,8 +158,12 @@ SERVICE_AUTO_START=0x2
 SERVICE_DEMAND_START=0x3 
 SERVICE_DISABLED=0x4 
 
+SERVICE_WIN32_OWN_PROCESS=0x10
 SERVICE_KERNEL_DRIVER=0x1 
 SERVICE_ERROR_IGNORE=0x0 
 SERVICE_ERROR_NORMAL=0x1 
 SERVICE_ERROR_SEVERE=0x2 
 SERVICE_ERROR_CRITICAL=0x3 
+
+SPSVCINST_ASSOCSERVICE=0x00000002
+SPSVCSINST_STARTSERVICE=0x00000800
diff --git a/vs2012/package/package.vcxproj b/vs2012/package/package.vcxproj
index ee60bdb..b600a93 100644
--- a/vs2012/package/package.vcxproj
+++ b/vs2012/package/package.vcxproj
@@ -49,6 +49,9 @@
     <ProjectReference Include="..\xen\xen.vcxproj">
       <Project>{9c6a5d48-a331-4b1f-a004-7bb67ba5be1c}</Project>
     </ProjectReference>
+    <ProjectReference Include="..\xenbus_monitor\xenbus_monitor.vcxproj">
+      <Project>{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}</Project>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <FilesToPackage Include="$(KIT)\Redist\DIFx\dpinst\EngMui\x86\dpinst.exe" 
Condition="'$(Platform)'=='Win32'" />
diff --git a/vs2012/xenbus.sln b/vs2012/xenbus.sln
index 626fd85..eb3d03a 100644
--- a/vs2012/xenbus.sln
+++ b/vs2012/xenbus.sln
@@ -1,5 +1,9 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus_coinst", 
"xenbus_coinst\xenbus_coinst.vcxproj", "{4BF41378-C01B-4002-8581-563C5F703362}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus_monitor", 
"xenbus_monitor\xenbus_monitor.vcxproj", 
"{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}"
+EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xen", "xen\xen.vcxproj", 
"{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenfilt", 
"xenfilt\xenfilt.vcxproj", "{D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}"
@@ -7,11 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = 
"xenfilt", "xenfilt\xenfilt.
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
        EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus_coinst", 
"xenbus_coinst\xenbus_coinst.vcxproj", "{4BF41378-C01B-4002-8581-563C5F703362}"
-       ProjectSection(ProjectDependencies) = postProject
-               {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
-       EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus", 
"xenbus\xenbus.vcxproj", "{14C16C29-77C9-475B-A618-1B01E67CF985}"
        ProjectSection(ProjectDependencies) = postProject
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
@@ -23,6 +22,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = 
"package", "package\package.
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD} = 
{D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
                {4BF41378-C01B-4002-8581-563C5F703362} = 
{4BF41378-C01B-4002-8581-563C5F703362}
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B} = 
{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}
        EndProjectSection
 EndProject
 Global
@@ -41,6 +41,54 @@ Global
                Windows Vista Release|x64 = Windows Vista Release|x64
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
+               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
@@ -89,30 +137,6 @@ Global
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
-               {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
                {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
                {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
                {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
diff --git a/vs2012/xenbus_monitor/xenbus_monitor.vcxproj 
b/vs2012/xenbus_monitor/xenbus_monitor.vcxproj
new file mode 100644
index 0000000..2d8f801
--- /dev/null
+++ b/vs2012/xenbus_monitor/xenbus_monitor.vcxproj
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <Import Project="..\configs.props" />
+  <PropertyGroup Label="PropertySheets">
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>WindowsApplicationForDrivers8.0</PlatformToolset>
+    <ConfigurationType>Application</ConfigurationType>
+  </PropertyGroup>
+  <PropertyGroup Label="Globals">
+    <Configuration>Windows Vista Debug</Configuration>
+    <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="..\targets.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <IncludePath>$(IncludePath)</IncludePath>
+    <RunCodeAnalysis>true</RunCodeAnalysis>
+    <EnableInf2cat>false</EnableInf2cat>
+  </PropertyGroup>
+  <PropertyGroup>
+    <CustomBuildAfterTargets>Link</CustomBuildAfterTargets>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;__MODULE__="XENBUS_MONITOR";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <WarningLevel>EnableAllWarnings</WarningLevel>
+      
<DisableSpecificWarnings>4127;4711;4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <EnablePREfast>true</EnablePREfast>
+      <RuntimeLibrary 
Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary 
Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      
<AdditionalDependencies>wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <ResourceCompile>
+      
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      
<PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <CustomBuildStep>
+      <Outputs>$(TargetDir)$(TargetName).dll</Outputs>
+      <Inputs>$(IntDir)$(TargetName).res</Inputs>
+      <Command>link -machine:x86 -dll -noentry -out:%(Outputs) 
%(Inputs)</Command>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      
<PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <CustomBuildStep>
+      <Outputs>$(TargetDir)$(TargetName).dll</Outputs>
+      <Inputs>$(IntDir)$(TargetName).res</Inputs>
+      <Command>link -machine:x64 -dll -noentry -out:%(Outputs) 
%(Inputs)</Command>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <FilesToPackage Include="$(TargetPath)" />
+    <FilesToPackage Include="$(OutDir)$(TargetName).pdb" />
+    <FilesToPackage Include="$(OutDir)$(TargetName).dll" />
+    <FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" 
/>
+  </ItemGroup>
+  <ItemGroup>
+    <MessageCompile Include="..\..\src\monitor\messages.mc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\monitor\monitor.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\..\src\monitor\xenbus_monitor.rc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project>
\ No newline at end of file
diff --git a/vs2012/xenbus_monitor/xenbus_monitor.vcxproj.user 
b/vs2012/xenbus_monitor/xenbus_monitor.vcxproj.user
new file mode 100644
index 0000000..88ecce8
--- /dev/null
+++ b/vs2012/xenbus_monitor/xenbus_monitor.vcxproj.user
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <SignMode>TestSign</SignMode>
+    <TestCertificate>..\..\src\xenbus.pfx</TestCertificate>
+    
<TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer>
+  </PropertyGroup>
+</Project>
diff --git a/vs2013/package/package.vcxproj b/vs2013/package/package.vcxproj
index ae1c230..c3a6cce 100644
--- a/vs2013/package/package.vcxproj
+++ b/vs2013/package/package.vcxproj
@@ -50,6 +50,9 @@
     <ProjectReference Include="..\xen\xen.vcxproj">
       <Project>{9c6a5d48-a331-4b1f-a004-7bb67ba5be1c}</Project>
     </ProjectReference>
+    <ProjectReference Include="..\xenbus_monitor\xenbus_monitor.vcxproj">
+      <Project>{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}</Project>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <FilesToPackage Include="$(KIT)\Redist\DIFx\dpinst\EngMui\x86\dpinst.exe" 
Condition="'$(Platform)'=='Win32'" />
diff --git a/vs2013/xenbus.sln b/vs2013/xenbus.sln
index 00c21f9..01042c6 100644
--- a/vs2013/xenbus.sln
+++ b/vs2013/xenbus.sln
@@ -1,5 +1,11 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 11
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.30723.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus_coinst", 
"xenbus_coinst\xenbus_coinst.vcxproj", "{4BF41378-C01B-4002-8581-563C5F703362}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus_monitor", 
"xenbus_monitor\xenbus_monitor.vcxproj", 
"{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}"
+EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xen", "xen\xen.vcxproj", 
"{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenfilt", 
"xenfilt\xenfilt.vcxproj", "{D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}"
@@ -7,11 +13,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = 
"xenfilt", "xenfilt\xenfilt.
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
        EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus_coinst", 
"xenbus_coinst\xenbus_coinst.vcxproj", "{4BF41378-C01B-4002-8581-563C5F703362}"
-       ProjectSection(ProjectDependencies) = postProject
-               {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
-       EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xenbus", 
"xenbus\xenbus.vcxproj", "{14C16C29-77C9-475B-A618-1B01E67CF985}"
        ProjectSection(ProjectDependencies) = postProject
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
@@ -23,6 +24,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = 
"package", "package\package.
                {4BF41378-C01B-4002-8581-563C5F703362} = 
{4BF41378-C01B-4002-8581-563C5F703362}
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} = 
{9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD} = 
{D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B} = 
{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}
        EndProjectSection
 EndProject
 Global
@@ -41,30 +43,6 @@ Global
                Windows Vista Release|x64 = Windows Vista Release|x64
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
-               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
                {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
                {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
                {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
@@ -89,42 +67,42 @@ Global
                {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
                {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
                {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|Win32.Deploy.0 = Windows 7 Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|x64.Deploy.0 = Windows 7 Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|Win32.Deploy.0 = Windows 7 Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|x64.Deploy.0 = Windows 7 Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|x64.Deploy.0 = Windows 8 Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|Win32.Deploy.0 = Windows 8 Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|x64.Deploy.0 = Windows 8 Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|Win32.Deploy.0 = Windows Vista Debug|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|x64.Deploy.0 = Windows Vista Debug|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|Win32.Deploy.0 = Windows Vista Release|Win32
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
-               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|x64.Deploy.0 = Windows Vista Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|Win32.Deploy.0 = Windows 7 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Debug|x64.Deploy.0 = Windows 7 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|Win32.Deploy.0 = Windows 7 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 7 
Release|x64.Deploy.0 = Windows 7 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Debug|x64.Deploy.0 = Windows 8 Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|Win32.Deploy.0 = Windows 8 Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows 8 
Release|x64.Deploy.0 = Windows 8 Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|Win32.Deploy.0 = Windows Vista Debug|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Debug|x64.Deploy.0 = Windows Vista Debug|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|Win32.Deploy.0 = Windows Vista Release|Win32
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
+               {2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}.Windows Vista 
Release|x64.Deploy.0 = Windows Vista Release|x64
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
                {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
@@ -173,6 +151,66 @@ Global
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
                {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
+               {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|Win32.ActiveCfg = Windows 7 Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|Win32.Build.0 = Windows 7 Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|Win32.Deploy.0 = Windows 7 Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|x64.ActiveCfg = Windows 7 Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|x64.Build.0 = Windows 7 Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Debug|x64.Deploy.0 = Windows 7 Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|Win32.ActiveCfg = Windows 7 Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|Win32.Build.0 = Windows 7 Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|Win32.Deploy.0 = Windows 7 Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|x64.ActiveCfg = Windows 7 Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|x64.Build.0 = Windows 7 Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 
Release|x64.Deploy.0 = Windows 7 Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|Win32.ActiveCfg = Windows 8 Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|Win32.Build.0 = Windows 8 Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|Win32.Deploy.0 = Windows 8 Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|x64.ActiveCfg = Windows 8 Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|x64.Build.0 = Windows 8 Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Debug|x64.Deploy.0 = Windows 8 Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|Win32.ActiveCfg = Windows 8 Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|Win32.Build.0 = Windows 8 Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|Win32.Deploy.0 = Windows 8 Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|x64.ActiveCfg = Windows 8 Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|x64.Build.0 = Windows 8 Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 
Release|x64.Deploy.0 = Windows 8 Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|Win32.ActiveCfg = Windows Vista Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|Win32.Build.0 = Windows Vista Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|Win32.Deploy.0 = Windows Vista Debug|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|x64.ActiveCfg = Windows Vista Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|x64.Build.0 = Windows Vista Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Debug|x64.Deploy.0 = Windows Vista Debug|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|Win32.ActiveCfg = Windows Vista Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|Win32.Build.0 = Windows Vista Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|Win32.Deploy.0 = Windows Vista Release|Win32
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|x64.ActiveCfg = Windows Vista Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|x64.Build.0 = Windows Vista Release|x64
+               {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista 
Release|x64.Deploy.0 = Windows Vista Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
diff --git a/vs2013/xenbus_monitor/xenbus_monitor.vcxproj 
b/vs2013/xenbus_monitor/xenbus_monitor.vcxproj
new file mode 100644
index 0000000..5575c7e
--- /dev/null
+++ b/vs2013/xenbus_monitor/xenbus_monitor.vcxproj
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <Import Project="..\configs.props" />
+  <PropertyGroup Label="Globals">
+    <Configuration>Windows Vista Debug</Configuration>
+    <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+    <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
+  </PropertyGroup>
+  <PropertyGroup Label="PropertySheets">
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>WindowsApplicationForDrivers8.1</PlatformToolset>
+    <ConfigurationType>Application</ConfigurationType>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2E61D2CC-865E-442C-8C83-B8DAFD7BBD3B}</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="..\targets.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <IncludePath>$(IncludePath)</IncludePath>
+    <RunCodeAnalysis>true</RunCodeAnalysis>
+    <EnableInf2cat>false</EnableInf2cat>
+  </PropertyGroup>
+  <PropertyGroup>
+    <CustomBuildAfterTargets>Link</CustomBuildAfterTargets>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;__MODULE__="XENBUS_MONITOR";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <WarningLevel>EnableAllWarnings</WarningLevel>
+      
<DisableSpecificWarnings>4127;4711;4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <EnablePREfast>true</EnablePREfast>
+      <RuntimeLibrary 
Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary 
Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      
<AdditionalDependencies>wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <ResourceCompile>
+      
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <ClCompile>
+      
<PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <CustomBuildStep>
+      <Outputs>$(TargetDir)$(TargetName).dll</Outputs>
+      <Inputs>$(IntDir)$(TargetName).res</Inputs>
+      <Command>link -machine:x86 -dll -noentry -out:%(Outputs) 
%(Inputs)</Command>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+    <ClCompile>
+      
<PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <CustomBuildStep>
+      <Outputs>$(TargetDir)$(TargetName).dll</Outputs>
+      <Inputs>$(IntDir)$(TargetName).res</Inputs>
+      <Command>link -machine:x64 -dll -noentry -out:%(Outputs) 
%(Inputs)</Command>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <FilesToPackage Include="$(TargetPath)" />
+    <FilesToPackage Include="$(OutDir)$(TargetName).pdb" />
+    <FilesToPackage Include="$(OutDir)$(TargetName).dll" />
+    <FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" 
/>
+  </ItemGroup>
+  <ItemGroup>
+    <MessageCompile Include="..\..\src\monitor\messages.mc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\monitor\monitor.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\..\src\monitor\xenbus_monitor.rc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project>
\ No newline at end of file
diff --git a/vs2013/xenbus_monitor/xenbus_monitor.vcxproj.user 
b/vs2013/xenbus_monitor/xenbus_monitor.vcxproj.user
new file mode 100644
index 0000000..88ecce8
--- /dev/null
+++ b/vs2013/xenbus_monitor/xenbus_monitor.vcxproj.user
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <SignMode>TestSign</SignMode>
+    <TestCertificate>..\..\src\xenbus.pfx</TestCertificate>
+    
<TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer>
+  </PropertyGroup>
+</Project>
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.