node-gpuinfo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +336 -0
  3. package/binding.gyp +69 -0
  4. package/build/Release/gpu.exp +0 -0
  5. package/build/Release/gpu.lib +0 -0
  6. package/build/Release/gpu.node +0 -0
  7. package/build/Release/gpu.pdb +0 -0
  8. package/build/binding.sln +19 -0
  9. package/build/gpu.vcxproj +175 -0
  10. package/build/gpu.vcxproj.filters +169 -0
  11. package/example.js +69 -0
  12. package/index.js +33 -0
  13. package/package.json +68 -0
  14. package/src/binding.cpp +201 -0
  15. package/src/gpu_info.c +130 -0
  16. package/src/gpu_info.h +86 -0
  17. package/src/includes/adlx/ADLX.h +367 -0
  18. package/src/includes/adlx/ADLXDefines.h +1345 -0
  19. package/src/includes/adlx/ADLXHelper/ADLXHelper.c +175 -0
  20. package/src/includes/adlx/ADLXHelper/ADLXHelper.h +245 -0
  21. package/src/includes/adlx/ADLXHelper/WinAPIS.c +64 -0
  22. package/src/includes/adlx/ADLXStructures.h +206 -0
  23. package/src/includes/adlx/ADLXVersion.h +18 -0
  24. package/src/includes/adlx/I3DSettings.h +3476 -0
  25. package/src/includes/adlx/I3DSettings1.h +292 -0
  26. package/src/includes/adlx/I3DSettings2.h +317 -0
  27. package/src/includes/adlx/IApplications.h +397 -0
  28. package/src/includes/adlx/IChangedEvent.h +71 -0
  29. package/src/includes/adlx/ICollections.h +325 -0
  30. package/src/includes/adlx/IDesktops.h +918 -0
  31. package/src/includes/adlx/IDisplay3DLUT.h +663 -0
  32. package/src/includes/adlx/IDisplayGamma.h +683 -0
  33. package/src/includes/adlx/IDisplayGamut.h +760 -0
  34. package/src/includes/adlx/IDisplaySettings.h +3476 -0
  35. package/src/includes/adlx/IDisplays.h +2676 -0
  36. package/src/includes/adlx/IDisplays1.h +191 -0
  37. package/src/includes/adlx/IDisplays2.h +188 -0
  38. package/src/includes/adlx/IDisplays3.h +256 -0
  39. package/src/includes/adlx/IGPUAutoTuning.h +460 -0
  40. package/src/includes/adlx/IGPUManualFanTuning.h +1007 -0
  41. package/src/includes/adlx/IGPUManualGFXTuning.h +607 -0
  42. package/src/includes/adlx/IGPUManualPowerTuning.h +340 -0
  43. package/src/includes/adlx/IGPUManualVRAMTuning.h +576 -0
  44. package/src/includes/adlx/IGPUPresetTuning.h +469 -0
  45. package/src/includes/adlx/IGPUTuning.h +1239 -0
  46. package/src/includes/adlx/IGPUTuning1.h +197 -0
  47. package/src/includes/adlx/II2C.h +198 -0
  48. package/src/includes/adlx/ILog.h +72 -0
  49. package/src/includes/adlx/IMultiMedia.h +578 -0
  50. package/src/includes/adlx/IPerformanceMonitoring.h +2520 -0
  51. package/src/includes/adlx/IPerformanceMonitoring1.h +134 -0
  52. package/src/includes/adlx/IPerformanceMonitoring2.h +341 -0
  53. package/src/includes/adlx/IPerformanceMonitoring3.h +199 -0
  54. package/src/includes/adlx/IPowerTuning.h +473 -0
  55. package/src/includes/adlx/IPowerTuning1.h +515 -0
  56. package/src/includes/adlx/ISmartAccessMemory.h +114 -0
  57. package/src/includes/adlx/ISystem.h +1557 -0
  58. package/src/includes/adlx/ISystem1.h +237 -0
  59. package/src/includes/adlx/ISystem2.h +643 -0
  60. package/src/linux/amd_linux.c +269 -0
  61. package/src/linux/intel_linux.c +20 -0
  62. package/src/linux/nvidia_linux.c +257 -0
  63. package/src/macos/amd_mac.c +131 -0
  64. package/src/macos/intel_mac.c +131 -0
  65. package/src/macos/nvidia_mac.c +21 -0
  66. package/src/vendor/amd.c +37 -0
  67. package/src/vendor/intel.c +37 -0
  68. package/src/vendor/nvidia.c +37 -0
  69. package/src/windows/amd_windows.c +468 -0
  70. package/src/windows/intel_windows.c +157 -0
  71. package/src/windows/nvidia_windows.c +252 -0
package/src/gpu_info.h ADDED
@@ -0,0 +1,86 @@
1
+ #ifndef GPU_INFO_H
2
+ #define GPU_INFO_H
3
+
4
+ #include <stdint.h>
5
+ #include <stdbool.h>
6
+
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+
11
+ // GPU vendor types
12
+ typedef enum {
13
+ GPU_VENDOR_UNKNOWN = 0,
14
+ GPU_VENDOR_NVIDIA,
15
+ GPU_VENDOR_AMD,
16
+ GPU_VENDOR_INTEL
17
+ } gpu_vendor_t;
18
+
19
+ // GPU information structure
20
+ typedef struct {
21
+ int32_t index;
22
+ gpu_vendor_t vendor;
23
+ char name[256];
24
+ char uuid[64];
25
+ char pci_bus_id[32];
26
+
27
+ // Memory information (in MB)
28
+ uint64_t memory_total;
29
+ uint64_t memory_used;
30
+ uint64_t memory_free;
31
+
32
+ // Utilization (0-100)
33
+ float gpu_utilization;
34
+ float memory_utilization;
35
+
36
+ // Temperature in Celsius
37
+ float temperature;
38
+
39
+ // Power in Watts
40
+ float power_usage;
41
+
42
+ // Clocks in MHz
43
+ uint32_t core_clock;
44
+ uint32_t memory_clock;
45
+
46
+ // Fan speed in percentage (0-100)
47
+ float fan_speed;
48
+ } gpu_info_t;
49
+
50
+ // Error codes
51
+ typedef enum {
52
+ GPU_SUCCESS = 0,
53
+ GPU_ERROR_NOT_SUPPORTED = -1,
54
+ GPU_ERROR_NO_GPU = -2,
55
+ GPU_ERROR_ACCESS_DENIED = -3,
56
+ GPU_ERROR_INVALID_PARAM = -4,
57
+ GPU_ERROR_API_FAILED = -5
58
+ } gpu_error_t;
59
+
60
+ // Initialization and cleanup
61
+ gpu_error_t gpu_info_init(void);
62
+ gpu_error_t gpu_info_cleanup(void);
63
+
64
+ // GPU discovery
65
+ gpu_error_t gpu_get_count(int32_t* count);
66
+ gpu_error_t gpu_get_info(int32_t index, gpu_info_t* info);
67
+
68
+ // Platform-specific implementations
69
+ gpu_error_t nvidia_get_gpu_count(int32_t* count);
70
+ gpu_error_t nvidia_get_gpu_info(int32_t index, gpu_info_t* info);
71
+
72
+ gpu_error_t amd_get_gpu_count(int32_t* count);
73
+ gpu_error_t amd_get_gpu_info(int32_t index, gpu_info_t* info);
74
+
75
+ gpu_error_t intel_get_gpu_count(int32_t* count);
76
+ gpu_error_t intel_get_gpu_info(int32_t index, gpu_info_t* info);
77
+
78
+ // Utility functions
79
+ const char* gpu_error_string(gpu_error_t error);
80
+ bool gpu_vendor_supported(gpu_vendor_t vendor);
81
+
82
+ #ifdef __cplusplus
83
+ }
84
+ #endif
85
+
86
+ #endif // GPU_INFO_H
@@ -0,0 +1,367 @@
1
+ //
2
+ // Copyright (c) 2021 - 2025 Advanced Micro Devices, Inc. All rights reserved.
3
+ //
4
+ //-------------------------------------------------------------------------------------------------
5
+
6
+ #ifndef ADLX_H
7
+ #define ADLX_H
8
+ #pragma once
9
+
10
+ #include "ADLXDefines.h"
11
+ #include "ISystem.h"
12
+
13
+ #pragma region dll name
14
+ #if defined(_WIN32)
15
+ #if defined(_M_AMD64)
16
+ /**
17
+ * @def ADLX_DLL_NAMEW
18
+ * @ingroup ADLXMacro
19
+ * @ENG_START_DOX Unicode name for 64-bit ADLX dll @ENG_END_DOX
20
+ * @definition
21
+ * @codeStart
22
+ * \#define ADLX_DLL_NAMEW L"amdadlx64.dll"
23
+ * @codeEnd
24
+ */
25
+ #define ADLX_DLL_NAMEW L"amdadlx64.dll"
26
+ /**
27
+ * @def ADLX_DLL_NAMEA
28
+ * @ingroup ADLXMacro
29
+ * @ENG_START_DOX ANSI name for 64-bit ADLX dll @ENG_END_DOX
30
+ * @definition
31
+ * @codeStart
32
+ * \#define ADLX_DLL_NAMEA "amdadlx64.dll"
33
+ * @codeEnd
34
+ */
35
+ #define ADLX_DLL_NAMEA "amdadlx64.dll"
36
+ #else //_M_AMD64
37
+ /**
38
+ * @def ADLX_DLL_NAMEW
39
+ * @ingroup ADLXMacro
40
+ * @ENG_START_DOX Unicode name for 32-bit ADLX dll @ENG_END_DOX
41
+ * @definition
42
+ * @codeStart
43
+ * \#define ADLX_DLL_NAMEW L"amdadlx32.dll"
44
+ * @codeEnd
45
+ */
46
+ #define ADLX_DLL_NAMEW L"amdadlx32.dll"
47
+ /**
48
+ * @def ADLX_DLL_NAMEA
49
+ * @ingroup ADLXMacro
50
+ * @ENG_START_DOX ANSI name for 32-bit ADLX dll @ENG_END_DOX
51
+ * @definition
52
+ * @codeStart
53
+ * \#define ADLX_DLL_NAMEA "amdadlx32.dll"
54
+ * @codeEnd
55
+ */
56
+ #define ADLX_DLL_NAMEA "amdadlx32.dll"
57
+ #endif //_M_AMD64
58
+
59
+ #if defined(UNICODE)
60
+ /**
61
+ * @def ADLX_DLL_NAME
62
+ * @ingroup ADLXMacro
63
+ * @ENG_START_DOX ADLX dll name in Unicode applications @ENG_END_DOX
64
+ * @definition
65
+ * @codeStart
66
+ * \#define ADLX_DLL_NAME @ref ADLX_DLL_NAMEW
67
+ * @codeEnd
68
+ */
69
+ #define ADLX_DLL_NAME ADLX_DLL_NAMEW
70
+ #else //UNICODE
71
+ /**
72
+ * @def ADLX_DLL_NAME
73
+ * @ingroup ADLXMacro
74
+ * @ENG_START_DOX ADLX dll name in ANSI applications @ENG_END_DOX
75
+ * @definition
76
+ * @codeStart
77
+ * \#define ADLX_DLL_NAME @ref ADLX_DLL_NAMEA
78
+ * @codeEnd
79
+ */
80
+ #define ADLX_DLL_NAME ADLX_DLL_NAMEA
81
+ #endif //UNICODE
82
+ #endif //_WIN32
83
+ #pragma endregion dll name
84
+
85
+ #pragma region ADLX callbacks
86
+ typedef ADLX_RESULT(ADLX_CDECL_CALL* ADLXQueryFullVersion_Fn)(adlx_uint64* fullVersion);
87
+ typedef ADLX_RESULT(ADLX_CDECL_CALL* ADLXQueryVersion_Fn)(const char** version);
88
+
89
+ /**
90
+ * @typedef ADLX_ADL_Main_Memory_Free
91
+ * @ingroup ADLXDefs
92
+ * @ENG_START_DOX The typedef of ADLX_ADL_Main_Memory_Free function. @ENG_END_DOX
93
+ * @definition
94
+ * @codeStart
95
+ * typedef void (ADLX_STD_CALL* ADLX_ADL_Main_Memory_Free)(void** buffer)
96
+ * @codeEnd
97
+ */
98
+ typedef void (ADLX_STD_CALL* ADLX_ADL_Main_Memory_Free)(void** buffer);
99
+ #pragma endregion ADLX callbacks
100
+
101
+ #pragma region C-style functions
102
+ /**
103
+ * @def ADLX_QUERY_FULL_VERSION_FUNCTION_NAME
104
+ * @ingroup ADLXMacro
105
+ * @ENG_START_DOX The function name of QueryFullVersion @ENG_END_DOX
106
+ * @definition
107
+ * @codeStart
108
+ * \#define ADLX_QUERY_FULL_VERSION_FUNCTION_NAME "ADLXQueryFullVersion"
109
+ * @codeEnd
110
+ */
111
+ #define ADLX_QUERY_FULL_VERSION_FUNCTION_NAME "ADLXQueryFullVersion"
112
+
113
+ /**
114
+ * @def ADLX_QUERY_VERSION_FUNCTION_NAME
115
+ * @ingroup ADLXMacro
116
+ * @ENG_START_DOX The function name of QueryVersion @ENG_END_DOX
117
+ * @definition
118
+ * @codeStart
119
+ * \#define ADLX_QUERY_VERSION_FUNCTION_NAME "ADLXQueryVersion"
120
+ * @codeEnd
121
+ */
122
+ #define ADLX_QUERY_VERSION_FUNCTION_NAME "ADLXQueryVersion"
123
+
124
+ /**
125
+ * @def ADLX_INIT_FUNCTION_NAME
126
+ * @ingroup ADLXMacro
127
+ * @ENG_START_DOX The function name of ADLXInitialize @ENG_END_DOX
128
+ * @definition
129
+ * @codeStart
130
+ * \#define ADLX_INIT_FUNCTION_NAME "ADLXInitialize"
131
+ * @codeEnd
132
+ */
133
+ #define ADLX_INIT_FUNCTION_NAME "ADLXInitialize"
134
+
135
+ /**
136
+ * @def ADLX_INIT_WITH_INCOMPATIBLE_DRIVER_FUNCTION_NAME
137
+ * @ingroup ADLXMacro
138
+ * @ENG_START_DOX The function name of ADLXInitializeWithIncompatibleDriver @ENG_END_DOX
139
+ * @definition
140
+ * @codeStart
141
+ * \#define ADLX_INIT_WITH_INCOMPATIBLE_DRIVER_FUNCTION_NAME "ADLXInitializeWithIncompatibleDriver"
142
+ * @codeEnd
143
+ */
144
+ #define ADLX_INIT_WITH_INCOMPATIBLE_DRIVER_FUNCTION_NAME "ADLXInitializeWithIncompatibleDriver"
145
+
146
+ /**
147
+ * @def ADLX_INIT_WITH_CALLER_ADL_FUNCTION_NAME
148
+ * @ingroup ADLXMacro
149
+ * @ENG_START_DOX The function name of ADLXInitializeWithCallerAdl @ENG_END_DOX
150
+ * @definition
151
+ * @codeStart
152
+ * \#define ADLX_INIT_WITH_CALLER_ADL_FUNCTION_NAME "ADLXInitializeWithCallerAdl"
153
+ * @codeEnd
154
+ */
155
+ #define ADLX_INIT_WITH_CALLER_ADL_FUNCTION_NAME "ADLXInitializeWithCallerAdl"
156
+
157
+ /**
158
+ * @def ADLX_TERMINATE_FUNCTION_NAME
159
+ * @ingroup ADLXMacro
160
+ * @ENG_START_DOX The function name of ADLXTerminate @ENG_END_DOX
161
+ * @definition
162
+ * @codeStart
163
+ * \#define ADLX_TERMINATE_FUNCTION_NAME "ADLXTerminate"
164
+ * @codeEnd
165
+ */
166
+ #define ADLX_TERMINATE_FUNCTION_NAME "ADLXTerminate"
167
+
168
+ #if defined(__cplusplus)
169
+
170
+ extern "C"
171
+ {
172
+ /**
173
+ * @page page_ADLXQueryFullVersion_Fn ADLXQueryFullVersion_Fn
174
+ * @ENG_START_DOX
175
+ * @brief A pointer to the function to query the full version of ADLX.
176
+ * @ENG_END_DOX
177
+ *
178
+ * @syntax
179
+ * @codeStart
180
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXQueryFullVersion_Fn)(adlx_uint64* fullVersion)
181
+ * @codeEnd
182
+ * @params
183
+ * @paramrow{1.,[out],fullVersion,adlx_uint64*,@ENG_START_DOX The pointer to a variable where the full version of ADLX is returned. @ENG_END_DOX}
184
+ *
185
+ * @retvalues
186
+ * @ENG_START_DOX
187
+ * If the full version is successfully returned, __ADLX_OK__ is returned.<br>
188
+ * If the full version is not successfully returned, an error code is returned.<br>
189
+ * Refer to @ref ADLX_RESULT for success codes and error codes.<br>
190
+ * @detaileddesc
191
+ * The pointer of the function is returned by the @ref adlx_get_proc_address using the @ref ADLX_QUERY_FULL_VERSION_FUNCTION_NAME as the function name.
192
+ * @ENG_END_DOX
193
+ * @requirements
194
+ * @DetailsTable{#include "ADLX.h", @ADLX_First_Ver}
195
+ */
196
+
197
+ /**
198
+ * @typedef ADLXQueryFullVersion_Fn
199
+ * @ingroup ADLXDefs
200
+ * @ENG_START_DOX The typedef of QueryFullVersion function. @ENG_END_DOX
201
+ * @definition
202
+ * @codeStart
203
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *QueryFullVersion_Fn)(adlx_uint64* fullVersion)
204
+ * @codeEnd
205
+ */
206
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXQueryFullVersion_Fn)(adlx_uint64* fullVersion);
207
+
208
+ /**
209
+ * @page page_ADLXQueryVersion_Fn ADLXQueryVersion_Fn
210
+ * @ENG_START_DOX
211
+ * @brief A pointer to the function to query the version of ADLX.
212
+ * @ENG_END_DOX
213
+ *
214
+ * @syntax
215
+ * @codeStart
216
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXQueryVersion_Fn)(const char** version)
217
+ * @codeEnd
218
+ * @params
219
+ * @paramrow{1.,[out],version,const char**,@ENG_START_DOX The pointer to a zero-terminated string where the version of ADLX is returned. @ENG_END_DOX}
220
+ *
221
+ * @retvalues
222
+ * @ENG_START_DOX
223
+ * If the version is successfully returned, __ADLX_OK__ is returned.<br>
224
+ * If the version is not successfully returned, an error code is returned.<br>
225
+ * Refer to @ref ADLX_RESULT for success codes and error codes.<br>
226
+ * @detaileddesc
227
+ * The pointer of the function is returned by the @ref adlx_get_proc_address using the @ref ADLX_QUERY_VERSION_FUNCTION_NAME as the function name.
228
+ * @ENG_END_DOX
229
+ * @requirements
230
+ * @DetailsTable{#include "ADLX.h", @ADLX_First_Ver}
231
+ */
232
+
233
+ /**
234
+ * @typedef ADLXQueryVersion_Fn
235
+ * @ingroup ADLXDefs
236
+ * @ENG_START_DOX The typedef of QueryVersion function. @ENG_END_DOX
237
+ * @definition
238
+ * @codeStart
239
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *QueryVersion_Fn)(const char** version)
240
+ * @codeEnd
241
+ */
242
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXQueryVersion_Fn)(const char** version);
243
+
244
+ /**
245
+ * @page page_ADLXInitialize_Fn ADLXInitialize_Fn
246
+ * @ENG_START_DOX
247
+ * @brief A pointer to the function to initialize ADLX with default parameters or a pointer to the function to initialize ADLX with a legacy driver.
248
+ * @ENG_END_DOX
249
+ *
250
+ * @syntax
251
+ * @codeStart
252
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitialize_Fn)(adlx_uint64 version, @ref DOX_IADLXSystem** ppSystem)
253
+ * @codeEnd
254
+ * @params
255
+ * @paramrow{1.,[in],version,adlx_uint64,@ENG_START_DOX The version of ADLX. @ENG_END_DOX}
256
+ * @paramrow{1.,[out],ppSystem,@ref DOX_IADLXSystem**,@ENG_START_DOX The address of a pointer to the ADLX system interface. If ADLX initialization failed\, the method sets the dereferenced address __*ppSystem__ to __nullptr__. @ENG_END_DOX}
257
+ *
258
+ * @retvalues
259
+ * @ENG_START_DOX
260
+ * If ADLX was successfully initialized, __ADLX_OK__ is returned.<br>
261
+ * If ADLX was not successfully initialized, an error code is returned.<br>
262
+ * Refer to @ref ADLX_RESULT for success codes and error codes.<br>
263
+ * @detaileddesc
264
+ * The pointer of the function is returned by the @ref adlx_get_proc_address using the @ref ADLX_INIT_FUNCTION_NAME or @ref ADLX_INIT_WITH_INCOMPATIBLE_DRIVER_FUNCTION_NAME as the function name.
265
+ * @ENG_END_DOX
266
+ * @requirements
267
+ * @DetailsTable{#include "ADLX.h", @ADLX_First_Ver}
268
+ */
269
+
270
+ /**
271
+ * @typedef ADLXInitialize_Fn
272
+ * @ingroup ADLXDefs
273
+ * @ENG_START_DOX The typedef of ADLXInitialize function. @ENG_END_DOX
274
+ * @definition
275
+ * @codeStart
276
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitialize_Fn)(adlx_uint64 version, @ref DOX_IADLXSystem** ppSystem)
277
+ * @codeEnd
278
+ */
279
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitialize_Fn)(adlx_uint64 version, adlx::IADLXSystem** ppSystem);
280
+
281
+ /**
282
+ * @page page_ADLXInitializeWithCallerAdl_Fn ADLXInitializeWithCallerAdl_Fn
283
+ * @ENG_START_DOX
284
+ * @brief A pointer to the function to initialize ADLX with an ADL context.
285
+ * @ENG_END_DOX
286
+ *
287
+ * @syntax
288
+ * @codeStart
289
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitializeWithCallerAdl_Fn)(adlx_uint64 version, @ref DOX_IADLXSystem** ppSystem, @ref DOX_IADLMapping** ppAdlMapping, adlx_handle adlContext, @ref ADLX_ADL_Main_Memory_Free adlMainMemoryFree)
290
+ * @codeEnd
291
+ * @params
292
+ * @paramrow{1.,[in],version,adlx_uint64,@ENG_START_DOX The version of ADLX. @ENG_END_DOX}
293
+ * @paramrow{2.,[out],ppSystem,@ref DOX_IADLXSystem**,@ENG_START_DOX The address of a pointer to the ADLX system interface. If ADLX initialization failed\, the method sets the dereferenced address __*ppSystem__ to __nullptr__. @ENG_END_DOX}
294
+ * @paramrow{3.,[out],ppAdlMapping,@ref DOX_IADLMapping**,@ENG_START_DOX The address of a pointer to the ADLX mapping interface. If ADLX initialization failed\, the method sets the dereferenced address __*ppAdlMapping__ to __nullptr__. @ENG_END_DOX}
295
+ * @paramrow{4.,[in],adlContext,adlx_handle,@ENG_START_DOX The ADL context. @ENG_END_DOX}
296
+ * @paramrow{5.,[in],adlMainMemoryFree,@ref ADLX_ADL_Main_Memory_Free,@ENG_START_DOX The callback handle of the memory deallocation function. @ENG_END_DOX}
297
+ *
298
+ * @retvalues
299
+ * @ENG_START_DOX
300
+ * If ADLX was successfully initialized, __ADLX_OK__ is returned.<br>
301
+ * If ADLX was not successfully initialized, an error code is returned.<br>
302
+ * Refer to @ref ADLX_RESULT for success codes and error codes.<br>
303
+ * @detaileddesc
304
+ * The pointer of the function is returned by the @ref adlx_get_proc_address using the @ref ADLX_INIT_WITH_CALLER_ADL_FUNCTION_NAME as the function name.
305
+ * @ENG_END_DOX
306
+ * @requirements
307
+ * @DetailsTable{#include "ADLX.h", @ADLX_First_Ver}
308
+ */
309
+
310
+ /**
311
+ * @typedef ADLXInitializeWithCallerAdl_Fn
312
+ * @ingroup ADLXDefs
313
+ * @ENG_START_DOX The typedef of ADLXInitializeWithCallerAdl function. @ENG_END_DOX
314
+ * @definition
315
+ * @codeStart
316
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitializeWithCallerAdl_Fn)(adlx_uint64 version, @ref DOX_IADLXSystem** ppSystem, @ref DOX_IADLMapping** ppAdlMapping, adlx_handle adlContext, @ref ADLX_ADL_Main_Memory_Free adlMainMemoryFree)
317
+ * @codeEnd
318
+ */
319
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitializeWithCallerAdl_Fn)(adlx_uint64 version, adlx::IADLXSystem** ppSystem, adlx::IADLMapping** ppAdlMapping, adlx_handle adlContext, ADLX_ADL_Main_Memory_Free adlMainMemoryFree);
320
+
321
+ /**
322
+ * @page page_ADLXTerminate_Fn ADLXTerminate_Fn
323
+ * @ENG_START_DOX
324
+ * @brief A pointer to the function to terminate ADLX.
325
+ * @ENG_END_DOX
326
+ *
327
+ * @syntax
328
+ * @codeStart
329
+ * typedef @ref ADLX_RESULT (ADLX_CDECL_CALL *ADLXTerminate_Fn)()
330
+ * @codeEnd
331
+ * @params
332
+ * N/A
333
+ *
334
+ * @retvalues
335
+ * @ENG_START_DOX
336
+ * If the function is successfully executed, __ADLX_OK__ is returned.<br>
337
+ * If the function is not successfully executed, an error code is returned.<br>
338
+ * Refer to @ref ADLX_RESULT for success codes and error codes.<br>
339
+ * @detaileddesc
340
+ * The pointer of the function is returned by the @ref adlx_get_proc_address using the @ref ADLX_TERMINATE_FUNCTION_NAME as the function name.
341
+ * @ENG_END_DOX
342
+ * @requirements
343
+ * @DetailsTable{#include "ADLX.h", @ADLX_First_Ver}
344
+ */
345
+
346
+ /**
347
+ * @typedef ADLXTerminate_Fn
348
+ * @ingroup ADLXDefs
349
+ * @ENG_START_DOX The typedef of ADLXTerminate function. @ENG_END_DOX
350
+ * @definition
351
+ * @codeStart
352
+ * typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXTerminate_Fn)()
353
+ * @codeEnd
354
+ */
355
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXTerminate_Fn)();
356
+ }
357
+ #else
358
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXQueryFullVersion_Fn)(adlx_uint64* fullVersion);
359
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXQueryVersion_Fn)(const char** version);
360
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitialize_Fn)(adlx_uint64 version, IADLXSystem** ppSystem);
361
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXInitializeWithCallerAdl_Fn)(adlx_uint64 version, IADLXSystem** ppSystem, IADLMapping** ppAdlMapping, adlx_handle adlContext, ADLX_ADL_Main_Memory_Free adlMainMemoryFree);
362
+ typedef ADLX_RESULT (ADLX_CDECL_CALL *ADLXTerminate_Fn)();
363
+ #endif
364
+
365
+ #pragma endregion C-style functions
366
+
367
+ #endif //ADLX_H