VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
trdll.h
Go to the documentation of this file.
1 /* ************************
2  Copyright Terrain Experts Inc.
3  Terrain Experts Inc (TERREX) reserves all rights to this source code
4  unless otherwise specified in writing by the President of TERREX.
5  This copyright may be updated in the future, in which case that version
6  supercedes this one.
7  -------------------
8  Terrex Experts Inc.
9  4400 East Broadway #314
10  Tucson, AZ 85711
11  info@terrex.com
12  Tel: (520) 323-7990
13  ************************
14  */
15 
16 /* trdll.h
17  Windows Only
18 
19  This header file defines the declaration macros for DLLs.
20  */
21 
28 
30 
31 #ifdef TX_CLDECL
32 #undef TX_CLDECL
33 #undef TX_EXDECL
34 #undef TX_CDECL
35 #undef TX_CPPDECL
36 #undef TX_DODECL
37 #endif
38 #if !defined (__COMP_DLL)
42 #define TX_DODECL 0
44 #else
45 #if __COMP_DLL == __CURR_DLL
46 #define TX_DODECL 1
47 #else
48 #define TX_DODECL 0
49 #endif
50 #endif
51 
53 #if TX_DODECL == 0
54 
65 #ifndef TX_CLDECL
66 #define TX_CLDECL
68 #define TX_EXDECL /* no-op */
70 #define TX_CPPDECL /* no-op */
72 #define TX_CDECL /* no-op */
74 #ifndef TXDUMMY_DLL_MAIN
76 #define TXDUMMY_DLL_MAIN /* no-op */
77 #endif
78 #endif
79 
80 #else
81 #define TX_CLDECL __declspec( dllexport )
82 #define TX_EXDECL
83 #define TX_CPPDECL extern __declspec(dllexport)
84 #ifdef __cplusplus
85 #define TX_CDECL extern "C" __declspec(dllexport)
86 #else
87 #define TX_CDECL extern __declspec(dllexport)
88 #endif
89 
93 #ifndef TXDUMMY_DLL_MAIN
94 #define TXDUMMY_DLL_MAIN \
95 extern "C" { \
96 BOOL WINAPI _CRT_INIT (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved); \
97 BOOL APIENTRY DllMain (HANDLE hDLL, DWORD dwReason, LPVOID lpReserved) \
98 { \
99  switch (dwReason) \
100  { \
101  case DLL_PROCESS_ATTACH: \
102  { \
103  if (!_CRT_INIT (hDLL, dwReason, lpReserved)) \
104  return FALSE; \
105  break; \
106  } \
107 \
108  case DLL_PROCESS_DETACH: \
109  { \
110  break; \
111  } \
112  } \
113  return TRUE; \
114 } \
115 }
116 
117 #endif
118 #endif
119 
120 #ifndef txdll_h_
121 #define txdll_h_
123 
124 #endif

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)