#pragma once #include #ifdef NETTUNNELSDK_EXPORTS #define NETTUNNELSDK_API __declspec(dllexport) #else #define NETTUNNELSDK_API __declspec(dllimport) #endif using PROTO_CRYPTO_TYPE = enum { CRYPTO_NONE = 0, CRYPTO_BASE64 = 1, CRYPTO_AES128 = 2, CRYPTO_3DES = 3, CRYPTO_AES256 = 4, CRYPTO_MAX, }; typedef enum { LOG_DEBUG = 0, LOG_INFO = 1, LOG_WARN = 2, LOG_ERROR = 3, LOG_MAX } LOG_LEVEL; #ifdef __cplusplus // If used by C++ code, extern "C" { // we need to export the C interface #endif NETTUNNELSDK_API int __cdecl CreateTunnel(LPCSTR lpszMsg); NETTUNNELSDK_API const char*__cdecl TestMessage(); NETTUNNELSDK_API int __cdecl Add(int a, int b); NETTUNNELSDK_API int __cdecl TunnelSDKInitEnv(); NETTUNNELSDK_API int __cdecl SetProtocolEncryptType(PROTO_CRYPTO_TYPE type, const char* pProKey); NETTUNNELSDK_API void __cdecl InitTunnelSDKLog(const char* pLogFile, LOG_LEVEL level); #ifdef __cplusplus } #endif