This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from WereDev/develop
Develop
- Loading branch information
Showing
108 changed files
with
4,637 additions
and
1,912 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace WereDev.Utils.Win32Wrappers.Models | ||
{ | ||
[StructLayout(LayoutKind.Sequential)] | ||
public class ServiceConfigInfo | ||
{ | ||
[MarshalAs(UnmanagedType.U4)] | ||
public uint ServiceType; | ||
[MarshalAs(UnmanagedType.U4)] | ||
public uint StartType; | ||
[MarshalAs(UnmanagedType.U4)] | ||
public uint ErrorControl; | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string BinaryPathName; | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string LoadOrderGroup; | ||
[MarshalAs(UnmanagedType.U4)] | ||
public uint TagID; | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string Dependencies; | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string ServiceStartName; | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string DisplayName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("WereDev.Utils.Win32Wrappers")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("WereDev")] | ||
[assembly: AssemblyProduct("WereDev.Utils.Win32Wrappers")] | ||
[assembly: AssemblyCopyright("Copyright © 2018-2020")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("11e7c6da-6d2c-4ffd-9b2b-80646fdf9500")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
50 changes: 50 additions & 0 deletions
50
WereDev.Utils.Win32Wrappers/WereDev.Utils.Win32Wrappers.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{11E7C6DA-6D2C-4FFD-9B2B-80646FDF9500}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>WereDev.Utils.Win32Wrappers</RootNamespace> | ||
<AssemblyName>WereDev.Utils.Win32Wrappers</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<RunCodeAnalysis>false</RunCodeAnalysis> | ||
<CodeAnalysisRuleSet>SecurityRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>none</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<RunCodeAnalysis>false</RunCodeAnalysis> | ||
<CodeAnalysisRuleSet> | ||
</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="FileAccessBridge.cs" /> | ||
<Compile Include="Models\ServiceConfigInfo.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="WindowsApiBridge.cs" /> | ||
<Compile Include="WindowsServiceBridge.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 11 additions & 16 deletions
27
Wu10Man/DependencyManager.cs → ...v.Utils.Wu10Man.Core/DependencyManager.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
using Autofac; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace WereDev.Utils.Wu10Man | ||
{ | ||
public static class DependencyManager | ||
{ | ||
public static IContainer Container { get; set; } | ||
|
||
public static T Resolve<T>() => Container.Resolve<T>(); | ||
} | ||
} | ||
using Autofac; | ||
|
||
namespace WereDev.Utils.Wu10Man.Core | ||
{ | ||
public static class DependencyManager | ||
{ | ||
public static IContainer Container { get; set; } | ||
|
||
public static T Resolve<T>() => Container.Resolve<T>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace WereDev.Utils.Wu10Man.Core.Enums | ||
{ | ||
public enum ServiceStartMode | ||
{ | ||
// Summary: | ||
// Indicates that the service is a device driver started by the system loader. This | ||
// value is valid only for device drivers. | ||
Boot = 0, | ||
|
||
// Summary: | ||
// Indicates that the service is a device driver started by the IOInitSystem function. | ||
// This value is valid only for device drivers. | ||
System = 1, | ||
|
||
// Summary: | ||
// Indicates that the service is to be started (or was started) by the operating | ||
// system, at system start-up. If an automatically started service depends on a | ||
// manually started service, the manually started service is also started automatically | ||
// at system startup. | ||
Automatic = 2, | ||
|
||
// Summary: | ||
// Indicates that the service is started only manually, by a user (using the Service | ||
// Control Manager) or by an application. | ||
Manual = 3, | ||
|
||
// Summary: | ||
// Indicates that the service is disabled, so that it cannot be started by a user | ||
// or application. | ||
Disabled = 4, | ||
} | ||
} |
Oops, something went wrong.