使用VB.NET [英] Using VB.NET

查看:78
本文介绍了使用VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试将以下内容转换为VB.NET代码,它是一个C#包装器

用于C ++ DLL,


使用PVOID = IntPtr;

使用FIBITMAP = Int32;

使用FIMULTIBITMAP = Int32;


据我所知,右边的对象左边是别名

,所以PVOID对象实际上是IntPrt对象(或者我是
无论如何都要明白。我怎样才能在VB.NET中写这个?我可以删除所有别名的
,但我想我会很快问这个有我的。

谢谢你的负担。


尼克。


-

/ \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

无论如何。无论结果如何,你都会被改变。 ;


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

Hi there,

I am trying to convert the following to VB.NET code, it is a C# wrapper
for a C++ DLL,

using PVOID = IntPtr;
using FIBITMAP = Int32;
using FIMULTIBITMAP = Int32;

As I understand it, the objects on the right are being given the aliases
on the left, so PVOID objects are actually IntPrt objects (or so I
understand anyway. How would I write this in VB.NET? I could just remove
all aliases, but I thought I would quickly ask as this one has got me.
Thanks loads.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

推荐答案

*Nak < a@a.com> scripsit:
* "Nak" <a@a.com> scripsit:
我试图将以下内容转换为VB.NET代码,它是一个C#包装器,用于C ++ DLL,

使用PVOID = IntPtr;
使用FIBITMAP = Int32;
使用FIMULTIBITMAP = Int32;

据我了解,右侧的对象在左侧给出了别名
,所以PVOID对象实际上是IntPrt对象(或者无论如何我都会理解。如何在VB.NET中编写它?
I am trying to convert the following to VB.NET code, it is a C# wrapper
for a C++ DLL,

using PVOID = IntPtr;
using FIBITMAP = Int32;
using FIMULTIBITMAP = Int32;

As I understand it, the objects on the right are being given the aliases
on the left, so PVOID objects are actually IntPrt objects (or so I
understand anyway. How would I write this in VB.NET?




类似''Imports PVIOD = System.IntPtr''(未经测试)?


-

Herfried K. Wagner

MVP·VB Classic,VB。 NET

< http://www.mvps.org/dotnet>



Something like ''Imports PVIOD = System.IntPtr'' (untested)?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


我希望这些是C ++ dl中的类型。由于VB.Net中存在这些类型不需要b $ b,因此需要更换它们。

因此,函数如:

\\\ \\\

< DllImport(" MyLib")> _

Priva te共享功能MyUnknownFunction(_

ByVal Arg1为PVOID,_

ByVal Arg2为FIBITMAP)为

FIMULTIBITMAP

结束功能

///

将转换为:

\\\

<的DllImport(QUOT; MyLib中")> _

私人共享功能MyUnknownFunction(_

ByVal Arg1 as Intptr,_

ByVal Arg2 As Int32)As Int32

结束功能

///

允许VB.Net了解传递的类型。


我可能错了,但这对我来说很有意义。


" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道

news:bn ************ @ ID-208219.news.uni-berlin.de ...
I would expect that these are types in the C++ dl. Since these types do not
exist in VB.Net they need to be replaced.
Therefore, a function such as:
\\\
<DllImport("MyLib")> _
Private Shared Function MyUnknownFunction ( _
ByVal Arg1 as PVOID, _
ByVal Arg2 As FIBITMAP) As
FIMULTIBITMAP
End Function
///
would translate to:
\\\
<DllImport("MyLib")> _
Private Shared Function MyUnknownFunction ( _
ByVal Arg1 as Intptr, _
ByVal Arg2 As Int32) As Int32
End Function
///
allowing VB.Net to understand the Types Passed.

I may be wrong, but that makes sense to me.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn************@ID-208219.news.uni-berlin.de...
* "经NAK QUOT; < a@a.com> scripsit:
* "Nak" <a@a.com> scripsit:
我试图将以下内容转换为VB.NET代码,它是一个C#包装器,用于C ++ DLL,

使用PVOID = IntPtr;
使用FIBITMAP = Int32;
使用FIMULTIBITMAP = Int32;

据我了解,右侧的对象在左侧给出了别名
,所以PVOID对象实际上是IntPrt对象(或者无论如何我都会理解。如何在VB.NET中编写它?
I am trying to convert the following to VB.NET code, it is a C# wrapper
for a C++ DLL,

using PVOID = IntPtr;
using FIBITMAP = Int32;
using FIMULTIBITMAP = Int32;

As I understand it, the objects on the right are being given the aliases
on the left, so PVOID objects are actually IntPrt objects (or so I
understand anyway. How would I write this in VB.NET?



像''Imports PVIOD = System.IntPtr'之类的东西'(未经测试)?

- Herfried K. Wagner
MVP·VB Classic,VB.NET
< http://www.mvps.org / dotnet>



Something like ''Imports PVIOD = System.IntPtr'' (untested)?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>



Hi Herfried,
Hi Herfried,
类似''Imports PVIOD = System.IntPtr''(未经测试)?
Something like ''Imports PVIOD = System.IntPtr'' (untested)?




不幸的是它找不到它,我收到错误信息,


" ;命名空间或类型''IntPtr ''对于进口''IntPrt''找不到。


看起来我可能不得不更换所有东西,这是一个bugger!

哦好吧:-(


尼克。

-

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ b
"无论如何。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \



Unfortunately it doesn''t find it, I''m getting the error message,

"Namespace or type ''IntPtr'' for the imports ''IntPrt'' cannot be found.

It looks like I may have to replace everything instead, which is a bugger!
Oh well :-(

Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


这篇关于使用VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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