Password reset tool for windows platform

This commit is contained in:
Kelven Yang 2011-02-08 16:49:20 -08:00
parent f7925abaed
commit ea8d7a81cb
37 changed files with 3296 additions and 0 deletions

37
pwdmgr-win/h/VMOpsError.h Normal file
View File

@ -0,0 +1,37 @@
//
// VMOpsError.h
// VMOps common error codes
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#ifndef __VMOpsError_H__
#define __VMOpsError_H__
#if defined(WIN32) || defined(_WIN32)
#include <windows.h>
#endif
#ifndef HERROR_DEFINED
#define HERROR_DEFINED
typedef LONG HERROR;
#define MAKE_ERROR(module, code) \
(1L << 31 | (module << 16) | code)
#define HERROR_FAILED(error) \
((error & (1 << 31L)) != 0)
#endif
// common error codes
#define HERROR_SUCCESS 0
#define HERROR_FAIL MAKE_ERROR(0, 1)
#define HERROR_NOT_SUPPORTED MAKE_ERROR(0, 2)
#define HERROR_INVALID_PARAMETER MAKE_ERROR(0, 3)
#define HERROR_INSUFFICIENT_BUFFER MAKE_ERROR(0, 4)
#define HERROR_NOT_FOUND MAKE_ERROR(0, 5)
#endif // !__VMOpsError_H__
/////////////////////////////////////////////////////////////////////////////

Binary file not shown.

View File

@ -0,0 +1,33 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VMOps Instance Manager", "..\service\VMOps Instance Manager.vcxproj", "{212919B4-2196-44B8-B026-A351E4D8F19A}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "setup", "..\setup\setup.vdproj", "{2C583661-CC75-40EC-B4DC-4EA562DBCD8C}"
ProjectSection(ProjectDependencies) = postProject
{212919B4-2196-44B8-B026-A351E4D8F19A} = {212919B4-2196-44B8-B026-A351E4D8F19A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Code Signing", "..\codesign\Code Signing.vcxproj", "{2032CBE0-F355-4687-8D7D-F215C0122D88}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{212919B4-2196-44B8-B026-A351E4D8F19A}.Debug|Win32.ActiveCfg = Debug|Win32
{212919B4-2196-44B8-B026-A351E4D8F19A}.Debug|Win32.Build.0 = Debug|Win32
{212919B4-2196-44B8-B026-A351E4D8F19A}.Release|Win32.ActiveCfg = Release|Win32
{212919B4-2196-44B8-B026-A351E4D8F19A}.Release|Win32.Build.0 = Release|Win32
{2C583661-CC75-40EC-B4DC-4EA562DBCD8C}.Debug|Win32.ActiveCfg = Debug
{2C583661-CC75-40EC-B4DC-4EA562DBCD8C}.Release|Win32.ActiveCfg = Release
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Debug|Win32.ActiveCfg = Debug|Win32
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Debug|Win32.Build.0 = Debug|Win32
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Release|Win32.ActiveCfg = Release|Win32
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VMOps Instance Manager", "..\service\VMOps Instance Manager.vcproj", "{212919B4-2196-44B8-B026-A351E4D8F19A}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "setup", "..\setup\setup.vdproj", "{2C583661-CC75-40EC-B4DC-4EA562DBCD8C}"
ProjectSection(ProjectDependencies) = postProject
{212919B4-2196-44B8-B026-A351E4D8F19A} = {212919B4-2196-44B8-B026-A351E4D8F19A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Code Signing", "..\codesign\Code Signing.vcproj", "{2032CBE0-F355-4687-8D7D-F215C0122D88}"
ProjectSection(ProjectDependencies) = postProject
{2C583661-CC75-40EC-B4DC-4EA562DBCD8C} = {2C583661-CC75-40EC-B4DC-4EA562DBCD8C}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{212919B4-2196-44B8-B026-A351E4D8F19A}.Debug|Win32.ActiveCfg = Debug|Win32
{212919B4-2196-44B8-B026-A351E4D8F19A}.Debug|Win32.Build.0 = Debug|Win32
{212919B4-2196-44B8-B026-A351E4D8F19A}.Release|Win32.ActiveCfg = Release|Win32
{212919B4-2196-44B8-B026-A351E4D8F19A}.Release|Win32.Build.0 = Release|Win32
{2C583661-CC75-40EC-B4DC-4EA562DBCD8C}.Debug|Win32.ActiveCfg = Debug
{2C583661-CC75-40EC-B4DC-4EA562DBCD8C}.Release|Win32.ActiveCfg = Release
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Debug|Win32.ActiveCfg = Debug|Win32
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Debug|Win32.Build.0 = Debug|Win32
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Release|Win32.ActiveCfg = Release|Win32
{2032CBE0-F355-4687-8D7D-F215C0122D88}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
<Properties><Property Name="Solution" Value="Build">
</Property><Property Name="Solution File" Value="C:\vmops\native\win\build\Build.sln">
</Property><Property Name="Date" Value="Monday, February 07, 2011">
</Property><Property Name="Time" Value="10:51 AM">
</Property></Properties><Event ErrorLevel="0" Project="" Source="Build.sln" Description="File successfully backed up as C:\vmops\native\win\build\Build.sln.old">
</Event><Event ErrorLevel="0" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="Converting project file 'C:\vmops\native\win\service\VMOps Instance Manager.vcproj'.">
</Event><Event ErrorLevel="1" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
</Event><Event ErrorLevel="1" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="MSB8012: $(TargetName) ('VMOps Instance Manager') does not match the Linker's OutputFile property value '..\bin\debug\vmopsservice.exe' ('vmopsservice') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).">
</Event><Event ErrorLevel="1" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="MSB8012: $(TargetPath) ('C:\vmops\native\win\service\..\bin\debug\VMOps Instance Manager.exe') does not match the Linker's OutputFile property value '..\bin\debug\vmopsservice.exe' ('C:\vmops\native\win\bin\debug\vmopsservice.exe') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).">
</Event><Event ErrorLevel="1" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="MSB8012: $(TargetName) ('VMOps Instance Manager') does not match the Linker's OutputFile property value '..\bin\release\vmopsservice.exe' ('vmopsservice') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).">
</Event><Event ErrorLevel="1" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="MSB8012: $(TargetPath) ('C:\vmops\native\win\service\..\bin\release\VMOps Instance Manager.exe') does not match the Linker's OutputFile property value '..\bin\release\vmopsservice.exe' ('C:\vmops\native\win\bin\release\vmopsservice.exe') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).">
</Event><Event ErrorLevel="0" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="Done converting to new project file 'C:\vmops\native\win\service\VMOps Instance Manager.vcxproj'.">
</Event><Event ErrorLevel="3" Project="VMOps Instance Manager" Source="..\service\VMOps Instance Manager.vcproj" Description="Converted">
</Event><Event ErrorLevel="0" Project="Code Signing" Source="..\codesign\Code Signing.vcproj" Description="Converting project file 'C:\vmops\native\win\codesign\Code Signing.vcproj'.">
</Event><Event ErrorLevel="1" Project="Code Signing" Source="..\codesign\Code Signing.vcproj" Description="VCConvertEngine could not convert attribute CompileAsManaged = under Tool VCNMakeTool.">
</Event><Event ErrorLevel="1" Project="Code Signing" Source="..\codesign\Code Signing.vcproj" Description="VCConvertEngine could not convert attribute CompileAsManaged = under Tool VCNMakeTool.">
</Event><Event ErrorLevel="0" Project="Code Signing" Source="..\codesign\Code Signing.vcproj" Description="Done converting to new project file 'C:\vmops\native\win\codesign\Code Signing.vcxproj'.">
</Event><Event ErrorLevel="3" Project="Code Signing" Source="..\codesign\Code Signing.vcproj" Description="Converted">
</Event><Event ErrorLevel="0" Project="" Source="Build.sln" Description="Solution converted successfully">
</Event><Event ErrorLevel="3" Project="" Source="Build.sln" Description="Converted">
</Event></UpgradeLog>

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="Code Signing"
ProjectGUID="{2032CBE0-F355-4687-8D7D-F215C0122D88}"
RootNamespace="Code Signing"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\bin\$(ConfigurationName)"
IntermediateDirectory="..\bin\$(ConfigurationName)\codesign"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(InputDir)sign-vmops.bat ..\bin\$(ConfigurationName)"
ReBuildCommandLine=""
CleanCommandLine=""
Output=""
PreprocessorDefinitions="WIN32;_DEBUG"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\bin\$(ConfigurationName)"
IntermediateDirectory="..\bin\$(ConfigurationName)\codesign"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(InputDir)sign-vmops.bat ..\bin\$(ConfigurationName)"
ReBuildCommandLine=""
CleanCommandLine=""
Output="Code Signing.exe"
PreprocessorDefinitions="WIN32;NDEBUG"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\sign-vmops.bat"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2032CBE0-F355-4687-8D7D-F215C0122D88}</ProjectGuid>
<RootNamespace>Code Signing</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Configuration)\codesign\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)sign-vmops.bat ..\bin\$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Configuration)\codesign\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)sign-vmops.bat ..\bin\$(Configuration)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Code Signing.exe</NMakeOutput>
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
</PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="sign-vmops.bat" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\setup\setup.vdproj" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="sign-vmops.bat">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -0,0 +1,6 @@
signtool sign /f vmopscert.pfx /p vmops /t http://tsa.starfieldtech.com %1\VMOpsInstanceManager.msi
signtool sign /f vmopscert.pfx /p vmops /t http://tsa.starfieldtech.com %1\VMOpsInstanceManager.msi

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,63 @@
========================================================================
ACTIVE TEMPLATE LIBRARY : VMOps Instance Manager Project Overview
========================================================================
AppWizard has created this VMOps Instance Manager project for you to use as the starting point for
writing your Service (EXE).
This file contains a summary of what you will find in each of the files that
make up your project.
VMOps Instance Manager.vcproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
VMOpsInstanceManager.idl
This file contains the IDL definitions of the type library, the interfaces
and co-classes defined in your project.
This file will be processed by the MIDL compiler to generate:
C++ interface definitions and GUID declarations (VMOpsInstanceManager.h)
GUID definitions (VMOpsInstanceManager_i.c)
A type library (VMOpsInstanceManager.tlb)
Marshaling code (VMOpsInstanceManager_p.c and dlldata.c)
VMOpsInstanceManager.h
This file contains the C++ interface definitions and GUID declarations of the
items defined in VMOpsInstanceManager.idl. It will be regenerated by MIDL during compilation.
VMOps Instance Manager.cpp
This file contains the object map and the implementation of WinMain, ServiceMain, and
the service management functions.
VMOps Instance Manager.rc
This is a listing of all of the Microsoft Windows resources that the
program uses.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named VMOps Instance Manager.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file that defines resource IDs.
/////////////////////////////////////////////////////////////////////////////
Proxy/stub DLL project and module definition file:
VMOps Instance Managerps.vcproj
This file is the project file for building a proxy/stub DLL if necessary.
The IDL file in the main project must contain at least one interface and you must
first compile the IDL file before building the proxy/stub DLL. This process generates
dlldata.c, VMOpsInstanceManager_i.c and VMOpsInstanceManager_p.c which are required
to build the proxy/stub DLL.
VMOps Instance Managerps.def
This module definition file provides the linker with information about the exports
required by the proxy/stub.
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,18 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by VMOps Instance Manager.rc
//
#define IDS_SERVICENAME 100
#define IDR_VMOPSINSTANCEMANAGER 101
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@ -0,0 +1,133 @@
//
// ThreadUtl.h
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#include "ThreadUtil.h"
#include <atlbase.h>
using namespace VMOps;
/////////////////////////////////////////////////////////////////////////////
// CCriticalSection
//
CCriticalSection::CCriticalSection()
{
InitializeCriticalSection(&m_cs);
}
CCriticalSection::~CCriticalSection()
{
DeleteCriticalSection(&m_cs);
}
void CCriticalSection::Lock()
{
EnterCriticalSection(&m_cs);
}
void CCriticalSection::Unlock()
{
LeaveCriticalSection(&m_cs);
}
/////////////////////////////////////////////////////////////////////////////
// CThread
//
CThread::CThread()
{
m_hThread = NULL;
m_idThread = 0;
m_hStopEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
_ASSERTE(m_hStopEvent);
}
CThread::~CThread()
{
_ASSERTE(m_hStopEvent);
if(m_hStopEvent)
CloseHandle(m_hStopEvent);
m_hStopEvent = NULL;
_ASSERTE(m_hThread == NULL);
if(m_hThread)
{
TerminateThread(m_hThread, 0);
CloseHandle(m_hThread);
}
m_hThread = NULL;
}
BOOL CThread::Create(DWORD dwCreationFlag)
{
_ASSERTE(m_hThread == NULL);
m_hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProc,
(LPVOID)this, dwCreationFlag, &m_idThread);
_ASSERTE(m_hThread);
_ASSERTE(m_idThread != 0);
return m_hThread != NULL;
}
BOOL CThread::Stop(DWORD dwTimeOut)
{
_ASSERTE(m_idThread != GetCurrentThreadId());
if(m_idThread == GetCurrentThreadId())
{
// this may cause dead-lock if we wait here,
// so we just raise the signal
// and return FALSE to indicate of that
SetEvent(m_hStopEvent);
return FALSE;
}
if(m_hThread)
{
BOOL bReturn = FALSE;
_ASSERTE(m_hStopEvent);
SetEvent(m_hStopEvent);
if(WaitForSingleObject(m_hThread, dwTimeOut) == WAIT_OBJECT_0)
{
bReturn = TRUE;
// restore to initial state
if(m_hThread != NULL)
{
CloseHandle(m_hThread);
m_hThread = NULL;
}
m_idThread = 0;
ResetEvent(m_hStopEvent);
}
return bReturn;
}
return TRUE;
}
BOOL CThread::IsSelfThread()
{
return m_idThread == GetCurrentThreadId();
}
DWORD CThread::ThreadRun()
{
return 0;
}
DWORD WINAPI CThread::ThreadProc(LPVOID lpvParam)
{
_ASSERTE(lpvParam);
CThread* pThread = (CThread*)lpvParam;
return pThread->ThreadRun();
}
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,105 @@
//
// ThreadUtl.h
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#ifndef __ThreadUtil_H__
#define __ThreadUtil_H__
#include <windows.h>
namespace VMOps {
/////////////////////////////////////////////////////////////////////////////
// class diagram
//
class CLockable;
class CCriticalSection;
class CLock;
class CThread;
/////////////////////////////////////////////////////////////////////////////
// CLockable
//
class CLockable
{
public :
virtual void Lock() = 0;
virtual void Unlock() = 0;
};
/////////////////////////////////////////////////////////////////////////////
// CLock
//
class CLock
{
public :
CLock(CLockable& lockableObj) : m_lockableObj(lockableObj)
{
m_lockableObj.Lock();
}
~CLock()
{
m_lockableObj.Unlock();
}
protected :
CLockable& m_lockableObj;
};
/////////////////////////////////////////////////////////////////////////////
// CCriticalSection
//
class CCriticalSection : public CLockable
{
public :
CCriticalSection();
virtual ~CCriticalSection();
public :
virtual void Lock();
virtual void Unlock();
protected :
CRITICAL_SECTION m_cs;
};
// Simple thread implementation
class CThread
{
public :
CThread();
virtual ~CThread();
public :
BOOL Create(DWORD dwCreationFlag);
BOOL Stop(DWORD dwTimeOut = INFINITE);
HANDLE GetThreadHandle() { return m_hThread; }
DWORD GetThreadId() { return m_idThread; }
BOOL IsSelfThread();
protected :
HANDLE GetStopEventHandle() { return m_hStopEvent; }
public :
virtual DWORD ThreadRun();
public :
static DWORD WINAPI ThreadProc(LPVOID lpvParam);
protected :
HANDLE m_hStopEvent;
HANDLE m_hThread;
DWORD m_idThread;
};
}
#endif // !__ThreadUtil_H__
/////////////////////////////////////////////////////////////////////////////

Binary file not shown.

View File

@ -0,0 +1,148 @@
// VMOps Instance Manager.cpp : Implementation of WinMain
#include "stdafx.h"
#include "resource.h"
#include "VMOpsInstanceManager_i.h"
#include <stdio.h>
#include <tchar.h>
#include "VMOpsServiceImpl.h"
using namespace VMOps;
class CVMOpsInstanceManagerModule : public CAtlServiceModuleT< CVMOpsInstanceManagerModule, IDS_SERVICENAME >
{
public :
DECLARE_LIBID(LIBID_VMOpsInstanceManagerLib)
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_VMOPSINSTANCEMANAGER, "{7C7E823B-66C7-4D1C-8DE3-9616605B1768}")
HRESULT InitializeSecurity() throw()
{
// TODO : Call CoInitializeSecurity and provide the appropriate security settings for
// your service
// Suggested - PKT Level Authentication,
// Impersonation Level of RPC_C_IMP_LEVEL_IDENTIFY
// and an appropiate Non NULL Security Descriptor.
return S_OK;
}
HRESULT PreMessageLoop(int nShowCmd = SW_HIDE) throw()
{
CAtlServiceModuleT< CVMOpsInstanceManagerModule, IDS_SERVICENAME >::PreMessageLoop(nShowCmd);
// m_serviceProvider.SetPassword(_T("Administrator"), _T("password@vmops.com"));
CLogger::GetInstance()->Initialize();
m_serviceProvider.Start();
return S_OK;
}
HRESULT PostMessageLoop() throw()
{
CAtlServiceModuleT< CVMOpsInstanceManagerModule, IDS_SERVICENAME >::PostMessageLoop();
m_serviceProvider.Stop();
CLogger::GetInstance()->Cleanup();
return S_OK;
}
// override to install the service as auto-start service
inline HRESULT RegisterAppId(bool bService = false) throw()
{
if (!Uninstall())
return E_FAIL;
HRESULT hr = UpdateRegistryAppId(TRUE);
if (FAILED(hr))
return hr;
CRegKey keyAppID;
LONG lRes = keyAppID.Open(HKEY_CLASSES_ROOT, _T("AppID"), KEY_WRITE);
if (lRes != ERROR_SUCCESS)
return AtlHresultFromWin32(lRes);
CRegKey key;
lRes = key.Create(keyAppID, GetAppIdT());
if (lRes != ERROR_SUCCESS)
return AtlHresultFromWin32(lRes);
key.DeleteValue(_T("LocalService"));
if (!bService)
return S_OK;
key.SetStringValue(_T("LocalService"), m_szServiceName);
// Create service
if (!InstallAsAutoService())
return E_FAIL;
return S_OK;
}
BOOL InstallAsAutoService() throw()
{
if (IsInstalled())
return TRUE;
// Get the executable file path
TCHAR szFilePath[MAX_PATH + _ATL_QUOTES_SPACE];
DWORD dwFLen = ::GetModuleFileName(NULL, szFilePath + 1, MAX_PATH);
if( dwFLen == 0 || dwFLen == MAX_PATH )
return FALSE;
// Quote the FilePath before calling CreateService
szFilePath[0] = _T('\"');
szFilePath[dwFLen + 1] = _T('\"');
szFilePath[dwFLen + 2] = 0;
SC_HANDLE hSCM = ::OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (hSCM == NULL)
{
TCHAR szBuf[1024];
if (AtlLoadString(ATL_SERVICE_MANAGER_OPEN_ERROR, szBuf, 1024) == 0)
#ifdef UNICODE
Checked::wcscpy_s(szBuf, _countof(szBuf), _T("Could not open Service Manager"));
#else
Checked::strcpy_s(szBuf, _countof(szBuf), _T("Could not open Service Manager"));
#endif
MessageBox(NULL, szBuf, m_szServiceName, MB_OK);
return FALSE;
}
SC_HANDLE hService = ::CreateService(
hSCM, m_szServiceName, _T("VMOps Instance Manager"),
SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
/*SERVICE_DEMAND_START*/ SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
szFilePath, NULL, NULL, _T("RPCSS\0"), NULL, NULL);
if (hService == NULL)
{
::CloseServiceHandle(hSCM);
TCHAR szBuf[1024];
if (AtlLoadString(ATL_SERVICE_START_ERROR, szBuf, 1024) == 0)
#ifdef UNICODE
Checked::wcscpy_s(szBuf, _countof(szBuf), _T("Could not create service"));
#else
Checked::strcpy_s(szBuf, _countof(szBuf), _T("Could not create service"));
#endif
MessageBox(NULL, szBuf, m_szServiceName, MB_OK);
return FALSE;
}
::CloseServiceHandle(hService);
::CloseServiceHandle(hSCM);
return TRUE;
}
private :
CVMOpsServiceProvider m_serviceProvider;
};
CVMOpsInstanceManagerModule _AtlModule;
//
extern "C" int WINAPI _tWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/,
LPTSTR /*lpCmdLine*/, int nShowCmd)
{
return _AtlModule.WinMain(nShowCmd);
}

View File

@ -0,0 +1,126 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#ifndef APSTUDIO_INVOKED
#include "targetver.h"
#endif
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#ifndef APSTUDIO_INVOKED\r\n"
"#include ""targetver.h""\r\n"
"#endif\r\n"
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"1 TYPELIB ""VMOpsInstanceManager.tlb""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "VMOps Inc."
VALUE "FileDescription", "VMOps Instance Management Service"
VALUE "FileVersion", "1.0.0.1"
VALUE "InternalName", "VMOps Instance Manager.exe"
VALUE "LegalCopyright", "(c) VMOps Inc. All rights reserved."
VALUE "OriginalFilename", "VMOps Instance Manager.exe"
VALUE "ProductName", "VMOps Cloud Service"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_VMOPSINSTANCEMANAGER REGISTRY "VMOps Instance Manager.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_SERVICENAME "VMOpsInstanceMgr"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
1 TYPELIB "VMOpsInstanceManager.tlb"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,11 @@
HKCR
{
NoRemove AppID
{
'%APPID%' = s 'VMOpsInstanceManager'
'vmopsservice.exe'
{
val AppID = s '%APPID%'
}
}
}

View File

@ -0,0 +1,403 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="VMOps Instance Manager"
ProjectGUID="{212919B4-2196-44B8-B026-A351E4D8F19A}"
RootNamespace="VMOps Instance Manager"
Keyword="AtlProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\bin\debug"
IntermediateDirectory="..\bin\debug\service"
ConfigurationType="1"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/VMOpsInstanceManager.tlb"
HeaderFileName="VMOpsInstanceManager_i.h"
DLLDataFileName=""
InterfaceIdentifierFileName="VMOpsInstanceManager_i.c"
ProxyFileName="VMOpsInstanceManager_p.c"
ValidateParameters="true"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\h"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_ATL_NO_COM_SUPPORT"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="netapi32.lib iphlpapi.lib wininet.lib"
OutputFile="$(OutDir)\vmopsservice.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="&quot;$(TargetPath)&quot; /RegServer"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\bin\release"
IntermediateDirectory="..\bin\release\service"
ConfigurationType="1"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/VMOpsInstanceManager.tlb"
HeaderFileName="VMOpsInstanceManager_i.h"
DLLDataFileName=""
InterfaceIdentifierFileName="VMOpsInstanceManager_i.c"
ProxyFileName="VMOpsInstanceManager_p.c"
ValidateParameters="true"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\h"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_ATL_NO_COM_SUPPORT"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="netapi32.lib iphlpapi.lib wininet.lib"
OutputFile="$(OutDir)\vmopsservice.exe"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="&quot;$(TargetPath)&quot; /RegServer"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\ThreadUtil.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\VMOps Instance Manager.cpp"
>
</File>
<File
RelativePath=".\VMOpsInstanceManager.idl"
>
</File>
<File
RelativePath=".\VMOpsLogger.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\VMOpsServiceProvider.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\VMOpsStartupWatcher.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\Resource.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
<File
RelativePath=".\targetver.h"
>
</File>
<File
RelativePath=".\ThreadUtil.h"
>
</File>
<File
RelativePath="..\..\h\VMOpsError.h"
>
</File>
<File
RelativePath=".\VMOpsServiceImpl.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\VMOps Instance Manager.rc"
>
</File>
<File
RelativePath=".\VMOps Instance Manager.rgs"
>
</File>
</Filter>
<Filter
Name="Generated Files"
SourceControlFiles="false"
>
<File
RelativePath=".\VMOpsInstanceManager_i.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
CompileAsManaged="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
CompileAsManaged="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\VMOpsInstanceManager_i.h"
>
</File>
</Filter>
<File
RelativePath=".\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,195 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{212919B4-2196-44B8-B026-A351E4D8F19A}</ProjectGuid>
<RootNamespace>VMOps Instance Manager</RootNamespace>
<Keyword>AtlProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\debug\service\</IntDir>
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\release\service\</IntDir>
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)VMOpsInstanceManager.tlb</TypeLibraryName>
<HeaderFileName>VMOpsInstanceManager_i.h</HeaderFileName>
<DllDataFileName>
</DllDataFileName>
<InterfaceIdentifierFileName>VMOpsInstanceManager_i.c</InterfaceIdentifierFileName>
<ProxyFileName>VMOpsInstanceManager_p.c</ProxyFileName>
<ValidateAllParameters>true</ValidateAllParameters>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\h;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_ATL_NO_COM_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>netapi32.lib;iphlpapi.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)vmopsservice.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>"$(TargetPath)" /RegServer</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<TargetEnvironment>Win32</TargetEnvironment>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)VMOpsInstanceManager.tlb</TypeLibraryName>
<HeaderFileName>VMOpsInstanceManager_i.h</HeaderFileName>
<DllDataFileName>
</DllDataFileName>
<InterfaceIdentifierFileName>VMOpsInstanceManager_i.c</InterfaceIdentifierFileName>
<ProxyFileName>VMOpsInstanceManager_p.c</ProxyFileName>
<ValidateAllParameters>true</ValidateAllParameters>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\h;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_ATL_NO_COM_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>netapi32.lib;iphlpapi.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)vmopsservice.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Message>Performing registration</Message>
<Command>"$(TargetPath)" /RegServer</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="ThreadUtil.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VMOps Instance Manager.cpp" />
<ClCompile Include="VMOpsLogger.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VMOpsServiceProvider.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VMOpsStartupWatcher.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VMOpsInstanceManager_i.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Midl Include="VMOpsInstanceManager.idl" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="ThreadUtil.h" />
<ClInclude Include="..\..\h\VMOpsError.h" />
<ClInclude Include="VMOpsServiceImpl.h" />
<ClInclude Include="VMOpsInstanceManager_i.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VMOps Instance Manager.rc" />
</ItemGroup>
<ItemGroup>
<None Include="VMOps Instance Manager.rgs" />
<None Include="ReadMe.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{2cbb01a5-ccfa-49ef-8fa6-a09acdc1f899}</UniqueIdentifier>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ThreadUtil.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="VMOps Instance Manager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="VMOpsLogger.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="VMOpsServiceProvider.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="VMOpsStartupWatcher.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="VMOpsInstanceManager_i.c">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Midl Include="VMOpsInstanceManager.idl">
<Filter>Source Files</Filter>
</Midl>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ThreadUtil.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\h\VMOpsError.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="VMOpsServiceImpl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="VMOpsInstanceManager_i.h">
<Filter>Generated Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VMOps Instance Manager.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="VMOps Instance Manager.rgs">
<Filter>Resource Files</Filter>
</None>
<None Include="ReadMe.txt" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="VMOps Instance ManagerPS"
ProjectGUID="{AE393B26-416D-4C07-833E-CCB2D73C1EC1}"
Keyword="AtlPSProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)PS"
IntermediateDirectory="$(ConfigurationName)PS"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Checking for required files"
CommandLine="if exist dlldata.c goto :END&#x0D;&#x0A;echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.&#x0D;&#x0A;Exit 1&#x0D;&#x0A;:END&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0500;REGISTER_PROXY_DLL;_DEBUG"
RuntimeLibrary="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RegisterOutput="true"
AdditionalDependencies="kernel32.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
ModuleDefinitionFile="VMOps Instance ManagerPS.def"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)PS"
IntermediateDirectory="$(ConfigurationName)PS"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Checking for required files"
CommandLine="if exist dlldata.c goto :END&#x0D;&#x0A;echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.&#x0D;&#x0A;Exit 1&#x0D;&#x0A;:END&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0500;REGISTER_PROXY_DLL;NDEBUG"
RuntimeLibrary="2"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RegisterOutput="true"
AdditionalDependencies="kernel32.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
ModuleDefinitionFile="VMOps Instance ManagerPS.def"
OptimizeReferences="2"
EnableCOMDATFolding="2"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
>
</Filter>
<Filter
Name="Generated Files"
SourceControlFiles="false"
>
<File
RelativePath=".\dlldata.c"
>
</File>
<File
RelativePath=".\VMOpsInstanceManager_i.c"
>
</File>
<File
RelativePath=".\VMOpsInstanceManager_p.c"
>
</File>
</Filter>
<File
RelativePath=".\VMOps Instance Managerps.def"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,8 @@
LIBRARY "VMOps Instance ManagerPS"
EXPORTS
DllGetClassObject PRIVATE
DllCanUnloadNow PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE

View File

@ -0,0 +1,18 @@
// VMOpsInstanceManager.idl : IDL source for VMOps Instance Manager
//
// This file will be processed by the MIDL tool to
// produce the type library (VMOpsInstanceManager.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
uuid(5F9080A7-CF0E-4EC5-B461-9B817882DF23),
version(1.0),
helpstring("VMOpsInstanceManager 1.0 Type Library")
]
library VMOpsInstanceManagerLib
{
importlib("stdole2.tlb");
};

View File

@ -0,0 +1,116 @@
//
// VMOpsLogger.cpp
// VMOps instance manager implementation
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#include "VMOpsServiceImpl.h"
#include <atlbase.h>
#define MAX_LOGFILE_SIZE 1000000 // 1M
using namespace VMOps;
/////////////////////////////////////////////////////////////////////////////
// CLogger
//
CLogger* CLogger::s_pInstance = NULL;
CLogger::CLogger()
{
_ASSERTE(s_pInstance == NULL);
s_pInstance = this;
m_pFile = NULL;
}
CLogger::~CLogger()
{
if(m_pFile != NULL)
fclose(m_pFile);
}
BOOL CLogger::Initialize()
{
TCHAR achPath[_MAX_PATH];
TCHAR achDrive[_MAX_DRIVE];
TCHAR achDir[_MAX_DIR];
GetModuleFileName(NULL, achPath, _MAX_PATH);
_tsplitpath(achPath, achDrive, achDir, NULL, NULL);
_tmakepath(achPath, achDrive, achDir, _T("vmops"), _T(".log"));
m_pFile = _tfopen(achPath, _T("a+"));
return m_pFile != NULL;
}
void CLogger::RotateLog()
{
TCHAR achPath[_MAX_PATH];
TCHAR achDrive[_MAX_DRIVE];
TCHAR achDir[_MAX_DIR];
GetModuleFileName(NULL, achPath, _MAX_PATH);
_tsplitpath(achPath, achDrive, achDir, NULL, NULL);
_tmakepath(achPath, achDrive, achDir, _T("vmops"), _T(".log"));
TCHAR achPath2[_MAX_PATH];
GetModuleFileName(NULL, achPath2, _MAX_PATH);
_tsplitpath(achPath2, achDrive, achDir, NULL, NULL);
_tmakepath(achPath2, achDrive, achDir, _T("vmops"), _T(".log.bak"));
MoveFileEx(achPath, achPath2, MOVEFILE_REPLACE_EXISTING);
}
void CLogger::Cleanup()
{
if(m_pFile != NULL)
fclose(m_pFile);
m_pFile = NULL;
}
void CLogger::Log(LPCSTR lpszCategory, LPCSTR lpszFormat, ...)
{
CLock lock(m_lock);
if(m_pFile != NULL)
{
SYSTEMTIME tm;
DWORD dwProcessId = GetCurrentProcessId();
DWORD dwThreadId = GetCurrentThreadId();
GetSystemTime(&tm);
fprintf(m_pFile, "[%02u/%02u/%04u %02u:%02u:%02u.%03u][pid:%lu][tid:%lu][%s] ",
tm.wMonth, tm.wDay, tm.wYear, tm.wHour, tm.wMinute, tm.wSecond, tm.wMilliseconds,
dwProcessId, dwThreadId, lpszCategory);
va_list argMark;
va_start(argMark, lpszFormat);
vfprintf(m_pFile, lpszFormat, argMark);
va_end(argMark);
fprintf(m_pFile, "\n");
fflush(m_pFile);
if(ftell(m_pFile) > MAX_LOGFILE_SIZE)
{
fclose(m_pFile);
m_pFile = NULL;
RotateLog();
// reopen it
Initialize();
}
}
}
CLogger* CLogger::GetInstance()
{
return s_pInstance;
}
CLogger g_logger;
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,100 @@
//
// VMOpsServiceImpl.h
// VMOps instance manager implementation
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#ifndef __VMOpsServiceImpl_H__
#define __VMOpsServiceImpl_H__
#include "VMOpsError.h"
#include "ThreadUtil.h"
#include <stdio.h>
namespace VMOps {
/////////////////////////////////////////////////////////////////////////////
// class diagram
//
class CVMOpsServiceProvider;
class CThread;
class CVMOpsStartupWatcher;
class CLogger;
/////////////////////////////////////////////////////////////////////////////
// CVMOpsServiceProvider
//
class CVMOpsServiceProvider
{
public :
CVMOpsServiceProvider();
~CVMOpsServiceProvider();
public :
HERROR SetPassword(LPCTSTR lpszUserName, LPCTSTR lpszPassword);
HERROR GetDefaultGateway(LPSTR lpszBuf, LPDWORD pdwLength);
HERROR SimpleHttpGet(LPCTSTR lpszUrl, LPCTSTR lpszHeaders,
LPVOID pOutputBuffer, DWORD dwBytesToRead, DWORD* pdwBytesRead);
HERROR Start();
HERROR Stop();
protected :
CVMOpsStartupWatcher* m_pWatcher;
};
/////////////////////////////////////////////////////////////////////////////
// CVMOpsStartupWatcher
//
class CVMOpsStartupWatcher : public CThread
{
public :
CVMOpsStartupWatcher(CVMOpsServiceProvider* pProvider);
virtual ~CVMOpsStartupWatcher();
public :
CVMOpsServiceProvider* GetProvider() { return m_pProvider; }
protected :
virtual DWORD ThreadRun();
BOOL DoStartupConfig();
BOOL GetDomRUrl(LPTSTR lpszUrl);
protected :
CVMOpsServiceProvider* m_pProvider;
};
/////////////////////////////////////////////////////////////////////////////
// CLogger
// A simple logger for internal use
//
class CLogger
{
public :
CLogger();
~CLogger();
public :
static CLogger* GetInstance();
BOOL Initialize();
void RotateLog();
void Cleanup();
void Log(LPCSTR lpszCategory, LPCSTR lpszFormat, ...);
private :
CCriticalSection m_lock;
FILE* m_pFile;
private :
static CLogger* s_pInstance;
};
}
#endif // __VMOpsServiceProvider_H__
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,183 @@
//
// VMOpsServiceProvider.cpp
// VMOps instance manager implementation
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#include "VMOpsServiceImpl.h"
#include <atlbase.h>
#include <atlconv.h>
#include <lm.h>
#include <iptypes.h>
#include <iphlpapi.h>
#include <wininet.h>
using namespace VMOps;
CVMOpsServiceProvider::CVMOpsServiceProvider()
{
m_pWatcher = NULL;
}
CVMOpsServiceProvider::~CVMOpsServiceProvider()
{
if(m_pWatcher != NULL)
delete m_pWatcher;
}
HERROR CVMOpsServiceProvider::SetPassword(LPCTSTR lpszUserName, LPCTSTR lpszPassword)
{
_ASSERTE(lpszUserName != NULL);
USES_CONVERSION;
USER_INFO_1003 ui;
ui.usri1003_password = T2W((LPTSTR)lpszPassword);
NET_API_STATUS status = NetUserSetInfo(NULL, T2W((LPTSTR)lpszUserName), 1003, (LPBYTE)&ui, NULL);
if(status != NERR_Success)
{
switch(status)
{
case ERROR_ACCESS_DENIED :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : ERROR_ACCESS_DENIED");
break;
case ERROR_INVALID_PARAMETER :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : ERROR_INVALID_PARAMETER");
break;
case NERR_InvalidComputer :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_InvalidComputer");
break;
case NERR_NotPrimary :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_NotPrimary");
break;
case NERR_SpeGroupOp :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_SpeGroupOp");
break;
case NERR_LastAdmin :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_LastAdmin");
break;
case NERR_BadPassword :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_BadPassword");
break;
case NERR_PasswordTooShort :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_PasswordTooShort");
break;
case NERR_UserNotFound :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : NERR_UserNotFound");
break;
default :
CLogger::GetInstance()->Log("ERROR", "SetPassword failed with error : 0x%lx", (DWORD)status);
break;
}
return HERROR_FAIL;
}
return HERROR_SUCCESS;
}
HERROR CVMOpsServiceProvider::GetDefaultGateway(LPSTR lpszBuf, LPDWORD pdwLength)
{
_ASSERTE(pdwLength);
PIP_ADAPTER_INFO pAdapter = NULL;
DWORD dwBufLength = 0;
GetAdaptersInfo(NULL, &dwBufLength);
if(dwBufLength == 0)
return HERROR_FAIL;
pAdapter = (PIP_ADAPTER_INFO)new BYTE[dwBufLength];
if ((GetAdaptersInfo( pAdapter, &dwBufLength)) != NO_ERROR)
{
delete [] (LPBYTE)pAdapter;
return HERROR_FAIL;
}
HERROR hReturn = HERROR_NOT_FOUND;
while (pAdapter)
{
if(pAdapter->GatewayList.IpAddress.String != NULL && pAdapter->GatewayList.IpAddress.String[0] != 0)
{
if(*pdwLength < strlen(pAdapter->GatewayList.IpAddress.String) + 1)
{
*pdwLength = strlen(pAdapter->GatewayList.IpAddress.String) + 1;
hReturn = HERROR_INSUFFICIENT_BUFFER;
} else {
_ASSERTE(lpszBuf);
strcpy(lpszBuf, pAdapter->GatewayList.IpAddress.String);
hReturn = HERROR_SUCCESS;
}
break;
}
pAdapter = pAdapter->Next;
}
delete [] (LPBYTE)pAdapter;
return hReturn;
}
HERROR CVMOpsServiceProvider::SimpleHttpGet(LPCTSTR lpszUrl, LPCTSTR lpszHeaders,
LPVOID pOutputBuffer, DWORD dwBytesToRead, DWORD* pdwBytesRead)
{
HINTERNET hInternet = InternetOpen(_T("VMOps Instance Manager"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
if(hInternet == NULL)
return HERROR_FAIL;
HINTERNET hConnection = InternetOpenUrl(hInternet, lpszUrl, lpszHeaders, -1,
INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_UI, NULL);
if(hConnection == NULL)
{
InternetCloseHandle(hInternet);
return HERROR_FAIL;
}
if(!InternetReadFile(hConnection, pOutputBuffer, dwBytesToRead, pdwBytesRead))
{
InternetCloseHandle(hConnection);
InternetCloseHandle(hInternet);
return HERROR_FAIL;
}
InternetCloseHandle(hConnection);
InternetCloseHandle(hInternet);
return HERROR_SUCCESS;
}
HERROR CVMOpsServiceProvider::Start()
{
CLogger::GetInstance()->Log("INFO", "VMOps instance Management Service started");
m_pWatcher = new CVMOpsStartupWatcher(this);
m_pWatcher->Create(0);
CLogger::GetInstance()->Log("INFO", "VMOps instance Management startup watcher started");
return HERROR_SUCCESS;
}
HERROR CVMOpsServiceProvider::Stop()
{
if(m_pWatcher != NULL)
{
m_pWatcher->Stop();
CLogger::GetInstance()->Log("INFO", "VMOps instance Management startup watcher stopped");
}
CLogger::GetInstance()->Log("INFO", "VMOps instance Management Service stopped");
return HERROR_SUCCESS;
}
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,170 @@
//
// VMOpsStartupWatcher.cpp
// VMOps instance manager implementation
//
// Copyright (C) VMOps Inc.
// All rights reserved.
//
#include "VMOpsServiceImpl.h"
#include <atlbase.h>
using namespace VMOps;
#define RETRY_INTERVAL 1000
#define MAX_WAIT_TIME 1800000 // 30 minutes
/////////////////////////////////////////////////////////////////////////////
// Helpers
//
BOOL IsMiniSetupInProgess()
{
CRegKey key;
if(key.Open(HKEY_LOCAL_MACHINE, _T("SYSTEM\\Setup"), KEY_READ) == ERROR_SUCCESS)
{
DWORD dwValue = 0;
key.QueryDWORDValue(_T("SystemSetupInProgress"), dwValue);
if(dwValue != 0)
{
CLogger::GetInstance()->Log("INFO", "Mini-setup is in pregress");
}
return dwValue != 0;
}
else
{
CLogger::GetInstance()->Log("INFO", "Mini-setup information is not present");
}
return FALSE;
}
/////////////////////////////////////////////////////////////////////////////
// CVMOpsStartupWatcher
//
CVMOpsStartupWatcher::CVMOpsStartupWatcher(CVMOpsServiceProvider* pProvider)
{
_ASSERTE(pProvider);
m_pProvider = pProvider;
}
CVMOpsStartupWatcher::~CVMOpsStartupWatcher()
{
}
DWORD CVMOpsStartupWatcher::ThreadRun()
{
DWORD dwStartTick = GetTickCount();
while(TRUE)
{
if(WaitForSingleObject(GetStopEventHandle(), RETRY_INTERVAL) == WAIT_OBJECT_0)
break;
if(DoStartupConfig())
break;
if(GetTickCount() - dwStartTick > MAX_WAIT_TIME)
{
CLogger::GetInstance()->Log("WARN", "Unable to contact default gateway, give up trying after 30 minutes");
break;
}
}
return 0;
}
BOOL CVMOpsStartupWatcher::GetDomRUrl(LPTSTR lpszUrl)
{
// asumming we have enough space in lpszUrl
char achBuf[256];
achBuf[0] = 0;
DWORD dwLength = sizeof(achBuf);
if(m_pProvider->GetDefaultGateway(achBuf, &dwLength) == HERROR_SUCCESS)
{
USES_CONVERSION;
char achUrl[256];
sprintf(achUrl, "http://%s:8080/", achBuf);
lstrcpy(lpszUrl, A2T(achUrl));
return TRUE;
}
return FALSE;
}
BOOL CVMOpsStartupWatcher::DoStartupConfig()
{
USES_CONVERSION;
if(IsMiniSetupInProgess())
{
CLogger::GetInstance()->Log("INFO", "Mini-setup is detected, skip VMOps startup configuratin process");
return TRUE;
}
TCHAR achUrl[256];
char achResult[256];
memset(achUrl, 0, sizeof(achUrl));
GetDomRUrl(achUrl);
if(achUrl[0] != 0)
{
CLogger::GetInstance()->Log("INFO", "Contact default gateway at : %ws", achUrl);
memset(achResult, 0, sizeof(achResult));
DWORD dwBytesToRead = sizeof(achResult) - 1;
DWORD dwBytesRead = 0;
if(m_pProvider->SimpleHttpGet(achUrl, _T("DomU_Request: send_my_password"),
achResult, dwBytesToRead, &dwBytesRead) == HERROR_SUCCESS)
{
achResult[dwBytesRead] = 0;
//Trim whitespace at tail
int nPos = strlen(achResult) - 1;
while(nPos > 0)
{
if(strchr(" \t\r\n", achResult[nPos]) != NULL)
achResult[nPos] = 0;
else
break;
nPos--;
}
if(strcmp(achResult, "saved_password") != 0)
{
CLogger::GetInstance()->Log("INFO", "Need to set new password for this VM. First letter in password : %c", achResult[0]);
if(m_pProvider->SetPassword(_T("Administrator"), A2T(achResult)) == HERROR_SUCCESS)
{
CLogger::GetInstance()->Log("INFO", "New password has been set for this VM");
memset(achResult, 0, sizeof(achResult));
m_pProvider->SimpleHttpGet(achUrl, _T("DomU_Request: saved_password"),
achResult, dwBytesToRead, &dwBytesRead);
}
else
{
CLogger::GetInstance()->Log("ERROR", "Error to set new password");
return FALSE;
}
}
else
{
CLogger::GetInstance()->Log("INFO", "No need to set password");
}
}
else
{
CLogger::GetInstance()->Log("ERROR", "Unable to contact default gateway at : %ws", achUrl);
return FALSE;
}
return TRUE;
}
return FALSE;
}
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,5 @@
// stdafx.cpp : source file that includes just the standard includes
// VMOps Instance Manager.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -0,0 +1,23 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#ifndef STRICT
#define STRICT
#endif
#include "targetver.h"
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#include "resource.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
using namespace ATL;

View File

@ -0,0 +1,26 @@
#pragma once
// The following macros define the minimum required platform. The minimum required platform
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
// your application. The macros work by enabling all features available on platform versions up to and
// including the version specified.
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,856 @@
"DeployProject"
{
"VSVersion" = "3:800"
"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"
"IsWebType" = "8:FALSE"
"ProjectName" = "8:setup"
"LanguageId" = "3:1033"
"CodePage" = "3:1252"
"UILanguageId" = "3:1033"
"SccProjectName" = "8:"
"SccLocalPath" = "8:"
"SccAuxPath" = "8:"
"SccProvider" = "8:"
"Hierarchy"
{
"Entry"
{
"MsmKey" = "8:_3A5BDE922A5348F180B97034CE37C1BF"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_421F387C3C8BE5A8FA70EAB78A715FD0"
"OwnerKey" = "8:_3A5BDE922A5348F180B97034CE37C1BF"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_4F2493FEFBCA4539E21F5514BE9A3E3D"
"OwnerKey" = "8:_3A5BDE922A5348F180B97034CE37C1BF"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_ED21EE548BA9C60849ECACC981B5EA9E"
"OwnerKey" = "8:_3A5BDE922A5348F180B97034CE37C1BF"
"MsmSig" = "8:_UNDEFINED"
}
}
"Configurations"
{
"Debug"
{
"DisplayName" = "8:Debug"
"IsDebugOnly" = "11:TRUE"
"IsReleaseOnly" = "11:FALSE"
"OutputFilename" = "8:..\\bin\\Debug\\VMOpsInstanceManager.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
"Compression" = "3:2"
"SignOutput" = "11:FALSE"
"CertificateFile" = "8:"
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
{
"Name" = "8:Windows Installer 3.1"
"ProductCode" = "8:Microsoft.Windows.Installer.3.1"
}
}
}
}
"Release"
{
"DisplayName" = "8:Release"
"IsDebugOnly" = "11:FALSE"
"IsReleaseOnly" = "11:TRUE"
"OutputFilename" = "8:..\\bin\\Release\\VMOpsInstanceManager.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
"Compression" = "3:2"
"SignOutput" = "11:FALSE"
"CertificateFile" = "8:"
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
{
"Name" = "8:Windows Installer 3.1"
"ProductCode" = "8:Microsoft.Windows.Installer.3.1"
}
}
}
}
}
"Deployable"
{
"CustomAction"
{
"{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_B14ADAD548D742CD88000A203740D9D4"
{
"Name" = "8:Primary Output from VMOps Instance Manager (Active)"
"Condition" = "8:"
"Object" = "8:_3A5BDE922A5348F180B97034CE37C1BF"
"FileType" = "3:2"
"InstallAction" = "3:1"
"Arguments" = "8:/Service"
"EntryPoint" = "8:"
"Sequence" = "3:1"
"Identifier" = "8:_9003A5D7_BC92_49C4_8F1B_2B43EAB4A5D3"
"InstallerClass" = "11:FALSE"
"CustomActionData" = "8:"
}
"{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_F72BD84453EE4E7A84BC2FE586E82454"
{
"Name" = "8:Primary Output from VMOps Instance Manager (Active)"
"Condition" = "8:"
"Object" = "8:_3A5BDE922A5348F180B97034CE37C1BF"
"FileType" = "3:2"
"InstallAction" = "3:4"
"Arguments" = "8:/UnregServer"
"EntryPoint" = "8:"
"Sequence" = "3:1"
"Identifier" = "8:_BED635F7_F779_4DCF_9D15_A6B084832831"
"InstallerClass" = "11:FALSE"
"CustomActionData" = "8:"
}
}
"DefaultFeature"
{
"Name" = "8:DefaultFeature"
"Title" = "8:"
"Description" = "8:"
}
"ExternalPersistence"
{
"LaunchCondition"
{
}
}
"File"
{
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_421F387C3C8BE5A8FA70EAB78A715FD0"
{
"SourcePath" = "8:WININET.dll"
"TargetName" = "8:WININET.dll"
"Tag" = "8:"
"Folder" = "8:_C239EFF6D5514C779D4C4F9566A171B8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4F2493FEFBCA4539E21F5514BE9A3E3D"
{
"SourcePath" = "8:NETAPI32.dll"
"TargetName" = "8:NETAPI32.dll"
"Tag" = "8:"
"Folder" = "8:_C239EFF6D5514C779D4C4F9566A171B8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D7F1DD58C60C46D1BDEB8499DC8150FA"
{
"SourcePath" = "8:header_logo.JPG"
"TargetName" = "8:header_logo.JPG"
"Tag" = "8:"
"Folder" = "8:_C239EFF6D5514C779D4C4F9566A171B8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:FALSE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_ED21EE548BA9C60849ECACC981B5EA9E"
{
"SourcePath" = "8:IPHLPAPI.DLL"
"TargetName" = "8:IPHLPAPI.DLL"
"Tag" = "8:"
"Folder" = "8:_C239EFF6D5514C779D4C4F9566A171B8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:TRUE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
}
"FileType"
{
}
"Folder"
{
"{1525181F-901A-416C-8A58-119130FE478E}:_7F56AB2507E84461833EDE384F6E7F70"
{
"Name" = "8:#1916"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:DesktopFolder"
"Folders"
{
}
}
"{3C67513D-01DD-4637-8A68-80971EB9504F}:_C239EFF6D5514C779D4C4F9566A171B8"
{
"DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
"Name" = "8:#1925"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:TARGETDIR"
"Folders"
{
}
}
"{1525181F-901A-416C-8A58-119130FE478E}:_C90EDD7FDE3941EA91C39526154D99D5"
{
"Name" = "8:#1919"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:ProgramMenuFolder"
"Folders"
{
}
}
}
"LaunchCondition"
{
}
"Locator"
{
}
"MsiBootstrapper"
{
"LangId" = "3:1033"
"RequiresElevation" = "11:FALSE"
}
"Product"
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:VMOps VM Instance Manager"
"ProductCode" = "8:{CF1EDAC1-1EF6-495A-8211-8EECEE496060}"
"PackageCode" = "8:{DAFE57B9-3DAB-4A0D-92AF-3C77C3EE4208}"
"UpgradeCode" = "8:{24149E96-AFD7-4183-8507-7778FC637D39}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:FALSE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.0.0"
"Manufacturer" = "8:VMOps, Inc."
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:Setup VMOps VM Instance Manager"
"Subject" = "8:"
"ARPCONTACT" = "8:VMOps, Inc."
"Keywords" = "8:"
"ARPCOMMENTS" = "8:"
"ARPURLINFOABOUT" = "8:http://www.vmops.com/"
"ARPPRODUCTICON" = "8:"
"ARPIconIndex" = "3:0"
"SearchPath" = "8:"
"UseSystemSearchPath" = "11:TRUE"
"TargetPlatform" = "3:0"
"PreBuildEvent" = "8:"
"PostBuildEvent" = "8:"
"RunPostBuildEvent" = "3:0"
}
"Registry"
{
"HKLM"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_8975FC05ADD34A2C9C94A4946B6B9DC7"
{
"Name" = "8:Software"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_F965FA19BE9E47CBB56C35DA53243F90"
{
"Name" = "8:[Manufacturer]"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
}
}
}
"Values"
{
}
}
}
}
"HKCU"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_757532B8569C41658C923D4E6880474B"
{
"Name" = "8:Software"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_22E674931CCB42B5B9D0860722E164AC"
{
"Name" = "8:[Manufacturer]"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
}
}
}
"Values"
{
}
}
}
}
"HKCR"
{
"Keys"
{
}
}
"HKU"
{
"Keys"
{
}
}
"HKPU"
{
"Keys"
{
}
}
}
"Sequences"
{
}
"Shortcut"
{
}
"UserInterface"
{
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_13AF80F70FA7450DBD841A3930D9DCF8"
{
"Name" = "8:#1902"
"Sequence" = "3:1"
"Attributes" = "3:3"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_55E74A33BB7F4F16AE27ED3648472802"
{
"Sequence" = "3:100"
"DisplayName" = "8:Finished"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
"UpdateText"
{
"Name" = "8:UpdateText"
"DisplayName" = "8:#1058"
"Description" = "8:#1158"
"Type" = "3:15"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1258"
"DefaultValue" = "8:#1258"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_2711BD9D13914FEF9228CFDEF845A022"
{
"Name" = "8:#1900"
"Sequence" = "3:2"
"Attributes" = "3:1"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_4E89AD5D95794FCFB5370B41D458765C"
{
"Sequence" = "3:200"
"DisplayName" = "8:Installation Folder"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_6D87C958A9524610A19F2A0996123D12"
{
"Sequence" = "3:100"
"DisplayName" = "8:Welcome"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
"CopyrightWarning"
{
"Name" = "8:CopyrightWarning"
"DisplayName" = "8:#1002"
"Description" = "8:#1102"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1202"
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
"Welcome"
{
"Name" = "8:Welcome"
"DisplayName" = "8:#1003"
"Description" = "8:#1103"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1203"
"DefaultValue" = "8:#1203"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7B22E2DB76EB46F6B5FABAFDE7EE287B"
{
"Sequence" = "3:300"
"DisplayName" = "8:Confirm Installation"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_2CE21F052A5F4CF2B1474714042DB343"
{
"Name" = "8:#1901"
"Sequence" = "3:2"
"Attributes" = "3:2"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F5D3FD2DE7EA423E891EDD2928B83871"
{
"Sequence" = "3:100"
"DisplayName" = "8:Progress"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
"ShowProgress"
{
"Name" = "8:ShowProgress"
"DisplayName" = "8:#1009"
"Description" = "8:#1109"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_597B01D8B0D24A20A6FB19FF3456BCAF"
{
"Name" = "8:#1901"
"Sequence" = "3:1"
"Attributes" = "3:2"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_74DF525F83104968988C3845E2757E95"
{
"Sequence" = "3:100"
"DisplayName" = "8:Progress"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
"ShowProgress"
{
"Name" = "8:ShowProgress"
"DisplayName" = "8:#1009"
"Description" = "8:#1109"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_7AC32BD0776244C288C5775BB4C9EE01"
{
"UseDynamicProperties" = "11:FALSE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9B11848351C44B188FFB7418A41FD034"
{
"Name" = "8:#1900"
"Sequence" = "3:1"
"Attributes" = "3:1"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_1FE221E045F04C21BF3078350AA9BED0"
{
"Sequence" = "3:300"
"DisplayName" = "8:Confirm Installation"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_670742915D784306BCFD05B763D8BC15"
{
"Sequence" = "3:200"
"DisplayName" = "8:Installation Folder"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
"InstallAllUsersVisible"
{
"Name" = "8:InstallAllUsersVisible"
"DisplayName" = "8:#1059"
"Description" = "8:#1159"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_CB398615CFB146AE91B355ECB7E4FFF1"
{
"Sequence" = "3:100"
"DisplayName" = "8:Welcome"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
"CopyrightWarning"
{
"Name" = "8:CopyrightWarning"
"DisplayName" = "8:#1002"
"Description" = "8:#1102"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1202"
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
"Welcome"
{
"Name" = "8:Welcome"
"DisplayName" = "8:#1003"
"Description" = "8:#1103"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1203"
"DefaultValue" = "8:#1203"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_D577B05A75CD440184C222CB42F95A58"
{
"UseDynamicProperties" = "11:FALSE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_EFFC4D98DC5B4D89B44B6D96FF78936A"
{
"Name" = "8:#1902"
"Sequence" = "3:2"
"Attributes" = "3:3"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_172D85EB7DDD45CEBC60093A285B85C9"
{
"Sequence" = "3:100"
"DisplayName" = "8:Finished"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:2"
"Value" = "8:_D7F1DD58C60C46D1BDEB8499DC8150FA"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
}
"MergeModule"
{
}
"ProjectOutput"
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_3A5BDE922A5348F180B97034CE37C1BF"
{
"SourcePath" = "8:..\\bin\\release\\vmopsservice.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_C239EFF6D5514C779D4C4F9566A171B8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
"ProjectOutputGroupRegister" = "3:1"
"OutputConfiguration" = "8:"
"OutputGroupCanonicalName" = "8:Built"
"OutputProjectGuid" = "8:{212919B4-2196-44B8-B026-A351E4D8F19A}"
"ShowKeyOutput" = "11:TRUE"
"ExcludeFilters"
{
}
}
}
}
}