globalplatform
types.h
Go to the documentation of this file.
1 /* Copyright (c) 2008, Karsten Ohme
2  * This file is part of GlobalPlatform.
3  *
4  * GlobalPlatform is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * GlobalPlatform is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with GlobalPlatform. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
22 #ifndef OPGP_TYPES_H
23 #define OPGP_TYPES_H
24 
25 #ifndef _WIN32
26 #include <wintypes.h>
27 
28 #ifdef __APPLE__
29 typedef const char *LPCTSTR;
30 #endif
31 
32 #else
33 #include <windows.h>
34 #endif
35 
36 typedef void *PVOID;
37 #ifdef _WIN32
38 typedef LPTSTR OPGP_STRING;
39 typedef LPCTSTR OPGP_CSTRING;
40 typedef LPBYTE PBYTE;
41 typedef LPDWORD PDWORD;
42 #else
43 #ifndef NULL
44 #define NULL 0
45 #endif
46 typedef char *OPGP_STRING;
47 typedef const char *OPGP_CSTRING;
48 typedef unsigned char *PBYTE;
49 #if !defined(__wintypes_h__)
50 typedef unsigned long *PDWORD;
51 typedef unsigned char BYTE;
52 typedef unsigned long DWORD;
53 typedef long LONG;
54 #endif
55 
56 #endif
57 
58 #endif
59 
PDWORD
unsigned long * PDWORD
A Microsoft LPDWORD/Muscle pointer to a DWORD.
Definition: types.h:50
PBYTE
unsigned char * PBYTE
A Microsoft/Muscle LPBYTE, pointer to unsigned char.
Definition: types.h:48
BYTE
unsigned char BYTE
A Microsoft/Muscle BYTE definition.
Definition: types.h:51
LONG
long LONG
A long value.
Definition: types.h:53
PVOID
void * PVOID
Pointer definition.
Definition: types.h:36
DWORD
unsigned long DWORD
A Microsoft/Muscle DWORD definition.
Definition: types.h:52
OPGP_CSTRING
const typedef char * OPGP_CSTRING
A Microsoft/Muscle LPCTSTR.
Definition: types.h:47
OPGP_STRING
char * OPGP_STRING
A Microsoft/Muscle LPTSTR.
Definition: types.h:46
wintypes.h
This keeps a list of Windows(R) types.