ormico
9/25/2008 9:32:00 PM
I would be highly suspicios that it is your obfuscator. It could be a setting
that is wrong or something else.
As an experiment, try running your same test on an unobfuscated copy of your
dll and see if it registers correctly.
"moakley7842@gmail.com" wrote:
> Yes I am, but everything public for the interface and class will be
> left in clear text. The only public members are methods.
>
>
> On Sep 25, 3:58 pm, ormico <orm...@discussions.microsoft.com> wrote:
> > This might be a dumb question, but are you using an obfuscator?
> >
> >
> >
> > "Family Tree Mike" wrote:
> > > I already understood what you did with regasm. What I was trying to ask was
> > > related to your source code how do you export for COM. One method is
> > > checking the box in the project properties to "Register for COM Interop".
> > > The second way would be to attribute the classes desired for COM. Something
> > > like this:
> >
> > > [Guid("some guid")]
> > > public interface IMyInterface
> > > {
> > > void DoSomething();
> > > }
> >
> > > [ProgId("ProjectName.ClassName")]
> > > [Guid("some guid")]
> > > [ClassInterface(ClassInterfaceType.None)]
> > > public MyClass : IMyInterface
> > > {
> > > public void DoSomething()
> > > {
> > > // Implementation here.
> > > }
> > > }
> >
> > > "moakley7...@gmail.com" wrote:
> >
> > > > Type 'A' is not meaningful. As it was with 1.1 I expected the types
> > > > exported to reflect the names of the interface and class that
> > > > implements the interface. I am using the regasm argument /
> > > > tlb:MyCOM.tlb to export. The original post contains the command
> > > > used. I have used tlbexp.exe and received the same output.
> > > > Thanks, Mike...
> >
> > > > On Sep 25, 7:33 am, Family Tree Mike
> > > > <FamilyTreeM...@discussions.microsoft.com> wrote:
> > > > > Actually, no, I cannot see that the types are wrong, though type 'A' does not
> > > > > seem meaningful. What types did you export for COM, and how did you export
> > > > > them?
> >
> > > > > "moakley7...@gmail.com" wrote:
> > > > > > I have a COM component written in C# that was built using Visual
> > > > > > Studio 2008. Each time I try to register it I get the following:
> >
> > > > > > regasm.exe MyCOM.dll /tlb:MyCOM.tlb /codebase /v
> > > > > > Microsoft (R) .NET Framework Assembly Registration Utility
> > > > > > 2.0.50727.1433
> > > > > > Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
> >
> > > > > > Types registered successfully
> > > > > > Type 'A' exported.
> > > > > > Type 'A' exported.
> > > > > > Assembly exported to 'MyCOM.COM.tlb', and the type library was
> > > > > > registered successfully.
> >
> > > > > > As you can see the types exported are wrong. Cannot be accessed from
> > > > > > unmanaged code. Any suggestions on what I can try?
> > > > > > Mike...- Hide quoted text -
> >
> > > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>
>