gerrit
Wed Jan 04 09:43:35 CST 2006
I have found the following to be particulary helpfull in deciphering
the windows data types.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_data_types.asp
Good luck,
gerrit
Ulrich Eckhardt wrote:
> Note up front: it's Hungarian, with a capital letter and two 'a' and it
> usually applies to identifiers not types, so your questions have nothing
> really to do with it.
>
> prasi wrote:
> > I am facing one problem, While going through the WinCE code I
> > didn't understand many data types for example HANDLE,LP,DWORD etc
> > there are so many in fact...
>
> HANDLE: an opaque datatype that represents various things, just like a void*
> in normal C. Things it represents are files, events, mutexes, threads,
> modules and probably some more.
>
> LP: a prefix for types. The 'L' is for 'long', from the old days where there
> were long and short pointers. This is obsolete now but still used often.
> The 'P' then stands for pointer.
>
> DWORD: win32 (falsely) defines a WORD to be 16bit and a DWORD (double-word)
> to 32 bits accordingly. It's just an integral type, in other words. If you
> want 32 bits explicitly, rather use uint32_t (C99/POSIX?) or UINT32
> (win32).
>
> TCHAR: this one you will also come across, like its relatives
> LPTSTR/LPCTSTR. It resolves to either CHAR or WCHAR, depending on the
> _UNICODE macro. Under CE, this macro is usually set so it becomes a WCHAR
> (equivalent to wchar_t). A TCHAR string literal is obtained like
> _T("text") or TEXT("text"), which then resolves to "text" or L"text",
> depending on _UNICODE.
> There are several related functions that are also TCHAR aware so you don't
> have to assume TCHAR is either char or wchar_t, e.g. _tcscpy as replacement
> for strcpy/wcscpy.
>
> Uli