473,378 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Do not use AutoDual ClassInterfaceType

53
Hello All,

I am having a C#.Net Windows Control Library Project.. I want to use this control in vb.
for that i have done like this
[ProgId("ProjectName.MyControl ")]
[ClassInterface(ClassInterfaceType.AutoDual)]
[Guid("AA5FC4B1-2BF3-4749-9809-84B93D71A62D")]
public partial class MyControl : UserControl
{
......
}
I have done all the steps that required to register this control to make use in vb 6.0. It is working fine in vb 6.0.

But i am having doubt in [ClassInterface(ClassInterfaceType.AutoDual)]
This msdn link says that Do not use AutoDual ClassInterfaceType. we need to go for [ClassInterface(ClassInterfaceType.None)]
http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.classinterfacetype. aspx

At that time we need to do like this..

[Guid("CAEBF396-B684-4595-9BB0-430C911AD65E")]
public interface DotNetInterface
{

}

[ProgId("ProjectName.MyControl ")]
[ClassInterface(ClassInterfaceType.None)]
[Guid("AA5FC4B1-2BF3-4749-9809-84B93D71A62D")]
public partial class MyControl : UserControl, DotNetInterface
{
......
}

Here can we use that interface which is not having any method signatures..
Is there any way to do this without declaring the interface and i need to use
[ClassInterface(ClassInterfaceType.None)], is there any default interface that i can inherit.....Plz can any body clarify this....
Jan 16 '08 #1
0 2856

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Roy Pereira | last post by:
I have an application that is composed of a set of "Content" dlls and a viewer application. The viewer calls a standard set of functions that are present in all the dlls. I maintain this by...
1
by: Andrew J. Marshall | last post by:
I built my assembly with the "Register for COM Interop" box checked. I could reference my assembly and see the classes, but IntelliSense and the Object Browser could not see the methods nor...
3
by: RickyJack | last post by:
Using XML comments with the following code works correctly: using System; using System.Runtime.InteropServices; namespace test { // /// <summary>Summary description for temp1.</summary>...
7
by: Josef | last post by:
Hello, I want to create a C# class library which I can use in an Excel VBA macro. I created a C# class library and set the "Register for COM Interop" option in Visual Studio to TRUE. Now in...
2
by: Michal | last post by:
Hi. I've sent this message earlier, but maybe it wasn't noticed :) I didn't find solution of my problem :( I hope someone can help me here... I promise, I won't post it again :) The problem...
0
by: Martin Brunner | last post by:
Hi there, I have to use a C#-Library from Excel VBA. This __works__ fine over COM (Reference to the .tlb, that is created by .NET, out of VBA). But only __without__ in C#1 __With__, for...
9
by: Michael Tissington | last post by:
I have created a class with a number of methods and events as described in the MSDN infor for handling events. I am trying to use the attributes GuidAttribute and DispID. The problem that I'm...
9
by: HL | last post by:
I want to use the services of a C# dll from a VB6 client. The C# dll has a public method called "Add". In the C# dll, the class interface type applied for the class is as follows: The Com...
2
by: jpgreenwald | last post by:
Hi all, Im trying to create user defined functions (ones that you can use in the cells of excel) in python. I know that its a ...dumb... thing to do since its a lot easier in other languages...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.