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 787207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:09:57+00:00 2026-05-14T21:09:57+00:00

.NET COM interop so far always has been working quite nicely. Since I upgraded

  • 0

.NET COM interop so far always has been working quite nicely. Since I upgraded to Windows 7 I don’t get my .NET COM objects to work anymore.

My COM object is as easy as:


namespace Crap
{
    [ComVisible(true)]
    [Guid("2134685b-6e22-49ef-a046-74e187ed0d21")]
    [ClassInterface(ClassInterfaceType.None)]
    public class MyClass : IMyClass
    {

        public MyClass()
        {}

        public void Test()
        {
            MessageBox.Show("Finally got in here.");
        }

    }
}



namespace Crap
{
    [Guid("1234685b-6e22-49ef-a046-74e187ed0d21")]
    public interface IMyClass
    {

    }
}


assembly is marked ComVisible as well.

I register the assembly using

regasm /codebase /tlb "path"

registers successfully (admin mode).
I tried regasm 32 and 64bit. Both time I get the error

“ActiveX component cant create object Crap.MyClass” using this vbscript:


dim objReg
Set objReg = CreateObject("Crap.MyClass")
MsgBox typename(objReg)

fuslogvw doesn’t give me any hints either.
That COM object works perfectly on my Vista 32 Bit machine.

I don’t understand why I haven’t been able to google a solution for that problem.. am I really the only person that ever got into that problem?

Looking at OleView I see my object is registered successfully. I am able to create other COM objects as well.. it only does not work with my own ones.

Thank you,
Kevin

  • 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-05-14T21:09:57+00:00Added an answer on May 14, 2026 at 9:09 pm

    I’m not a C# person, but here is a sample that I converted from VB.net. Note, I had to ensure I had a single namespace at the project level, then this class in VB projects. I understand that’s different in C# Projects.

    [ComClass(MyClass.ClassId, MyClass.InterfaceId, MyClass.EventsId)] 
    public class MyClass {
    
        // These  GUIDs provide the COM identity for this class 
        // and its COM interfaces. If you change them, existing 
        // clients will no longer be able to access the class.
        public const string ClassId = "f58411e1-1689-4bf3-a0e1-b49f479e28ba";
        public const string InterfaceId = "f4a575c6-62d2-44eb-af0f-f5b2bb65ad51";
        public const string EventsId = "ad56e4f9-3512-4233-aae4-7d1c2457c08f";
    
        // A creatable COM class must have a Public Sub New() 
        // with no parameters, otherwise, the class will not be 
        // registered in the COM registry and cannot be created 
        // via CreateObject.
        public SalePayStatus() : base()
        {
        }
    }
    

    If I’m concerned about COM, I always check in the registry first to ensure the appropriate entries have been created. I’ve found that versioning and MSI installation cause issues, expecially uninstalling (doesn’t clean up the registry) or re-installed and MSI with .net COM objects that overwrites an existing COM entry causes all sorts of hassles.

    I generally find that you have to be carefull about x64 vs x32 build .net DLLs. For instance you might have to explicitly reference C:\Windows\SysWow64\ or C:\Windows\System32\ editions of the VBS engine.

    Finally if your using VBS in a ASP web site on a x64 server with a x32 COM .net component, then you will need to ensure the IIS 7 Application Pool advanced option Is 32 bit application is correctly set True/False.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an asp.net web site. We have to use com interop to
Is there any free or commercial component written in .NET (no COM interop) that
I'm writing an Excel Addin using COM Interop from .net. I have a command
For my area, I get the updates from ww.asp.net code.google.com www.webmasterworld.com What others do
I am attempting to use the VB.Net Excel COM interop to programmatically change the
I am calling a .Net assembly from a Delphi project using COM interop. Can
I have an asp.net app which uses legacy COM interop library. Works fine until
I have created a VB.NET Class Library that exposes some COM Interop sub routines.
Im having trouble using a .NET COM in vb6, It compiles ok and I
I have a java library that I am accessing in VB.NET via COM. The

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.