We help IT Professionals succeed at work.

Creating an instance error

Camillia
Camillia asked
on
179 Views
Last Modified: 2010-04-15
We have a "dll" code that's written in a proprietory language. It's like VB4 something.
Anyway, I want to use methods of this COM dll.

I did this: (i'm new to C# but want to try it in C# before I go to VB.Net)
I right-clicked on References, found that dll and added it to the References. For example ABCD
In the code I have:
using System.Runtime.InteropServices;
namespace whatever
 {
   public partial class _Default : System.Web.UI.Page {
     ....
      protected void Button1_Click(object sender, EventArgs e)
        {
           ABCD._DlcD myTest2 = new ABCD._DlcD();
            myTest2.PScreen("A01", 07, 07, 009, 009, "Tim", "Somewhere", 009, "ENGLISH", "DMASTER", 1);
        }
}
 }

*** why do I get this error when I compile..what am I missing:
Cannot create an instance of the abstract class or interface 'ABCD._DlcD'      
Comment
Watch Question

CERTIFIED EXPERT

Commented:
as the error says ABCD._DlcD will be abstract class or interface u will have to instantiate it into a class derived from ABCD._DlcD ;
CERTIFIED EXPERT

Author

Commented:
not sure what u mean...do u have an example?
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Author

Commented:
thanks, let me try and post back
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.