//---------------------------------------------------------------------------- // Copyright (C) 2013-2015 Fabrice HARROUET (ENIB) // // Permission to use, copy, modify, distribute and sell this software // and its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. // The author makes no representations about the suitability of this // software for any purpose. // It is provided "as is" without express or implied warranty. //---------------------------------------------------------------------------- #ifndef MYNATIVELIB_H #define MYNATIVELIB_H 1 #if defined __cplusplus # define MYNATIVELIB_EXTERN_C extern "C" #else # define MYNATIVELIB_EXTERN_C #endif #if defined _WIN32 # define MYNATIVELIB_EXPORT_SYMBOL __declspec(dllexport) # define MYNATIVELIB_IMPORT_SYMBOL __declspec(dllimport) # if defined WIN32_MYNATIVELIB_DLL # define MYNATIVELIB_API_VAR MYNATIVELIB_EXPORT_SYMBOL # else # define MYNATIVELIB_API_VAR MYNATIVELIB_IMPORT_SYMBOL # endif #else # define MYNATIVELIB_EXPORT_SYMBOL # define MYNATIVELIB_IMPORT_SYMBOL # define MYNATIVELIB_API_VAR #endif #define MYNATIVELIB_API MYNATIVELIB_EXTERN_C MYNATIVELIB_API_VAR #define MYNATIVELIB_INLINE inline static #if defined _WIN32 # define _CRT_SECURE_NO_WARNINGS #endif #if !defined __cplusplus # include #endif #include #include #include typedef struct _MyStruct { bool b; int8_t c; int16_t s; int32_t i; int64_t l; float f; double d; char t[16]; } MyStruct; MYNATIVELIB_API void myNativeFunction(MyStruct *ms); #endif // MYNATIVELIB_H //----------------------------------------------------------------------------