Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Win32 DLL 中有一个具有这样签名的 C++ 函数:
extern "C" const char* __declspec( dllexport ) GetResultName( int index ) {
注意const char*字符串类型。
const char*
如何在 Visual Basic 2008 应用程序中读取此值?
您可以使用属性导入函数DllImport并将其声明为String:
DllImport
String
<DllImport("yourcppdll.dll", SetLastError:=True, CharSet:=CharSet.Ansi)> _ Public Function GetResultName(index As Integer) As String End Function