English 中文(简体)
4. 举行科摩罗问题登记会
原标题:Having trouble registering assembly for COM

我在视力室2008年创建了一个简单的班级图书馆项目,其类别如下。 我试图让这一类人登记参加商行活动,以便我能够通过手稿或手稿等未经管理的文字使用。

在我的项目中,我检查了“Interop注册公司”的盒子。

在议会中,我检查了“使这一大会具有明显意义”,我确认,“<条码>[原文:属性”存在于议会中。 c 档案。

我每次建设这一项目时都会发现一个错误,即“项目名称.dll不包含任何可以登记参加COM Interop的类型。 此外,我还未能成功利用手稿创建第1类案例。 是否有任何人知道这种情况没有适当登记?

我的字稿没有在这个行文上制造活性物体:Set F = CreatObject(“64BitCL 试验.Class1”)

最后,我如何在登记处的64个仲裁区而不是32个仲裁区进行登记,以便64个仲裁程序能够加以利用?

-- The Test Class--
namespace _64BitCLTest
{
    [Guid("BBAA06EF-CA4C-4fe2-97CD-9B1D85ADA656")]
    [ClassInterface(ClassInterfaceType.AutoDual)]
    [ComVisible(true)]
    [ProgId("64BitCLTest.Class1")]
    public class Class1
    {
        Class1()
        {
            // do nothing
        }

        public string Method1()
        {
            return "This is a return string from method 1";
        }

        public int Property1
        {
            get {return 777;}
        }
    }
}
问题回答

你们需要纪念建筑家:

-- The Test Class--
namespace _64BitCLTest
{
    [Guid("BBAA06EF-CA4C-4fe2-97CD-9B1D85ADA656")]
    [ClassInterface(ClassInterfaceType.AutoDual)]
    [ComVisible(true)]
    [ProgId("64BitCLTest.Class1")]
    public class Class1
    {
        public Class1()
        {
            // do nothing
        }

        public string Method1()
        {
            return "This is a return string from method 1";
        }

        public int Property1
        {
            get {return 777;}
        }
    }
}

答案有两个部分。 第一,正如咨询公司所说,问题在于,我没有建筑人作为公共标志。

第二项答案是,2008年VS中有一例(我相信),即使为X64的目标平台配置了安装项目,也不会在登记处64个轨道部分登记集会。

我安装了VS2010,重建了完全相同的项目,并管理了Install。 大会进行了完美的登记,我得以利用64个轨道程序,通过COM成功查阅。 2008年,我仍然没有找到解决办法。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签