Commit e823c389 by kevin

change project to import dll, remove no need *.h in export include files

1 parent c88e8798
......@@ -4,8 +4,13 @@
#include <iostream>
#include <WinBase.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "des.h"
#ifdef __cplusplus
}
#endif
//#include "FucBase.h"
/*
......
......@@ -2,10 +2,21 @@
#ifndef LK_SEETA_VERIFY_H
#define LK_SEETA_VERIFY_H
#ifdef _WIN32
#ifdef SEETA_EXPORTS
#define SEETA_API __declspec(dllexport)
#else
#define SEETA_API __declspec(dllimport)
#endif
#else
#define VIPL_API __attribute__ ((visibility("default")))
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include "des.h"
//#include "des.h"
#include <windows.h>
typedef int(__stdcall *pConnect)(int);
......@@ -16,15 +27,15 @@ typedef int(__stdcall *pSendAPDU)(int, unsigned char*, int*, unsigned char*);
class LK_SEETA_VERIFY
{
public:
LK_SEETA_VERIFY();
~LK_SEETA_VERIFY();
SEETA_API LK_SEETA_VERIFY();
SEETA_API ~LK_SEETA_VERIFY();
void contrast_authenticate();
void get_chip_id(unsigned char chip_id[], int &lenRcv);//get chip id from hardware
SEETA_API void get_chip_id(unsigned char chip_id[], int &lenRcv);//get chip id from hardware
void write_chip_id_limit_num_to_nvm();//get chip id and limit num, then write to nvm
SEETA_API void write_chip_id_limit_num_to_nvm();//get chip id and limit num, then write to nvm
void read_chip_id_limit_num_from_nvm(unsigned char chip_id_from_nvm[], int &lenRcv);
SEETA_API void read_chip_id_limit_num_from_nvm(unsigned char chip_id_from_nvm[], int &lenRcv);
private:
HMODULE g_hDll; //̬
pConnect ConnectUkey;
......
......@@ -26,26 +26,26 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
......@@ -95,6 +95,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(OutDir)$(TargetName)d.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
......@@ -108,6 +109,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<ImportLibrary>$(OutDir)$(TargetName)d.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
......@@ -125,6 +127,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!