在C#中获取vc类并创建其对象 [英] get vc class in c# and create its object

查看:111
本文介绍了在C#中获取vc类并创建其对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我在VC中有一个代码.
我在VC6.0中创建了它的dll.
VC dll中有一些私有变量.

我必须在C#中调用dll,可以轻松调用dll;
我的要求是,我想在dll中的C#中调用该类,然后使用VC6的dll中的函数创建该类的对象.

请指导我如何在C#中访问vc6 dll的类,以及如何通过在C#中创建vc6 dll的类对象来使用dll.



我创建了一个其中有一个类的dll

Hi All

I have a code in VC.
I create its dll in VC6.0
There are some private variables in VC dll.

I have to call the dll in the C#, dll can be called easily;
My requirement is this I want to call the class in the C#, which is in the dll and then create the object of the class and using the functions which are in the dll of VC6.

Kindly guide me how to access the class of vc6 dll in the C# and using the dll by creating its class object in C#.



i have created a dll in which like there is a class

class calculate
{
  //do some functionality

  void func1();
  void func2();
 
};


我创建了此类的dll
并在c#
中调用dll
我想在c#中创建该类的对象
喜欢


i create the dll of this class
and call the dll in the c#

i want to create the object of the class in c#
like

class calculateObj = new class();
calculateObj.func1();


当我创建示例创建对象时
我的问题是如何在vc的dll中创建类的对象

我想在C#中访问该类,然后
通过访问c#


as i created a sample create object
my question is this how to create object of class which is in dll of of vc

i want to access the class in c# and then
creating its object and do more operation by accesing class in c#

推荐答案

Friend中的类,创建其对象并执行更多操作,在解决方案中添加dll的引用,然后您可以访问DLL的非私有成员dll.这有意义还是您喜欢一些特定的东西??

谢谢,
Ambesha
Friend, Add the reference of dll in your solution and then you can access the non-private member of dll. Is this make sense or you like something specific.?

Thanks,
Ambesha


^ ].


这篇关于在C#中获取vc类并创建其对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆