外部dll [英] Extternal dll

查看:112
本文介绍了外部dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好朋友,我有一个称为KETComm的DLL.我正在使用DLLImport方法在c#应用程序中使用该dll.我想创建该dll的实例. How ::: plz

Hello friends, I have a DLL called KETComm. I m using that dll in my c# application using DLLImport method. I want to create the instance of that dll. How:::plz

推荐答案

我正在假设您尝试从DLL创建对象.

I am working on the assumption that you are trying to create an object from the DLL.

如果DLL使用COM,则可以尝试向DLL添加引用而不是使用DLLImport,Visual Studio应该加载内容并将其放入您的命名空间中.否则,您将需要实现相关的接口,然后找到一个函数(使用DLLImport导入)以创建对象.

If the DLL uses COM, you could try just adding a refence to the DLL instead of using DLLImport, and Visual Studio should load things up and put them in to a namespace for you.  Otherwise, you will need to implement the relevant interfaces, then find a function (which you import using DLLImport) to create the object.


这篇关于外部dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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