globalplatform
types.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2026, Karsten Ohme
3  * This file is part of GlobalPlatform.
4  *
5  * GlobalPlatform is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * GlobalPlatform is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with GlobalPlatform. If not, see <https://www.gnu.org/licenses/>.
17  *
18  * In addition, as a special exception, the copyright holders give
19  * permission to link the code of portions of this program with the
20  * OpenSSL library under certain conditions as described in each
21  * individual source file, and distribute linked combinations
22  * including the two.
23  * You must obey the GNU Lesser General Public License in all respects
24  * for all of the code used other than OpenSSL. If you modify
25  * file(s) with this exception, you may extend this exception to your
26  * version of the file(s), but you are not obligated to do so. If you
27  * do not wish to do so, delete this exception statement from your
28  * version.
29  */
30 
35 #ifndef OPGP_TYPES_H
36 #define OPGP_TYPES_H
37 
38 #ifndef _WIN32
39 #include <wintypes.h>
40 
41 #ifndef LPTSTR
42 typedef char *LPTSTR;
43 #endif
44 #ifndef LPCTSTR
45 typedef const char *LPCTSTR;
46 #endif
47 
48 #else
49 #include <windows.h>
50 #endif
51 
52 typedef void *PVOID;
53 #ifdef _WIN32
54 typedef LPTSTR OPGP_STRING;
55 typedef LPCTSTR OPGP_CSTRING;
56 typedef LPBYTE PBYTE;
57 typedef LPDWORD PDWORD;
58 #else
59 #ifndef NULL
60 #define NULL 0
61 #endif
62 typedef char *OPGP_STRING;
63 typedef const char *OPGP_CSTRING;
64 typedef unsigned char *PBYTE;
65 #if !defined(__wintypes_h__)
66 typedef unsigned long *PDWORD;
67 typedef unsigned char BYTE;
68 typedef unsigned long DWORD;
69 typedef long LONG;
70 #endif
71 
72 #endif
73 
74 #endif
long LONG
A long value.
Definition: types.h:69
void * PVOID
Pointer definition.
Definition: types.h:52
unsigned char BYTE
A Microsoft/Muscle BYTE definition.
Definition: types.h:67
unsigned char * PBYTE
A Microsoft/Muscle LPBYTE, pointer to unsigned char.
Definition: types.h:64
unsigned long * PDWORD
A Microsoft LPDWORD/Muscle pointer to a DWORD.
Definition: types.h:66
char * OPGP_STRING
A Microsoft/Muscle LPTSTR.
Definition: types.h:62
unsigned long DWORD
A Microsoft/Muscle DWORD definition.
Definition: types.h:68
const char * OPGP_CSTRING
A Microsoft/Muscle LPCTSTR.
Definition: types.h:63
This keeps a list of Windows(R) types.