由于必须使用 VB.NET 2015 调用一个 标准的 DLL ,以下部分是该 DLL 中该函数的声明,小弟已经头疼好几天了,还是无法把它转换到VB中使用,谢谢大家,帮忙看看!!
int32 get_read_cnf(
void *od_ptr, /* In call */
int *var_length_ptr, /* Call and *//* Returned */
void *value_ptr /* Returned */
)
这个里面的 Void* 我查了一下应该是空指针,我有声明成 Uintptr 类型,可是执行不了。不知道如何翻译,请大家指教!!谢谢!!
附一下我的声明:
Declare Function get_read_cnf Lib "s32.dll" (ByRef ord_ptr As Uintptr,
ByRef var_length_ptr As UInt16, ByRef value_ptr As Uintptr) As Integer
后来还用 Dllimport 试了一下,也是不行,下面是声明:
<System.Runtime.InteropServices.DllImportAttribute("s32.dll", EntryPoint:="get_read_cnf")>
Public Function get_read_cnf(ByRef od_ptr As UIntPtr, ByRef var_length_ptr As Integer,
ByRef value_ptr As UIntPtr) As Integer
End Function
希望大伙能给指个方向。谢谢。