FEDRA emulsion software from the OPERA Collaboration
im_nt.h
Go to the documentation of this file.
1/*******************************************************************
2 *
3 * COPYRIGHT (c) 2000 Matrox Electronic Systems Ltd.
4 * All Rights Reserved
5 *
6 *******************************************************************/
7
8#ifndef __IM_NT_H__
9#define __IM_NT_H__
10
11#if defined(SHOW_INCLUDE_FILE)
12#pragma message ("#include "__FILE__)
13#endif
14
15
16#define TIME_TYPE double
17
18/* ---------------------------------------------------------------------- */
19#if defined(_IM_COMP_MICROSOFT)
20
21#if !defined(_IM_HOST_OS_NT_KERNEL)
22
23#if 0 && defined(D_EXCEPTION)
24#define _DEBUG_MSDEV_CRT
25#endif
26
27#if defined(_DEBUG_MSDEV_CRT) && defined(D_EXCEPTION)
28#define _DEBUG
29#define _CRTDBG_MAP_ALLOC
30#endif
31
32#pragma pack( push, enter_im_nt_h)
33#pragma pack( 8 )
34#include <ctype.h>
35#include <malloc.h>
36
37#include <stdlib.h>
38#include <stdio.h>
39#include <stddef.h>
40
41#if defined(_DEBUG_MSDEV_CRT) && defined(D_EXCEPTION)
42#include <crtdbg.h>
43#endif
44
45#if !defined(_WIN32_WINNT)
46#define _WIN32_WINNT 0x0400
47#endif
48#include <string.h>
49#include <windows.h> /* Microsoft windows.h require a pack of 8! */
50#include <winioctl.h>
51#pragma pack( pop, enter_im_nt_h)
52
53#endif
54
55#define IM_FTYPE __cdecl /* _stdcall can't be used because of varargs in inter */
56#define IM_AFTYPE __cdecl
57
58/* Linux */
59#define IM_LFTYPE
60#define IM_LAFTYPE
61
62/* On local code, the message on the stack must be 32 byte aligned */
63#define IM_MSG_ALIGN
64#if !defined(_IM_HOST_OS_NT_KERNEL)
65#define IM_DLLEXPORT __declspec(dllexport)
66#define IM_DLLIMPORT __declspec(dllimport)
67#if defined(OBJ_FOR_DLL)
68#define IM_DLLTYPE IM_DLLEXPORT
69#else
70#define IM_DLLTYPE IM_DLLIMPORT
71#endif
72#else
73#define IM_DLLEXPORT
74#define IM_DLLIMPORT
75#define IM_DLLTYPE
76#endif
77
78#if !defined(IM_EXTC)
79#if defined(__cplusplus) && !defined(_IM_HOST_OS_NT_KERNEL)
80#define IM_EXTC extern "C" IM_DLLTYPE
81#define IM_EXTCPP extern IM_DLLTYPE
82#else
83#define IM_EXTC extern IM_DLLTYPE
84#define IM_EXTCPP extern IM_DLLTYPE
85#endif
86#endif
87
88#endif
89
90
91/* ---------------------------------------------------------------------- */
92#define IM_VTYPE volatile
93
94#define SH_TYPE IM_VTYPE
95
96#if !defined(_IM_HOST_OS_NT_KERNEL)
97/*
98 * Common typedefs used throughout source
99 */
100typedef HANDLE PID_HANDLE;
101#endif
102
103/* ---------------------------------------------------------------------- */
104#if defined(_IM_HOST_OS_NT_KERNEL)
105
106#undef TIME_TYPE
107#define TIME_TYPE long
108
109extern "C"
110{
111#include <ntddk.h>
112}
113
114
115#endif /* _IM_HOST_OS_NT_KERNEL */
116
117/* ---------------------------------------------------------------------- */
118#if !defined(M_MTXSERVICE)
119#include <im_irqio.h> /* Host general interrupt and IO mechanism */
120#endif
121
122#endif /*__IM_NT_H__*/
HANDLE PID_HANDLE
Definition: im_nt.h:100