home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
ib
/
setups
/
intrabld
/
data.z
/
WINDEF.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-12-11
|
7KB
|
246 lines
/****************************************************************************
* *
* windef.h -- Basic Windows Type Definitions *
* *
* Copyright (c) 1985-1995, Microsoft Corp. All rights reserved. *
* *
****************************************************************************/
/****************************************************************************
* *
* This file has been modified for IntraBuilder. It has been adjusted due *
* to differences in language syntax. This file contains the data type *
* declarations from WINDEF.H and WINNT.H. Constant declarations appear in *
* another file. (not included in this Field Test) *
* *
****************************************************************************/
#ifndef _WINDEF_
#define _WINDEF_
#define ULONG unsigned long
#define PULONG unsigned long *
#define USHORT unsigned short
#define PUSHORT unsigned short *
#define UCHAR unsigned char
#define PUCHAR unsigned char *
#define PSZ char *
#define MAX_PATH 260
#define CFALSE 0
#define CTRUE 1
#define DWORD unsigned long
#define BOOL boolean
#define BYTE unsigned char
#define WORD unsigned short
#define FLOAT float
#define PFLOAT float *
#define PBOOL BOOL *
#define LPBOOL BOOL *
#define PBYTE char *
#define LPBYTE char *
#define PINT int *
#define LPINT int *
#define PWORD WORD *
#define LPWORD WORD *
#define LPLONG long *
#define PDWORD DWORD *
#define LPDWORD DWORD *
#define LPVOID unsigned long
#define LPCVOID unsigned long
#define INT int
#define UINT unsigned int
#define PUINT unsigned int *
/*++ BUILD Version: 0093 Increment this if a change has global effects
Copyright (c) 1990-1995 Microsoft Corporation
Module Name:
winnt.h
Abstract:
This module defines the 32-Bit Windows types and constants that are
defined by NT, but exposed through the Win32 API.
--*/
//
// Basics
//
#define VOID void
#define CHAR char
#define SHORT short
#define LONG long
#define WCHAR short
#define PWCHAR WCHAR *
#define LPWCH WCHAR *
#define PWCH WCHAR *
#define LPCWCH WCHAR *
#define PCWCH WCHAR *
#define NWPSTR WCHAR *
#define LPWSTR WCHAR *
#define PWSTR WCHAR *
#define LPCWSTR WCHAR *
#define PCWSTR WCHAR *
//
// ANSI (Multi-byte Character) types
//
#define PCHAR CHAR *
#define LPCH CHAR *
#define PCH CHAR *
#define LPCCH CHAR *
#define PCCH CHAR *
#define NPSTR CHAR *
#define LPSTR CHAR *
#define PSTR CHAR *
#define LPCSTR CHAR *
#define PCSTR CHAR *
//
// Neutral ANSI/UNICODE types and macros
//
#define TCHAR char
#define PTCHAR char*
#define TBYTE unsigned char
#define PTBYTE unsigned char*
#define LPTCH LPSTR
#define PTCH LPSTR
#define PTSTR LPSTR
#define LPTSTR LPSTR
#define LPCTSTR LPCSTR
#define PSHORT SHORT *
#define PLONG LONG *
#define HANDLE unsigned long
#define PHANDLE unsigned long *
#define CCHAR char
#define LCID DWORD
#define PLCID PDWORD
#define LANGID WORD
#define LONGLONG double
#define DWORDLONG double
#define PLONGLONG LONGLONG *
#define PDWORDLONG PDWORDLONG *
#define USN LONGLONG
// This is added for IntraBuilder
#define STRUCTURE unsigned long
#define PSTRUCTURE unsigned long
#define LPSTRUCTURE unsigned long
// end IntraBuilder addition
#define LARGE_INTEGER STRUCTURE
#define PLARGE_INTEGER PSTRUCTURE
#define ULARGE_INTEGER STRUCTURE
#define PULARGE_INTEGER PSTRUCTURE
#define LUID LARGE_INTEGER
#define PLUID PLARGE_INTEGER
#define UNICODE_NULL 0
#define BOOLEAN BYTE
#define PBOOLEAN BOOLEAN *
// End winnt.h
/* Types use for passing & returning polymorphic values */
#define WPARAM UINT
#define LPARAM LONG
#define LRESULT LONG
//
// Cast macros added for IntraBuilder
//
#define CASTBYTE(a) (a%256)
#define CASTWORD(a) (a%65536)
#define CASTLONG(a) (a%4294967296)
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#define MAKEWORD(a, b) ( CASTBYTE(a) | ( CASTBYTE(b) << 8 ) )
#define MAKELONG(a, b) ( CASTWORD(a) | ( CASTWORD(b) << 16 ) )
#define LOWORD(l) ( CASTWORD(l) )
#define HIWORD(l) ( ( CASTLONG(l) >> 16) & 0xFFFF )
#define LOBYTE(w) ( CASTBYTE(w) )
#define HIBYTE(w) ( ( CASTWORD(w) >> 8 ) & 0xFF )
#define HWND HANDLE
#define HHOOK HANDLE
#define ATOM WORD
#define SPHANDLE PHANDLE
#define LPHANDLE PHANDLE
#define HGLOBAL HANDLE
#define HLOCAL HANDLE
#define GLOBALHANDLE HANDLE
#define LOCALHANDLE HANDLE
#define FARPROC unsigned long
#define NEARPROC unsigned long
#define HGDIOBJ HANDLE
#define HACCEL HANDLE
#define HBITMAP HANDLE
#define HBRUSH HANDLE
#define HCOLORSPACE HANDLE
#define HDC HANDLE
#define HGLRC HANDLE
#define HDESK HANDLE
#define HENHMETAFILE HANDLE
#define HFONT HANDLE
#define HICON HANDLE
#define HMENU HANDLE
#define HMETAFILE HANDLE
#define HINSTANCE HANDLE
#define HMODULE HINSTANCE /* HMODULEs can be used in place of HINSTANCEs */
#define HPALETTE HANDLE
#define HPEN HANDLE
#define HRGN HANDLE
#define HRSRC HANDLE
#define HSTR HANDLE
#define HTASK HANDLE
#define HWINSTA HANDLE
#define HKL HANDLE
#define HFILE int
#define HCURSOR HICON /* HICONs & HCURSORs are polymorphic */
#define COLORREF DWORD
#define LPCOLORREF DWORD *
//
// Added for IntraBuilder
//
#define ENUM SHORT
#define POINTER unsigned long
#define LPOINTER unsigned long
#define ADVAPI32 "ADVAPI32"
#define GDI32 "GDI32"
#define KERNEL32 "KERNEL32"
#define USER32 "USER32"
#endif /* _WINDEF_ */