D
Dan Holmes
I think i have the basics. I am creating a COM wrapper for my VB6 code
to call an existing assembly. Below is the wrapper. Do COM object
created in C3 need to be in a strongly named assembly? If so what if
the assembly that i am wrapping also depends on an interop layer that
isn't strong named? You can only strong name something that also has
dependencies of strong named assemblies.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace AcmeUnitLabelingComInterop
{
[Guid("5F05CEC4-8979-4aea-86E5-868EBBFF3138")]
public interface IAcmeUnitLabelingCOM
{
[DispId(1)]
bool Printlabel(string LabelXml);
}
[Guid("A5AD09C9-B786-434d-978C-5B5C7CE563B0")
, ClassInterface(ClassInterfaceType.None)]
public class AcmeUnitLabelingComInterop : IAcmeUnitLabelingCOM
{
public AcmeUnitLabelingComInterop() { }
#region IAcmeUnitLabeling Members
bool IAcmeUnitLabelingCOM.Printlabel(string LabelXml)
{
IVSLabeling.UnitLabeling ul = new IVSLabeling.UnitLabeling();
return ul.PrintLabel(LabelXml);
}
#endregion
}
}
to call an existing assembly. Below is the wrapper. Do COM object
created in C3 need to be in a strongly named assembly? If so what if
the assembly that i am wrapping also depends on an interop layer that
isn't strong named? You can only strong name something that also has
dependencies of strong named assemblies.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace AcmeUnitLabelingComInterop
{
[Guid("5F05CEC4-8979-4aea-86E5-868EBBFF3138")]
public interface IAcmeUnitLabelingCOM
{
[DispId(1)]
bool Printlabel(string LabelXml);
}
[Guid("A5AD09C9-B786-434d-978C-5B5C7CE563B0")
, ClassInterface(ClassInterfaceType.None)]
public class AcmeUnitLabelingComInterop : IAcmeUnitLabelingCOM
{
public AcmeUnitLabelingComInterop() { }
#region IAcmeUnitLabeling Members
bool IAcmeUnitLabelingCOM.Printlabel(string LabelXml)
{
IVSLabeling.UnitLabeling ul = new IVSLabeling.UnitLabeling();
return ul.PrintLabel(LabelXml);
}
#endregion
}
}