Defines.h
Go to the documentation of this file.
1 
8 #pragma once
11 #if defined(ON_WINDOWS) || defined(ON_UWP) || defined(WIN32) || defined(_WIN64)
13 # if __cplusplus
14 # define EXPORT_DLL extern "C" __declspec(dllexport)
15 # else
16 # define EXPORT_DLL __declspec(dllexport)
17 # endif
19 # define EXPORT_CPP_DLL __declspec(dllexport)
23 # define _in_ _In_
27 # define _out_ _Out_
28 #else
30 # if __cplusplus
31 # define EXPORT_DLL extern "C"
32 # else
33 # define EXPORT_DLL
34 # endif
36 # define EXPORT_CPP_DLL
40 # define _in_
44 # define _out_
45 #endif
46 // LIBOS LICENCE
47 //
48 // GNU Lesser General Public License Version 3.0
49 //
50 // Copyright Luke Shore (c) 2022, 2023
51 //
53 #include <libos/DataType.h>
57 #define LOS_MAKE_ABI_VERSION(variant, major, minor, patch) \
58  ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
60 #define LOS_ABI_VERSION_1_1 LOS_MAKE_ABI_VERSION(0, 1, 1, 0)
78 EXPORT_DLL void losUnicodeToBytes(_in_ const wchar_t *src, _out_ char **dest);
82 EXPORT_DLL void losBytesToUnicode(_in_ const char *src, _out_ wchar_t **dest);
DataType is where data types that are used in the library and for the library API are defined.
#define _out_
out macromatic suger to make headers easier to read
Definition: Defines.h:44
EXPORT_DLL uint32_t libOSABIVersion()
due to some functions may not be avaliable between version this is used tp check at runtime
EXPORT_DLL void losBytesToUnicode(_in_ const char *src, _out_ wchar_t **dest)
converts an byte array to Unicode String
#define EXPORT_DLL
on windows some extra syntax is required for the dll to work properly so that is dose not affect the ...
Definition: Defines.h:33
EXPORT_DLL void libOSCleanUp()
due to some of the platforms that libOS abstracts on some platforms some !!!IMPORTANT!...
#define _in_
in macromatic suger to make headers easier to read
Definition: Defines.h:40
EXPORT_DLL void libOSInit()
due to some of the platforms that libOS abstracts on some platforms some !!!IMPORTANT!...
EXPORT_DLL void losUnicodeToBytes(_in_ const wchar_t *src, _out_ char **dest)
converts Unicode String to an byte array