簡體   English   中英

如何從.NET中使用VB6 DLL?

[英]How to consume VB6 DLL from .NET?

如何從.net中使用VB6 DLL?

dll有一個名為rfc的方法,它返回一個數組,並且有一個參數,它是一個整數向量。 如何調用這個dll?

請舉例說明。

var cls = new MyDllVB6.MyClassInVB6();
/*?Array?*/ = cls.MyFunctionInClass( /*?Vector of integer?*/);

VB6 dll是普通的COM dll,所以只需將它添加到項目引用即可,.NET COM互操作將為您完成剩下的工作。

int[] vectorOfIntegers = new int[5];
vectorOfIntegers[0] = 123;
vectorOfIntegers[1] = 456;
.
:
int[] outputArray = cls.MyFunctionInClass(vectorOfIntegers);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM