Here’s a short table that helps you translate the C++ variable type declaration to its equivalent in Visual Basic:
C++ Variable | Visual Basic Equivalent |
---|---|
ATOM | ByVal variable as Integer |
BOOL | ByVal variable as Long |
BYTE | ByVal variable as Byte |
CHAR | ByVal variable as Byte |
COLORREF | ByVal variable as Long |
DWORD | ByVal variable as Long |
HWND | ByVal variable as Long |
HDC | ByVal variable as Long |
HMENU | ByVal variable as Long |
INT | ByVal variable as Long |
UINT | ByVal variable as Long |
LONG | ByVal variable as Long |
LPARAM | ByVal variable as Long |
LPDWORD | variable as Long |
LPINT | variable as Long |
LPUINT | variable as Long |
LPRECT | variable as Type any variable of that User Type |
LPSTR | ByVal variable as String |
LPCSTR | ByVal variable as String |
LPVOID | variable As Any use ByVal when passing a string |
LPWORD | variable as Integer |
LPRESULT | ByVal variable as Long |
NULL | ByVal Nothing or ByVal 0& or vbNullString |
SHORT | ByVal variable as Integer |
VOID | Sub Procecure not applicable |
WORD | ByVal variable as Integer |
WPARAM | ByVal variable as Long |
You must be logged in to post a comment.