TDCBase

tdcdecl.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Project: TDC Control Library
4 *
5 * Filename: tdcdecl.h
6 *
7 * Purpose: Basic declarations and definitions
8 *
9 * Author: NHands GmbH & Co KG
10 */
11 /*****************************************************************************/
15 /*****************************************************************************/
16 /* $Id: tdcdecl.h,v 1.2 2021/12/01 17:51:47 trurl Exp $ */
17
18 #ifndef __TDCDECL_H
19 #define __TDCDECL_H
20
24 #ifdef __cplusplus
25 #define EXTC extern "C"
26 #else
27 #define EXTC extern
28 #endif
29
30 #ifdef unix
31 #define TDC_API EXTC
32 #define TDC_CC
33 #else
34 #define TDC_CC __stdcall
35 #ifdef TDC_EXPORTS
36 #define TDC_API EXTC __declspec(dllexport)
37 #else
38 #define TDC_API EXTC __declspec(dllimport)
39 #endif
40 #endif
52 #if defined _MSC_VER && _MSC_VER < 1800
53 typedef __int8 Int8;
54 typedef __int32 Int32;
55 typedef __int64 Int64;
56 typedef unsigned __int8 Uint8;
57 typedef __int32 Bln32;
58 #define LLXFORMAT "I64x"
59 #define LLDFORMAT "I64d"
60 #else
61 #undef __STDC_FORMAT_MACROS
62 #define __STDC_FORMAT_MACROS
63 #include <inttypes.h>
64 typedef int8_t Int8;
65 typedef int32_t Int32;
66 typedef int64_t Int64;
67 typedef uint8_t Uint8;
68 typedef int32_t Bln32;
69 #define LLXFORMAT PRIx64
70 #define LLDFORMAT PRId64
71 #endif
81 #define TDC_Ok 0
82 #define TDC_Error (-1)
83 #define TDC_Timeout 1
84 #define TDC_NotConnected 2
85 #define TDC_DriverError 3
86 #define TDC_DeviceLocked 7
87 #define TDC_Unknown 8
88 #define TDC_NoDevice 9
89 #define TDC_OutOfRange 10
90 #define TDC_CantOpen 11
91 #define TDC_NotInitialized 12
92 #define TDC_NotEnabled 13
93 #define TDC_NotAvailable 14
97 #endif
Bln32
__int32 Bln32
integer used as boolean
Definition: tdcdecl.h:57
Int8
__int8 Int8
8 bit integer for MSVC
Definition: tdcdecl.h:53
Int32
__int32 Int32
32 bit integer for MSVC
Definition: tdcdecl.h:54
Int64
__int64 Int64
64 bit integer for MSVC
Definition: tdcdecl.h:55
Uint8
unsigned __int8 Uint8
8-Bit unsigned int for MSVC
Definition: tdcdecl.h:56