从vb.net中的Delphi Dll接收Unicode数据(vb.net中需要兼容的数据类型) [英] Receive Unicode data from Delphi Dll in vb.net (Need compatible Data type in vb.net)

查看:115
本文介绍了从vb.net中的Delphi Dll接收Unicode数据(vb.net中需要兼容的数据类型)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个用Delphi编写的Dll,具有如下导出功能

< pre lang ="Delphi">
函数layoutToUni(IpStr:PChar; OpStr:PWord; LangName:LongInt; AFontType,BFontType:LongInt):PChar;
</pre>

我从vb.net调用此函数.我想在vb.net中使用兼容的数据类型来处理delphi数据类型pWord.上面的函数给了我想要在vb.net中捕获的Unicode文本(在OpStr变量中).为此使用String,但这给了我空白字符串.

知道怎么做吗?

Hi all,
I have a Dll written in Delphi having an exported functions as follows

<pre lang="Delphi">
Function layoutToUni (IpStr : PChar; OpStr : PWord; LangName : LongInt; AFontType, BFontType : LongInt ) : PChar;
</pre>

I am calling this function from vb.net.I want a compatible data type in vb.net for delphi data type pWord.The above function gives me Unicode text (in OpStr variable) which I want to catch in vb.net.I am using String for this but it is giving me blank string.

Any idea how to do it?
Thanks in advance.

推荐答案

您可以在vb.net中使用Char,它表示16位Unicode字符,因此非常适合.

祝你好运!
You can use Char in vb.net which represents a 16 bit Unicode character and therefor fits perfectly.

Good luck!


这篇关于从vb.net中的Delphi Dll接收Unicode数据(vb.net中需要兼容的数据类型)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆