简体   繁体   English

将C ++ dll导入vb.net时,float *(图像类型)的等效数据类型是什么?

[英]What is the equivalent data type for float* (image type) when importing a c++ dll into vb.net?

I am trying to create a dll export function, in c++, to be imported from VB.NET. 我试图在C ++中创建一个DLL导出功能,以从VB.NET导入。

i have created the function, but i don't know what is the argument type equivalent, to be used in calling. 我已经创建了函数,但是我不知道在调用中使用的等效参数类型是什么。

in c++: 在C ++中:

__declspec(dllexport) BOOL myFunction( const float *data, const char* filePath );

in vb.NET: 在vb.NET中:

<DllImport("myDLL.dll", _
EntryPoint:="myFunction", CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function myVBFunction( ByVal data As something, _ 
           ByVal filePath As String) As Boolean
End Function

Can somebody please tell me what to use for the float *data type (which would be an image format) and if i can use String to pass in the filePath - that will be received as char* - or what must i use instead ? 有人可以告诉我将什么用于float *data类型(这将是图像格式),如果我可以使用String来传递filePath (将以char*形式接收),或者我必须使用什么呢?

Thank you very much. 非常感谢你。

A float in C++ maps to the Single data type in VB.NET. C ++中的float映射到VB.NET中的Single数据类型。

The char* for filePath should be a String in VB.NET. 在VB.NET中, filePathchar*应该是String

Read Data Types Compared in Different Languages for more information. 有关更多信息,请阅读比较不同语言的数据类型

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM