来自VB的Cll用于C#

编程入门 行业动态 更新时间:2024-10-14 16:22:21
本文介绍了来自VB的Cll用于C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨 如何在C#代码中使用VB库?我有library.dll文件,之后 将它添加到C#中的引用我只能看到4种方法,而在添加 之后它可以看到VB的引用我可以看到15种方法。

解决方案

VB或VB.NET?如果这是经典的VB,试试这个。打破二进制兼容性和 编译到一个新的DLL。然后在C#中检查,看看你是否仍然看不到 方法。如果是这样,它与COM接口有关。我不确定 解决方案是什么,但这就是我要开始看的地方。 --- Gregory A. Beamer MVP; MCP:+ I,SE,SD,DBA *************************** 在盒子外面思考! *************************** > " mamin"写道:

您好如何在C#代码中使用VB库?我有library.dll文件,并且在将其添加到C#中的引用之后我只能看到4种方法,而在将它添加到VB的引用之后我可以看到15种方法。

不幸的是它是VB.NET :( 此外我没有这个dll的来源。 /> U?ytkownik" Cowboy(Gregory A. Beamer) - MVP" < No ************ @ comcastNoSpamM> napisa3 w wiadomo?ci 新闻:85 ********************************** @ microsof t ...

VB或VB.NET?如果这是经典的VB,试试这个。打破二进制兼容性并编译成一个新的DLL。然后在C#中查看并查看如果你仍然看不到方法。如果是这样,它与COM接口有关。我不确定解决方案是什么,但这是我开始看的地方。 --- Gregory A. Beamer MVP; MCP:+ I,SE,SD,DBA ******************** 在外面思考电子邮箱! ******************************* mamin写道:

您好如何在C#代码中使用VB库?我有library.dll文件,在将其添加到C#中的引用之后我只能看到4种方法,而在之后将它添加到VB的引用中我可以看到15种方法。

mamin, 您在VB中看到的方法是否可能是静态的?在C#中,你是在实例上看不到它们,相反,只有在确定范围时才会看到它们(VB对此更加宽松)。 /> 希望这会有所帮助。 - - Nicholas Paldino [.NET / C#MVP] - mv*@spam.guard.caspershouse " mA最小" <毫安*** @ autograf.pl>在消息中写道 news:cq ********** @ nemesis.news.tpi.pl ...

这是VB.NET不幸的是:( 此外我没有这个dll的来源。 U?ytkownik" Cowboy(Gregory A. Beamer) - MVP" < No * ***********@comcastNoSpamM> napisa3 w wiadomo?ci 新闻:85 ********************** ************ @ microsof t ...

VB或VB.NET?如果这是经典的VB,试试这个。打破二进制兼容性

编译成一个新的DLL。然后检查C#,看看你是否仍然看不到

方法。因此,它与COM接口有关。我不确定解决方案是什么,但这是我开始看的地方。 --- MVP; MCP:+ I,SE,SD,DBA ******************** ******* 在盒子外面思考! *************************** > mamin写道:

>嗨>如何在C#代码中使用VB库?我有library.dll文件和>之后>将它添加到C#中的引用中我只能看到4种方法,而在添加>之后它给VB的参考资料我可以看到15种方法。> > >

Hi How can I use VB libraries in C# code? I have library.dll file and after adding it to references in C# i can see only 4 methods, while after adding it to VB''s references i can see 15 methods.

解决方案

VB or VB.NET? If this is classic VB, try this. Break binary compatibility and compile to a new DLL. Then examine in C# and see if you still cannot see the methods. If so, it has to do with COM interfaces. I am not sure what the solution is, but that is where I would start to look. --- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "mamin" wrote:

Hi How can I use VB libraries in C# code? I have library.dll file and after adding it to references in C# i can see only 4 methods, while after adding it to VB''s references i can see 15 methods.

It''s VB.NET unfortunately :( Moreover I don''t have source of this dll. U?ytkownik "Cowboy (Gregory A. Beamer) - MVP" <No************@comcastNoSpamM> napisa3 w wiadomo?ci news:85**********************************@microsof t...

VB or VB.NET? If this is classic VB, try this. Break binary compatibility and compile to a new DLL. Then examine in C# and see if you still cannot see the methods. If so, it has to do with COM interfaces. I am not sure what the solution is, but that is where I would start to look. --- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "mamin" wrote:

Hi How can I use VB libraries in C# code? I have library.dll file and after adding it to references in C# i can see only 4 methods, while after adding it to VB''s references i can see 15 methods.

mamin, Is it possible that the methods you see in VB are static? In C#, you won''t see them on instances, rather, you will see them only when scoped correctly (VB is more lax about this). Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse "mamin" <ma***@autograf.pl> wrote in message news:cq**********@nemesis.news.tpi.pl...

It''s VB.NET unfortunately :( Moreover I don''t have source of this dll. U?ytkownik "Cowboy (Gregory A. Beamer) - MVP" <No************@comcastNoSpamM> napisa3 w wiadomo?ci news:85**********************************@microsof t...

VB or VB.NET? If this is classic VB, try this. Break binary compatibility

and

compile to a new DLL. Then examine in C# and see if you still cannot see

the

methods. If so, it has to do with COM interfaces. I am not sure what the solution is, but that is where I would start to look. --- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "mamin" wrote:

> Hi > How can I use VB libraries in C# code? I have library.dll file and > after > adding it to references in C# i can see only 4 methods, while after adding > it to VB''s references i can see 15 methods. > > >

更多推荐

来自VB的Cll用于C#

本文发布于:2023-11-07 23:40:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567749.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:VB   Cll

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!