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.1 2020/09/03 13:57:02 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
41 
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 #include <inttypes.h>
62 typedef int8_t Int8;
63 typedef int32_t Int32;
64 typedef int64_t Int64;
65 typedef uint8_t Uint8;
66 typedef int32_t Bln32;
67 #define LLXFORMAT PRIx64
68 #define LLDFORMAT PRId64
69 #endif
70 
79 #define TDC_Ok 0
80 #define TDC_Error (-1)
81 #define TDC_Timeout 1
82 #define TDC_NotConnected 2
83 #define TDC_DriverError 3
84 #define TDC_DeviceLocked 7
85 #define TDC_Unknown 8
86 #define TDC_NoDevice 9
87 #define TDC_OutOfRange 10
88 #define TDC_CantOpen 11
89 #define TDC_NotInitialized 12
90 #define TDC_NotEnabled 13
91 #define TDC_NotAvailable 14
95 #endif
__int8 Int8
8 bit integer for MSVC
Definition: tdcdecl.h:53
__int64 Int64
64 bit integer for MSVC
Definition: tdcdecl.h:55
__int32 Bln32
integer used as boolean
Definition: tdcdecl.h:57
__int32 Int32
32 bit integer for MSVC
Definition: tdcdecl.h:54
unsigned __int8 Uint8
8-Bit unsigned int for MSVC
Definition: tdcdecl.h:56