BYTE | unsigned 8 bit integer |
DWORD | 32 bit unsigned integer |
LONG | 32 bit signed integer |
LPDWORD | 32 bit pointer to DWORD |
LPCSTR | 32 bit pointer to constant character string |
LPSTR | 32 bit pointer to character string |
UINT | 32 bit unsigned int |
WORD | 16 bit unsigned int |
HANDLE | opaque pointer to system data |
The Win32 documentation is available online through the Microsoft Developer Studio.
API specification files are used in C programs by the
#include <...>mechanism.
Values about sizes of primitive data types is stored in
<limits.h>
GetUserName()
is defined by
#include <windows.h> BOOL GetUserName(LPTSRT buffer, LPDWORD bufferLen)It places the user name into the buffer, and returns
TRUE
on success. It modifies the bufferLen value to the length of the name.
#include <stdlib.h> DWORD GetEnvironmentVariable(LPCTSRT name, LPTSTR buffer, DWORD bufferLen)takes the environment variable as first parameter and sets the value in the buffer. The length of the value is returned, or zero on error.
#include <windows.h> VOID GetSystemTime(LPSYSTEMTIME time)This uses a structure
typedef struct _SYSTEMTIME { WORD wYear; WORD wMonth; WORD wDayOfWeek; WORD wDay; WORD wHour; WORD wMinute; WORD wSecond; WORD wMilliseconds; } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;and is used by