Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 120 additions & 7 deletions TestCOMServer/TestCOMServer/COMTestDispatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,115 @@ public interface ICOMTestTypes :
ICOMTestFloat,
ICOMTestDouble,
ICOMTestBoolean
{ }
{
new string StringField
{
get;
set;
}

new int PutString(string value);
new string GetString();

new sbyte Int8Field
{
get;
set;
}

new byte UInt8Field
{
get;
set;
}

new int PutInt8(sbyte value);
new sbyte GetInt8();

new int PutUInt8(byte value);
new byte GetUInt8();

new short Int16Field
{
get;
set;
}

new ushort UInt16Field
{
get;
set;
}

new int PutInt16(short value);
new short GetInt16();

new int PutUInt16(ushort value);
new ushort GetUInt16();

new int Int32Field
{
get;
set;
}

new uint UInt32Field
{
get;
set;
}

new int PutInt32(int value);
new int GetInt32();

new int PutUInt32(uint value);
new uint GetUInt32();

new long Int64Field
{
get;
set;
}

new ulong UInt64Field
{
get;
set;
}

new int PutInt64(long value);
new long GetInt64();

new int PutUInt64(ulong value);
new ulong GetUInt64();

new float Float32Field
{
get;
set;
}

new int PutFloat32(float value);
new float GetFloat32();

new double Float64Field
{
get;
set;
}

new int PutFloat64(double value);
new double GetFloat64();

new bool BooleanField
{
get;
set;
}

new int PutBoolean(bool value);
new bool GetBoolean();
}

[ComVisible(true),
Guid("6485B1EF-D780-4834-A4FE-1EBB51746CA3"),
Expand All @@ -189,26 +297,30 @@ public interface ICOMEchoTestObject
float EchoFloat32(float value);
double EchoFloat64(double value);
string EchoString(string value);
bool EchoBoolean(bool value);
}

[ComVisible(true),
Guid("3C24506A-AE9E-4D50-9157-EF317281F1B0"),
ClassInterface(ClassInterfaceType.AutoDual),
ClassInterface(ClassInterfaceType.None),
ProgId("GOOLE.COMEchoTestObject"),
ComSourceInterfaces(typeof(ICOMEchoTestObject))]
public class COMEchoTestObject : ICOMEchoTestObject
{
public string EchoString(string value)
public COMEchoTestObject()
{
return value;
}

public String EchoString(String value)
{
return value;
}

public sbyte EchoInt8(sbyte value)
{
return value;
}


public byte EchoUInt8(byte value)
{
return value;
Expand Down Expand Up @@ -262,7 +374,8 @@ public bool EchoBoolean(bool value)

[ComVisible(true),
Guid("865B85C5-0334-4AC6-9EF6-AACEC8FC5E86"),
ClassInterface(ClassInterfaceType.AutoDual),
ClassInterface(ClassInterfaceType.None),
ProgId("GOOLE.COMTestScalarClass"),
ComSourceInterfaces(typeof(ICOMTestTypes))]
public class COMTestScalarClass : ICOMTestTypes
{
Expand Down Expand Up @@ -351,7 +464,7 @@ public bool BooleanField
set { rawBoolean = value; }
}

COMTestScalarClass()
public COMTestScalarClass()
{
rawString = "";
rawInt8 = 0;
Expand Down
4 changes: 2 additions & 2 deletions TestCOMServer/TestCOMServer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 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")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
3 changes: 2 additions & 1 deletion TestCOMServer/TestCOMServer/TestCOMServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>false</RegisterForComInterop>
<RegisterForComInterop>true</RegisterForComInterop>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand All @@ -42,6 +42,7 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
Expand Down