Skip to content

Commit f23f147

Browse files
committed
Working plugin prototype
1 parent 0898dcf commit f23f147

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

src/CcgPlugin/CcgCredProvider.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.EnterpriseServices;
23
using System.IO;
34
using System.Runtime.CompilerServices;
45
using System.Runtime.InteropServices;
@@ -11,7 +12,7 @@ namespace CcgPlugin
1112
[ComImport]
1213
public interface ICcgDomainAuthCredentials
1314
{
14-
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
15+
// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
1516
void GetPasswordCredentials(
1617
[MarshalAs(UnmanagedType.LPWStr), In] string pluginInput,
1718
[MarshalAs(UnmanagedType.LPWStr)] out string domainName,
@@ -21,9 +22,9 @@ void GetPasswordCredentials(
2122

2223
// [Guid("defff03c-3245-465f-8391-cc586a2d1f31")]
2324
[Guid("defff03c-3245-465f-8391-cc586a2d1f32")]
24-
[ClassInterface(ClassInterfaceType.None)]
25+
// [ClassInterface(ClassInterfaceType.None)]
2526
[ProgId("CcgCredProvider")]
26-
public class CcgCredProvider : ICcgDomainAuthCredentials
27+
public class CcgCredProvider : ServicedComponent, ICcgDomainAuthCredentials
2728
{
2829
public CcgCredProvider()
2930
{

src/CcgPlugin/CcgPlugin.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5+
<LangVersion>latest</LangVersion>
6+
<!-- <EnableComHosting>true</EnableComHosting>-->
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
68
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
79
<ProjectGuid>{8A8F0F10-04A9-4726-9592-22ED3797761B}</ProjectGuid>
@@ -36,6 +38,7 @@
3638
<ItemGroup>
3739
<Reference Include="System" />
3840
<Reference Include="System.Core" />
41+
<Reference Include="System.EnterpriseServices" />
3942
</ItemGroup>
4043
<ItemGroup>
4144
<Compile Include="CcgCredProvider.cs" />

src/CcgPlugin/Properties/AssemblyInfo.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Reflection;
1+
using System.EnterpriseServices;
2+
using System.Reflection;
23
using System.Runtime.InteropServices;
34

45
// General Information about an assembly is controlled through the following
@@ -13,13 +14,24 @@
1314
[assembly: AssemblyTrademark("")]
1415
[assembly: AssemblyCulture("")]
1516

17+
18+
[assembly: ApplicationName("CcgPlugin")]
19+
[assembly: ApplicationActivation(ActivationOption.Server)]
20+
[assembly: ApplicationID("9CBD827C-66B3-493B-8962-445F027970C8")]
21+
[assembly: ApplicationAccessControl(
22+
AccessChecksLevel = AccessChecksLevelOption.Application,
23+
Authentication = AuthenticationOption.None,
24+
Value = false)]
25+
1626
// Setting ComVisible to false makes the types in this assembly not visible
1727
// to COM components. If you need to access a type in this assembly from
1828
// COM, set the ComVisible attribute to true on that type.
19-
[assembly: ComVisible(true)]
29+
// [assembly: ComVisible(true)]
2030

2131
// The following GUID is for the ID of the typelib if this project is exposed to COM
22-
[assembly: Guid("8A8F0F10-04A9-4726-9592-22ED3797761C")]
32+
// [assembly: Guid("8A8F0F10-04A9-4726-9592-22ED3797761C")]
33+
[assembly: Guid("34DC0E7C-37C1-41C1-B3FD-1755A0396308")]
34+
//34DC0E7C-37C1-41C1-B3FD-1755A0396308
2335

2436
// Version information for an assembly consists of the following four values:
2537
//

0 commit comments

Comments
 (0)