加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

VB与VC的数据类型比较

发布时间:2020-12-17 00:26:52 所属栏目:大数据 来源:网络整理
导读:VB与VC的数据类型比较 VC++ VB short Integer int Long long Long UNIT Long ULONG Long WORD DWORDLong WPARAM LPARAMLong WMSG UMSGLong HRESULT Long BOOL Boolean COLORREF Long HWND,HDC,HBRUSH,HKEY,等等 Long LPSTR LPCSTRString LPWSTR,OLECHARBSTR

VB与VC的数据类型比较

VC++ VB
short Integer
int Long
long Long
UNIT Long
ULONG Long
WORD DWORDLong
WPARAM LPARAMLong
WMSG UMSGLong
HRESULT Long
BOOL Boolean
COLORREF Long
HWND,HDC,HBRUSH,HKEY,等等 Long
LPSTR LPCSTRString
LPWSTR,OLECHARBSTR String
LPTSTR String
VARIANT_BOOL Boolean
unsignedchar Byte
BYTE Byte
VARIANTVariant
(任何以*或**结尾的数据类型)
Long
c中的数据类型 VB中的声明 结果
ATOM ByVal variable As Integer 结果为Integer 类型的表达式
BOOL ByVal variable As Boolean 结果为 Long 类型的表达式
BYTE ByVal variable As Byte 结果为 Byte 类型的表达式
CHAR ByVal variable As Byte 结果为 Byte 类型的表达式
COLORREF ByVal variable As Long 结果为 Long 类型的表达式
DWORD ByVal variable As Long 结果为 Long 类型的表达式
HWND,HMENU ByVal variable As Long 结果为 Long 类型的表达式等Windows 句柄
INT,UINT ByVal variable As Long 结果为 Long 类型的表达式
LONG ByVal variable As Long 结果为 Long 类型的表达式
LPARAM ByVal variable As Long 结果为 Long 类型的表达式
LPDWORD variable As Long 结果为 Long 类型的表达式
LPINT,LPUINT variable As Long 结果为 Long 类型的表达式
LPRECT variable As type 自定义类型的任意变量
LPSTR,LPCSTR ByVal variable As String 结果为 String 类型的表达式
LPVOID variable As Any 任何变量(在传递字符串的时候使用ByVal)
LPWORD variable As Integer 结果为Integer 类型的表达式
LRESULT ByVal variable As Long 结果为 Long 类型的表达式
NULL As Any 或 ByVal Nothing 或 ByVal variable As Long ByVal 0& 或 VBNullString SHORT ByVal variable As Integer 结果为Integer 类型的表达式
VOID Sub procedure 不可用
WORD ByVal variable As Integer 结果为Integer 类型的表达式
WPARAM ByVal variable As Long

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读