Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8376825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:31:06+00:00 2026-06-09T15:31:06+00:00

Before I dig deeper into the rabbit hole… a quick question… is it possible?

  • 0

Before I dig deeper into the rabbit hole… a quick question…

is it possible?

We have this legacy system created in Visual Basic 6 and we are starting to port it to .NET and we want it to be unsigned. The problem is we have to sign our common libraries each time we have updates. (Common libraries is shared across different products).

Since we can’t port everything in an instant, we started porting the server first. Currently we designed the client interfaces to be COM visible so that Visual Basic UIs can invoke them.

Common framework dlls that we have are unsigned which is currently utilized by many projects. But for this product, we need to re-sign them which is too much work to do.

If this is not possible, will there be any other way, like wrapper, or some techniques to workaround this problem?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:31:08+00:00Added an answer on June 9, 2026 at 3:31 pm

    I think this is going to be tricky because of two things (that I guess you have probably already discovered):

    1. You cannot regasm an unsigned library so that it can be exposed to COM.
    2. You cannot reference an unsigned library from a signed one.

    Maybe someone has a better idea but given those two constraints I think the only thing you can do is something nasty with reflection…

    Say you have a class in an unsigned library that you want to expose to COM that looks like this:

    public class TestClass
    {
        public string SaySomething()
        {
            return "Hello";
        }
    }
    

    You can reference a signed assembly from an unsigned one so the first step could be to create an interface for just the bits of your classes you wish to expose to COM and put those interfaces in a new assembly that is signed. In our case say we define the interface thus (you can fiddle with the various COM attributes to make it to your liking):

    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface ITestClass
    {
        string SaySomething();
    }
    

    Now reference that new assembly from your original one and change the class definition so that it implements the interface.

    public class TestClass : ITestClass
    

    Now, go back to your signed assembly and add a little helper factory that looks like this (it is optional to do this but I think doing this in one place is a good idea):

    internal static class ClassFactory
    {
        // Depending on how you aer hosting this you can use a relative 
        // path here (maybe) - this gets a bit tricky to sort out and is
        // most likely what will cause problems
        private static readonly Assembly UnsignedAssembly =
            Assembly.LoadFrom(@"C:\...\COMClassLibrary.dll");
    
        internal static T CreateClass<T>(string typeName)
        {
            return (T)Activator.CreateInstance(UnsignedAssembly.GetType(typeName));
        }
    }
    

    The last step would be to create a wrapped up version of your class that you can expose to COM like so:

    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("MyClasses.TestClass")]
    public class TestClassWrapped : ITestClass
    {
        private readonly ITestClass _original;
    
        public TestClassWrapped()
        {
            _original = ClassFactory.CreateClass<ITestClass>(
                "COMClassLibrary.TestClass");
        }
    
        public string  SaySomething()
        {
            return _original.SaySomething();
        }
    }
    

    Now register your signed assembly for COM using regasm and that should do it. Massively tedious but given your constraints it is the only thing I can think of.

    Suggested reading:

    • Class Interface Attribute
    • Interface Type Attribute
    • RegAsm Command Line
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone run into this before: After updating DNS records..I do a dig for 'test.somedomain.com'
before I start I want to point out that I tagged this question as
Before asking my question, let me explain the context. CONTEXT: I have a web
(Before I start, yes I have asked a similar question before; unfortunately due to
Before I ask the question let me state that I have attempted to google
This wants me to dig deeper in Python sources, but since there are many
I'm 10000000% sure that this question has been asked before, however, the majority of
apologies if this has been answered before, I couldn't dig anything up when searching.
I have use SSRS 2008 before installing SharePoint 2010. I dig around that there
Before asking the question let me preface with the fact that I am new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.