Win32 Types To VB Types List (Help Needed) 
Author Message
 Win32 Types To VB Types List (Help Needed)

    Hello,

I'm trying to learn how to write wrapper typelibs for
WinAPI functions. The most confusing part are the
hugeamount of type aliases that Win32 uses. I found
a list of all Win32 Data Types in the platform sdk

\Platform SDK\Win32 API\Reference\Data Types\

And I have been trying my best to figure out the
VB equvielants to them (the types in the parenthises)
so I will know what to put in my IDL files.

For the once I dont have a clue at all on i put
(????) and for the once where I think I know but
I'm not quite sure I put (???? TheType ????)

Could everyone that are good at Win32 datatypes,
C/C++ programing help me complete the list by
filling in as many (????) posts as you can, as
well as verifying & correcting the
(???? TheType ????) guesses. And of course have
a quick look at the rest of them to make sure
I havnt screwed up on any of them =)

Once the list it finished i will compile a
conversion table with three columns (Win32, VB, IDL)
which any of you are more then welcome to if
you want/need it.

Thank you for the time, below is the list!!

 Bye!

ATOM (Integer)

BOOL (Boolean)
BOOLEAN (Boolean)
BYTE (Byte)
CALLBACK (???? Long ????)
CHAR (Byte)
COLORREF (Long)
CONST (Const)
CRITICAL_SECTION (???? Long ????)
CTRYID (????)
DWORD (Long)
DWORD_PTR (????)
DWORD32 (Long)
DWORD64 (????)
FLOAT (Single)
FILE_SEGMENT_ELEMENT (????)

''''''''''''''''''''''''''''''''''''''''''''''''
Here I'm sure that the H prefix is short for
Handle and that all handles are Long in VB

Handles parameters in VB should be ByVal (which
is [in] in an IDL file) right ?
''''''''''''''''''''''''''''''''''''''''''''''''

HACCEL (Long)
HANDLE (Long)
HBITMAP (Long)
HBRUSH (Long)
HCOLORSPACE (Long)
HCONV (Long)
HCONVLIST (Long)
HCURSOR (Long)
HDC (Long)
HDDEDATA (Long)
HDESK (Long)
HDROP (Long)
HDWP (Long)
HENHMETAFILE (Long)
HFILE (Long)
HFONT (Long)
HGDIOBJ (Long)
HGLOBAL (Long)
HHOOK (Long)
HICON (Long)
HIMAGELIST (Long)
HIMC (Long)
HINSTANCE (Long)
HKEY (Long)
HKL (Long)
HLOCAL (Long)
HMENU (Long)
HMETAFILE (Long)
HMODULE (Long)
HMONITOR (Long)
HPALETTE (Long)
HPEN (Long)
HRGN (Long)
HRSRC (Long)
HSZ (Long)
HWINSTA (Long)
HWND (Long)

''''''''''''''''''''''''''''''''''''''''''''''''

INT (Long)
INT_PTR (????)
INT32 (Long)
INT64 (????)
IPADDR (????)
IPMASK (????)
LANGID (???? Long ????)

''''''''''''''''''''''''''''''''''''''''''''''''
The prefix L of the first four below if proberbly
short for Long and if so then it should proberbly
be of type Long in VB and not the types in
the parenthises!
''''''''''''''''''''''''''''''''''''''''''''''''

LCID (???? Long ????)
LCSCSTYPE (???? Long ????)
LCSGAMUTMATCH (???? Long ????)
LCTYPE (????)
LONG (Long)
LONG_PTR (???? Long ????)
LONG32 (Long)
LONG64 (????)
LONGLONG (????)

''''''''''''''''''''''''''''''''''''''''''''''''
Here I'm not sure if LP means Long Pointer, and
if so then all the types should proberbly be
Long in VB and not the types in the parenthises!

Pointers parameters in VB should be ByRef or
without any By*** statment right

E.x

  "ByRef lpBuf As Long" which is [in, out] type*
  in an IDL file

  "lpBuf As Long" which is what in an IDL file??
''''''''''''''''''''''''''''''''''''''''''''''''

LPARAM (Long)
LPBOOL (Boolean)
LPBYTE (Byte)
LPCOLORREF (Long)
LPCRITICAL_SECTION (Long)
LPCSTR (???? String ????)
LPCTSTR (???? String ????)
LPCVOID (???? Any ????)
LPCWSTR (????)
LPDWORD (Long)
LPHANDLE (Long)
LPINT (Long)
LPLONG (Long)
LPSTR (????)
LPTSTR (????)
LPVOID (???? Any ????)
LPWORD (???? Long ????)
LPWSTR (????)
LRESULT (???? Long ????)
LUID (????)

''''''''''''''''''''''''''''''''''''''''''''''''
The P prefix is short for pointer, so my guess
is that all of them should be Long in VB and
not the types in the parenthises!
''''''''''''''''''''''''''''''''''''''''''''''''

PBOOL (Boolean)
PBOOLEAN (Boolean)
PBYTE (Byte)
PCHAR (Byte)
PCRITICAL_SECTION (long)
PCSTR (????)
PCTSTR (????)
PCWCH (????)
PCWSTR (????)
PDWORD (???? Long ????)
PFLOAT (???? Single ????)
PHANDLE (Long)
PHKEY (Long)
PINT  (Long)
PLCID (????)
PLONG (Long)
PLUID (????)
POINTER_32 (???? Long ????)
POINTER_64 (????)
PSHORT (???? Integer ????)
PSTR (????)
PTBYTE (???? Byte ????)
PTCHAR (???? Byte ????)
PTSTR (????)
PUCHAR (????)
PUINT (???? Long ????)
PULONG (????)
PUSHORT (???? Long ????)
PVOID (???? Any ????)
PWCHAR (???? Integer ????)
PWORD (???? Long ????)
PWSTR (????)

''''''''''''''''''''''''''''''''''''''''''''''''

REGSAM (???? Long ????)
SC_HANDLE (Long)
SC_LOCK (Long)
SERVICE_STATUS_HANDLE (Long)
SHORT (Integer)
SIZE_T (???? Long ????)
SSIZE_T (????)
TBYTE (????)
TCHAR (????(
UCHAR (???? Integer ????)
UINT (???? Long ????)
UINT_PTR (???? Long ????)
UINT32 (???? Long ????)
UINT64 (????)
ULONG (????)
ULONG_PTR (????)
ULONG32 (????)
ULONG64 (????)
ULONGLONG (????)
UNSIGNED (Not used in VB)
USHORT (???? Long ????)
VOID (Any)
WCHAR (????)
WINAPI (Not used in VB)
WORD (Long)
WPARAM (Long)



Sun, 26 Oct 2003 04:11:14 GMT  
 Win32 Types To VB Types List (Help Needed)
p... and lp... are imo all longs.


Sun, 26 Oct 2003 13:23:52 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Prob. w\ TYPE data type: err:Type Mismatch

2. Help - Need VB types to go with DsGetDcName from netapi32

3. Does VB a similar data type like the C++ Union type

4. Does VB a similar data type like the C++ Union type

5. Q: Converting VB types to equivalent C types

6. C data type vs. VB Data type

7. VB Data Types - C Data Types

8. problem of converting C's union type to VB's a data type

9. problem of converting C's union type to VB's a data type

10. Q: Converting VB types to equivalent C types

11. C types to VB types

12. HELP - Need help on DATE data type

 

 
Powered by phpBB® Forum Software