在C+中实现VB.NET接口类+;。净额(2010年) 我想知道我如何导入在C++ .NET中的接口类,它是用vb.net .< /p>编写的。
Dll只包含一个接口类。如果我在VB.NET中编写“ImplementiInterface”,它将从Interface.dll加载所有函数和方法 <>但是我怎么能在C++ +.net?/p>中做到这一点呢? 这是Interface.dll的外观:在C+中实现VB.NET接口类+;。净额(2010年) 我想知道我如何导入在C++ .NET中的接口类,它是用vb.net .< /p>编写的。,c++,vb.net,interface,C++,Vb.net,Interface,Dll只包含一个接口类。如果我在VB.NET中编写“ImplementiInterface”,它将从Interface.dll加载所有函数和方法 但是我怎么能在C++ +.net?/p>中做到这一点呢? 这是Interface.dll的外观: Public Interface IPlugin Function CreateInstance( _ ByRef pntMemory As MemoryArbiter, _ ByRef pntMes
Public Interface IPlugin
Function CreateInstance( _
ByRef pntMemory As MemoryArbiter, _
ByRef pntMessageQueue As clsMessageQueue, _
ByRef pntGPIO As clsGPIO, _
ByRef pntProgramSettings As Types, _
ByRef pntDisplayDriver As DisplayDriver _
) As Boolean
Function DeleteInstance() As Boolean
Sub Main_Loop()
Sub ForceUnload()
Sub Interrupt()
End Interface
此结构必须导入C++代码。< /P> 在VB.NET中,它如下所示:
Imports System.ComponentModel.Composition
Imports System.Windows.Forms.Application
Imports Plugin_Interface
Imports SharedLibrary
Imports SharedLibrary.DisplayDriver
<Export(GetType(IPlugin))>
Public Class cPlugin
Implements IPlugin
'.... Class functions come here
导入System.ComponentModel.Composition
导入System.Windows.Forms.Application
导入插件接口
导入共享库
导入SharedLibrary.DisplayDriver
公共类cPlugin
伊普卢金
'.... 类函数在这里
但是,我只需要对上面的文件进行一个改动,这样我就可以在我的VB.NET 2010应用程序中通过MEF导入C++ DLL。
希望有人知道如何处理这件事……:) 可能是相关的嘿,亚历克斯,对不起,但似乎不是这样。没人知道吗?