NetTunnelWindows/NetTunnelSDK/user.h

38 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include <Windows.h>
#ifdef NETTUNNELSDK_EXPORTS
#define USERMANAGER_API __declspec(dllexport)
#else
#define USERMANAGER_API __declspec(dllimport)
#endif
/**
*
* @brief
*/
typedef struct {
int isCurrent; ///< 网卡 MAC 地址
TCHAR CfgPath[260]; ///< 配置文件路径
} USER_CFGFILE, *PUSER_CFGFILE;
#ifdef __cplusplus // If used by C++ code,
extern "C" {
// we need to export the C interface
#endif
/**
* @brief
* @param[in] pUserName
* @param[in] pToken 访
* @param[out] pCliCfg
* @return 0: 0 @see USER_ERRNO
* - -ERR_INPUT_PARAMS
* - -ERR_MEMORY_STR
* - -ERR_CREATE_FILE
* - ERR_SUCCESS
*/
USERMANAGER_API int __cdecl UserLogin(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CLIENT_CONFIG *pCliCfg);
USERMANAGER_API int __cdecl GetUserConfigFiles(const TCHAR *pUserName, PUSER_CFGFILE* pCfgFile, int *pItems);
#ifdef __cplusplus
}
#endif