-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathScanInterfaceC.h
141 lines (110 loc) · 6.42 KB
/
ScanInterfaceC.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#pragma once
#define DLL_FUNCTION __declspec(dllexport)
///////////////////////////////////////////////////////////////////////////////
// FlexScan3D
#define FS3D_RESULT_OK 0
#define FS3D_RESULT_ERROR -1
#define FS3D_RESULT_UNKNOWN -2
#define FS3D_RESULT_EXECUTING -3
#define FS3D_RESULT_WRONGTYPE -4
typedef void* FS3D_Handle;
extern "C"
{
DLL_FUNCTION int FS3D_Init(const char* a_PathName);
DLL_FUNCTION int FS3D_Command(const char* a_Command);
DLL_FUNCTION int FS3D_CommandAsync(const char* a_Command);
DLL_FUNCTION int FS3D_AsyncResult();
DLL_FUNCTION const char* FS3D_ScriptQuery(const char* a_Query);
DLL_FUNCTION int FS3D_Abort();
DLL_FUNCTION int FS3D_Exit();
// if FlexScan3D is already running, use FS3D_Attach/FS3D_Detach instead of FS3D_Init/FS3D_Exit
// NOTE: only FS3D_RegisterCallback and FS3D_UnregisterCallback are currently supported
DLL_FUNCTION int FS3D_Attach();
DLL_FUNCTION int FS3D_Detach();
// callbacks
DLL_FUNCTION int FS3D_RegisterCallback(const char* a_FunctionName, void* userContext, void (*a_Callback)(void* userContext, FS3D_Handle handle));
DLL_FUNCTION int FS3D_UnregisterCallback(const char* a_FunctionName);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Direct Memory Accessors
//
// The following functions can only be used within a user-defined callback.
// Pointers will only be valid within the scope of the callback function.
extern "C"
{
// Get details on currently available items
DLL_FUNCTION int FS3D_GetNumItems(const FS3D_Handle handle, int* numItems);
DLL_FUNCTION int FS3D_GetItem(const FS3D_Handle handle, const int itemIndex, char** itemName, char** itemType);
// Get values by item name and type
DLL_FUNCTION int FS3D_GetString(const FS3D_Handle handle, const char* itemName, char** value);
DLL_FUNCTION int FS3D_GetDouble(const FS3D_Handle handle, const char* itemName, double* value);
DLL_FUNCTION int FS3D_GetFloat(const FS3D_Handle handle, const char* itemName, float* value);
DLL_FUNCTION int FS3D_GetInt(const FS3D_Handle handle, const char* itemName, int* value);
DLL_FUNCTION int FS3D_GetDoubleArray(const FS3D_Handle handle, const char* itemName, int* numValues, double** values);
DLL_FUNCTION int FS3D_GetFloatArray(const FS3D_Handle handle, const char* itemName, int* numValues, float** values);
DLL_FUNCTION int FS3D_GetIntArray(const FS3D_Handle handle, const char* itemName, int* numValues, int** values);
DLL_FUNCTION int FS3D_GetByteArray(const FS3D_Handle handle, const char* itemName, int* numValues, unsigned char** values);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Multi-computer configurations
extern "C"
{
DLL_FUNCTION void FS3D_SetServer(const char* serverName);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// stdcall wrappers (for languages which require stdcall instead of cdecl)
extern "C"
{
DLL_FUNCTION int _stdcall FS3Ds_Init(const char* a_PathName);
DLL_FUNCTION int _stdcall FS3Ds_Command(const char* a_Command);
DLL_FUNCTION int _stdcall FS3Ds_CommandAsync(const char* a_Command);
DLL_FUNCTION int _stdcall FS3Ds_AsyncResult();
DLL_FUNCTION const char* _stdcall FS3Ds_ScriptQuery(const char* a_Query);
DLL_FUNCTION int _stdcall FS3Ds_Abort();
DLL_FUNCTION int _stdcall FS3Ds_Exit();
DLL_FUNCTION int _stdcall FS3Ds_Attach();
DLL_FUNCTION int _stdcall FS3Ds_Detach();
DLL_FUNCTION int _stdcall FS3Ds_RegisterCallback(const char* a_FunctionName, void* userContext, void (*a_Callback)(void* userContext, FS3D_Handle handle));
DLL_FUNCTION int _stdcall FS3Ds_UnregisterCallback(const char* a_FunctionName);
DLL_FUNCTION int _stdcall FS3Ds_GetNumItems(const FS3D_Handle handle, int* numItems);
DLL_FUNCTION int _stdcall FS3Ds_GetItem(const FS3D_Handle handle, const int itemIndex, char** itemName, char** itemType);
DLL_FUNCTION int _stdcall FS3Ds_GetString(const FS3D_Handle handle, const char* itemName, char** value);
DLL_FUNCTION int _stdcall FS3Ds_GetDouble(const FS3D_Handle handle, const char* itemName, double* value);
DLL_FUNCTION int _stdcall FS3Ds_GetFloat(const FS3D_Handle handle, const char* itemName, float* value);
DLL_FUNCTION int _stdcall FS3Ds_GetInt(const FS3D_Handle handle, const char* itemName, int* value);
DLL_FUNCTION int _stdcall FS3Ds_GetDoubleArray(const FS3D_Handle handle, const char* itemName, int* numValues, double** values);
DLL_FUNCTION int _stdcall FS3Ds_GetFloatArray(const FS3D_Handle handle, const char* itemName, int* numValues, float** values);
DLL_FUNCTION int _stdcall FS3Ds_GetIntArray(const FS3D_Handle handle, const char* itemName, int* numValues, int** values);
DLL_FUNCTION int _stdcall FS3Ds_GetByteArray(const FS3D_Handle handle, const char* itemName, int* numValues, unsigned char** values);
DLL_FUNCTION void _stdcall FS3Ds_SetServer(const char* serverName);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// KScan3D
#define KS3D_RESULT_OK 0
#define KS3D_RESULT_ERROR -1
#define KS3D_RESULT_UNKNOWN -2
#define KS3D_RESULT_EXECUTING -3
#define KS3D_RESULT_WRONGTYPE -4
extern "C"
{
DLL_FUNCTION int KS3D_Init(const char* a_PathName);
DLL_FUNCTION int KS3D_Command(const char* a_Command);
DLL_FUNCTION int KS3D_CommandAsync(const char* a_Command);
DLL_FUNCTION int KS3D_AsyncResult();
DLL_FUNCTION const char* KS3D_ScriptQuery(const char* a_Query);
DLL_FUNCTION int KS3D_Abort();
DLL_FUNCTION int KS3D_Exit();
// stdcall wrappers (for languages which require stdcall instead of cdecl)
DLL_FUNCTION int _stdcall KS3Ds_Init(const char* a_PathName);
DLL_FUNCTION int _stdcall KS3Ds_Command(const char* a_Command);
DLL_FUNCTION int _stdcall KS3Ds_CommandAsync(const char* a_Command);
DLL_FUNCTION int _stdcall KS3Ds_AsyncResult();
DLL_FUNCTION const char* _stdcall KS3Ds_ScriptQuery(const char* a_Query);
DLL_FUNCTION int _stdcall KS3Ds_Abort();
DLL_FUNCTION int _stdcall KS3Ds_Exit();
}
///////////////////////////////////////////////////////////////////////////////