Procházet zdrojové kódy

1、测试用例;
2、完成接口;

Jeff před 5 roky
rodič
revize
fb393849ce

+ 11 - 0
scbc.tools/scbc.tools.sln

@@ -3,6 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual Studio 2008
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scbc.tools", "scbc.tools\scbc.tools.vcproj", "{95CA9F08-85F6-4FD6-A80D-15EEC854B118}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}"
+	ProjectSection(ProjectDependencies) = postProject
+		{95CA9F08-85F6-4FD6-A80D-15EEC854B118} = {95CA9F08-85F6-4FD6-A80D-15EEC854B118}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -16,6 +21,12 @@ Global
 		{95CA9F08-85F6-4FD6-A80D-15EEC854B118}.DebugExe|Win32.Build.0 = DebugExe|Win32
 		{95CA9F08-85F6-4FD6-A80D-15EEC854B118}.Release|Win32.ActiveCfg = Release|Win32
 		{95CA9F08-85F6-4FD6-A80D-15EEC854B118}.Release|Win32.Build.0 = Release|Win32
+		{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}.Debug|Win32.ActiveCfg = Debug|Win32
+		{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}.Debug|Win32.Build.0 = Debug|Win32
+		{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}.DebugExe|Win32.ActiveCfg = Debug|Win32
+		{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}.DebugExe|Win32.Build.0 = Debug|Win32
+		{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}.Release|Win32.ActiveCfg = Release|Win32
+		{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 5 - 5
scbc.tools/scbc.tools/CurlClient.cpp

@@ -33,27 +33,27 @@ static int OnDebug(CURL *, curl_infotype itype, char * pData, size_t size, void
 	if(itype == CURLINFO_TEXT)   
 	{   
 		//TRACE("[TEXT]%s\n", pData); 
-		LOG4C((LOG_WARN, "[TEXT]%s\n", pData));   
+		//LOG4C((LOG_WARN, "[TEXT]%s\n", pData));   
 	}   
 	else if(itype == CURLINFO_HEADER_IN)   
 	{   
 		//TRACE("[HEADER_IN]%s\n", pData); 
-		LOG4C((LOG_WARN, "[HEADER_IN]%s\n", pData));
+		//LOG4C((LOG_WARN, "[HEADER_IN]%s\n", pData));
 	}   
 	else if(itype == CURLINFO_HEADER_OUT)   
 	{   
 		//TRACE("[HEADER_OUT]%s\n", pData);   
-		LOG4C((LOG_WARN, "[HEADER_OUT]%s\n", pData));
+		//LOG4C((LOG_WARN, "[HEADER_OUT]%s\n", pData));
 	}   
 	else if(itype == CURLINFO_DATA_IN)   
 	{   
 		//TRACE("[DATA_IN]%s\n", pData);   
-		LOG4C((LOG_WARN, "[DATA_IN]%s\n", pData));
+		//LOG4C((LOG_WARN, "[DATA_IN]%s\n", pData));
 	}   
 	else if(itype == CURLINFO_DATA_OUT)   
 	{   
 		//TRACE("[DATA_OUT]%s\n", pData);   
-		LOG4C((LOG_WARN, "[DATA_OUT]%s\n", pData));
+		//LOG4C((LOG_WARN, "[DATA_OUT]%s\n", pData));
 	}   
 	return 0;   
 }   

+ 25 - 19
scbc.tools/scbc.tools/DataImpl.cpp

@@ -26,13 +26,14 @@ PRIMARY KEY (bid ASC));"
 // KeyCopy表;
 #define _CREATE_KEYS_TABLE_ \
 	"CREATE TABLE keys \
-(sn  TEXT(32) PRIMARY KEY NOT NULL,\
+(bid  TEXT(16) NOT NULL,\
+sn  TEXT(32) PRIMARY KEY NOT NULL,\
 keys  TEXT NOT NULL,\
 copy_date  DATETIME DEFAULT '',\
 report_date  DATETIME DEFAULT '',\
 copy_status  INTEGER NOT NULL DEFAULT 0,\
 report_status  INTEGER NOT NULL DEFAULT 0);"
-#define _SELECT_KEYS_TABLE_ "SELECT sn, keys, copy_date, report_date, copy_status, report_status FROM keys"
+#define _SELECT_KEYS_TABLE_ "SELECT bid, sn, keys, copy_date, report_date, copy_status, report_status FROM keys"
 
 // Log表;
 #define _CREATE_LOG_TABLE_ \
@@ -248,20 +249,22 @@ INT CDataImpl::QueryKeyInfo(std::string sn, STKeys &data)
 	if ( nRow == 1)
 	{
 #ifndef USE_UTF8
-		data.sn = pazResult[nCol+0];
-		data.keys = pazResult[nCol+1];
-		data.copy_date = pazResult[nCol+2];
-		data.report_date = pazResult[nCol+3];
-		data.copy_status = pazResult[nCol+4];
-		data.report_status = pazResult[nCol+5];
+		data.order = pazResult[nCol+0];
+		data.sn = pazResult[nCol+1];
+		data.keys = pazResult[nCol+2];
+		data.copy_date = pazResult[nCol+3];
+		data.report_date = pazResult[nCol+4];
+		data.copy_status = pazResult[nCol+5];
+		data.report_status = pazResult[nCol+6];
 #else
 		// 由Native for SQLite3插入的数据,都是utf8格式;
-		data.sn = CharEncoding::UTF82ASCII(pazResult[nCol+0]);
-		data.keys = CharEncoding::UTF82ASCII(pazResult[nCol+1]);
-		data.copy_date = CharEncoding::UTF82ASCII(pazResult[nCol+2]);
-		data.report_date = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
-		data.copy_status = pazResult[nCol+4];
-		data.report_status = pazResult[nCol+5];
+		data.order = pazResult[nCol+0];
+		data.sn = CharEncoding::UTF82ASCII(pazResult[nCol+1]);
+		data.keys = CharEncoding::UTF82ASCII(pazResult[nCol+2]);
+		data.copy_date = CharEncoding::UTF82ASCII(pazResult[nCol+3]);
+		data.report_date = CharEncoding::UTF82ASCII(pazResult[nCol+4]);
+		data.copy_status = pazResult[nCol+5];
+		data.report_status = pazResult[nCol+6];
 #endif
 	}
 
@@ -417,7 +420,9 @@ INT CDataImpl::InsertKeyInfo(STKeys &data)
 	if(m_psqlite3 == NULL)
 		return -1;
 
-	std::string strInsert = "INSERT INTO keys(sn, keys) VALUES ('";
+	std::string strInsert = "INSERT INTO keys(bid, sn, keys) VALUES ('";
+	strInsert.append(data.order);
+	strInsert.append("','");
 	strInsert.append(data.sn);
 	strInsert.append("','");
 	strInsert.append(data.keys);
@@ -474,15 +479,16 @@ INT CDataImpl::BatchInsertKeyInfo(std::vector<STKeys> &vtdata)
 	}
 
 	sqlite3_stmt *stmt;
-	const char* sql = "INSERT INTO keys(sn, keys) VALUES (?,?)";
+	const char* sql = "INSERT INTO keys(bid, sn, keys) VALUES (?,?,?)";
 	sqlite3_prepare_v2(m_psqlite3, sql, strlen(sql), &stmt, 0);
 
 	std::vector<STKeys>::iterator it = vtdata.begin();
 	for ( int i = 0; it != vtdata.end(); it++, i++ )
 	{
 		sqlite3_reset(stmt);  
-		sqlite3_bind_text(stmt, 1, it->sn.c_str(), it->sn.size(), SQLITE_STATIC);  
-		sqlite3_bind_text(stmt, 2, it->keys.c_str(), it->keys.size(), SQLITE_STATIC);   
+		sqlite3_bind_text(stmt, 1, it->order.c_str(), it->order.size(), SQLITE_STATIC);  
+		sqlite3_bind_text(stmt, 2, it->sn.c_str(), it->sn.size(), SQLITE_STATIC);  
+		sqlite3_bind_text(stmt, 3, it->keys.c_str(), it->keys.size(), SQLITE_STATIC);   
 		sqlite3_step(stmt);  
 	}
 
@@ -623,7 +629,7 @@ BOOL CDataImpl::UpdateKeyReportStatus(std::string sn, int status)
 	strInsert.append("', report_date=current_timestamp");
 	strInsert.append(" WHERE sn ='");
 	strInsert.append(sn);
-	strInsert.append("';");
+	strInsert.append("' and copy_date <> '';");
 
 	char* psqlite_error = NULL;
 	int sqlite_error = sqlite3_exec(m_psqlite3, strInsert.c_str(), NULL, 0, &psqlite_error);

+ 9 - 7
scbc.tools/scbc.tools/Global.cpp

@@ -44,6 +44,9 @@ namespace Global
 		TCHAR szPath[MAX_PATH] = {0};
 		_stprintf_s(szPath, _T("%scache"), g_szCurModuleDir);
 		MKDIR(szPath);
+
+		_stprintf_s(szPath, _T("%slog"), g_szCurModuleDir);
+		MKDIR(szPath);
 	}
 
 	void MKDIR(LPCTSTR dir) 
@@ -53,8 +56,6 @@ namespace Global
 		int nleft = 0;
 		int nIndex = -1;
 		std::string strdir = dir;
-		strdir = strdir.substr(0, strdir.find_last_of(_T("\\")));
-
 		if (strdir.at(strdir.size() - 1) != _T('\\'))
 			strdir.append(_T("\\"));
 
@@ -70,7 +71,8 @@ namespace Global
 
 			if (nIndex != std::string::npos)
 			{
-				if (_mkdir(strdir.substr(0, nIndex + nleft).c_str()) == -1 && (errno != EEXIST))
+				std::string sub = strdir.substr(0, nIndex + nleft);
+				if (_mkdir(sub.c_str()) == -1 && (errno != EEXIST))
 				{
 					//WriteTextLog(_T("创建目录失败:%s,错误码:%d"), strdir.substr(0, nIndex + nleft).c_str(), errno);
 					break;
@@ -732,14 +734,14 @@ namespace Global
 		lReg = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_QUERY_VALUE, &hKey);
 		if (lReg != ERROR_SUCCESS)
 		{
-			LOG4C((LOG_WARN, "Open Registry Error"));
+			//LOG4C((LOG_WARN, "Open Registry Error"));
 			return FALSE;
 		}
 
 		lReg = RegQueryInfoKeyA(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwValNum, &dwMaxValLen, NULL, NULL, NULL);
 		if (lReg != ERROR_SUCCESS)
 		{
-			LOG4C((LOG_WARN, "Getting Key Info Error"));
+			//LOG4C((LOG_WARN, "Getting Key Info Error"));
 			return FALSE;
 		}
 
@@ -758,14 +760,14 @@ namespace Global
 			lReg = RegEnumValueA(hKey, i, lpValName, &dwValName, NULL, NULL, NULL, NULL);
 			if ((lReg != ERROR_SUCCESS) && (lReg != ERROR_NO_MORE_ITEMS))
 			{
-				LOG4C((LOG_WARN, "Enum  Registry  Error or No More Items"));
+				//LOG4C((LOG_WARN, "Enum  Registry  Error or No More Items"));
 				continue;
 			}
 			lpComNum = (LPSTR)VirtualAlloc(NULL, 6, MEM_COMMIT, PAGE_READWRITE);
 			lReg = RegQueryValueExA(hKey, lpValName, NULL, NULL, (LPBYTE)lpComNum, &dwValSize);
 			if (lReg != ERROR_SUCCESS)
 			{
-				LOG4C((LOG_WARN, "Can not get the name of the port"));
+				//LOG4C((LOG_WARN, "Can not get the name of the port"));
 				continue;
 			}
 

+ 0 - 1
scbc.tools/scbc.tools/Global.h

@@ -8,7 +8,6 @@
 #pragma comment(lib, "version.lib")
 #include "../cJson/cJSON.h"
 #include "tinyxml2.h"
-#include "Log4c.h"
 #include <vector>
 #include <string>
 #include <map>

+ 154 - 8
scbc.tools/scbc.tools/SDK.cpp

@@ -7,7 +7,11 @@
 ThreadSection g_csTask;
 std::list<STMid> CSDK::m_vtMidTask;
 
-CSDK::CSDK(void)
+CSDK::CSDK(void):
+m_hDownloadEvent(NULL),
+m_hThreadDownload(NULL),
+m_hReportEvent(NULL),
+m_hThreadReport(NULL)
 {
 	Global::Init();
 }
@@ -18,27 +22,142 @@ CSDK::~CSDK(void)
 
 int CSDK::QueryMidInfo(std::string order)
 {
-	return 0;
+	if ( order.size() == 0 )
+		return -1;
+
+	CDataImpl db;
+	if ( !db.Open() )
+		return -2;
+
+	STMid mid;
+	int nRow = db.QueryMidInfo(order.c_str(), mid);
+	if ( nRow == -1)
+		return -3;
+
+	if ( nRow == 0 )
+		return 0;
+
+	if ( nRow == 1)
+	{
+		if ( _tcsicmp(mid.status.c_str(), "0") == 0 )
+			return 1;
+		else if ( _tcsicmp(mid.status.c_str(), "1") == 0 )
+			return 2;
+		else if ( _tcsicmp(mid.status.c_str(), "1") == -1 )
+			return 3;
+	}
+
+	return -4;
 }
 
 int CSDK::DownloadMidData(std::string order)
 {
+	if ( m_hThreadDownload == NULL )
+	{
+		m_hDownloadEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+		if ( m_hDownloadEvent == NULL )
+		{
+			return -1;
+		}
+
+		m_hThreadDownload = CreateThread(NULL, 0, ThreadDownload, NULL, 0, NULL);
+		if ( m_hThreadDownload == NULL )
+		{
+			CloseHandle(m_hDownloadEvent);
+			m_hDownloadEvent = NULL;
+			return -1;
+		}
+	}
+
+	STMid host_mid;
+	STMid local_mid;
+	// https请求;
+	/*
+	if ( https:// == false)
+		return -5;
+	*/
+
+	// 判断该订单是否存在;
+	CDataImpl db;
+	if ( !db.Open() )
+		return -2;
+
+	// 查询mid;
+	int nRow = db.QueryMidInfo(order, local_mid);
+	if ( nRow == -1)
+		return -3;
+
+	if ( nRow == 0 )
+	{
+		// 新增mid;
+		db.InsertMidInfo(host_mid);
+	}
+	else if ( nRow == 1 )
+	{
+		// 更新Mid;
+		db.UpdateMidInfo(host_mid);
+	}
+	else if ( nRow > 1 )
+		return -4;
+	
+	// 加入任务中;
+	CSDK::AddDownloadTask(host_mid);
+
 	return 0;
 }
 
-int CSDK::QueryKeyInfo(std::string sn)
+int CSDK::QueryKeyInfo(std::string sn, STKeys &keys)
 {
-	return 0;
+	if ( sn.size() == 0 )
+		return -1;
+
+	CDataImpl db;
+	if ( !db.Open() )
+		return -2;
+
+	int nRow = db.QueryKeyInfo(sn.c_str(), keys);
+	if ( nRow == -1)
+		return -3;
+
+	if ( nRow == 0 )
+		return 0;
+
+	if ( nRow == 1 )
+		return 1;
+
+	return -4;
 }
 
-int CSDK::UpdateKeyCopyStatus(std::string sn)
+int CSDK::UpdateKeyCopyStatus(std::string sn, int status )
 {
-	return 0;
+	if ( sn.size() == 0 )
+		return -1;
+
+	CDataImpl db;
+	if ( !db.Open() )
+		return -2;
+
+	BOOL bRet = FALSE;
+	// 更新抄写成功状态:1,失败-1;
+	bRet = db.UpdateKeyCopyStatus(sn.c_str(), status);	
+	
+	return bRet == TRUE ? 1 : 0;
 }
 
-int CSDK::UpdateKeyReportStatus(std::string sn)
+int CSDK::UpdateKeyReportStatus(std::string sn, int status)
 {
-	return 0;
+	if ( sn.size() == 0 )
+		return -1;
+
+	CDataImpl db;
+	if ( !db.Open() )
+		return -2;
+
+	BOOL bRet = FALSE;
+	// 更新抄写成功状态:1,失败-1;
+	bRet = db.UpdateKeyReportStatus(sn.c_str(), status);
+	
+	return bRet == TRUE ? 1 : 0;
 }
 
 int CSDK::ReportKeyCopyResults(std::string sn /* = "" */)
@@ -132,6 +251,33 @@ end:
 		cJSON_Delete(pJson);
 }
 
+bool CSDK::ParserSNKey(std::string json, SNKeys &snKey)
+{
+	bool bRet = false;
+	// Json数据;
+	cJSON* pJson = cJSON_Parse(json.c_str());
+	if ( pJson )
+	{
+		// 序列号;
+		snKey.did = cJSON_GetObjectItem(pJson, _T("sn")) ? cJSON_GetObjectItem(pJson, _T("sn"))->valuestring : "";
+		snKey.mac = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+		snKey.hdcp = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+		snKey.hdcp22 = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+		snKey.widi = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+		snKey.widevine = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+		snKey.esn = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+		snKey.cikey = cJSON_GetObjectItem(pJson, _T("keys")) ? cJSON_GetObjectItem(pJson, _T("keys"))->valuestring : "";
+
+		bRet = true;
+	}
+
+	if (pJson)
+		cJSON_Delete(pJson);
+
+	return bRet;
+}
+
+
 DWORD CSDK::ThreadDownload(LPVOID lpParam)
 {
 	CSDK *that = (CSDK*)lpParam;

+ 6 - 5
scbc.tools/scbc.tools/SDK.h

@@ -14,17 +14,18 @@ public:
 public:
 	int QueryMidInfo(std::string order);
 	int DownloadMidData(std::string order);
-	int QueryKeyInfo(std::string sn);
-	int UpdateKeyCopyStatus(std::string sn);
-	int UpdateKeyReportStatus(std::string sn);
+	int QueryKeyInfo(std::string sn, STKeys &keys);
+	int UpdateKeyCopyStatus(std::string sn, int status = 1 );
+	int UpdateKeyReportStatus(std::string sn, int status = 1);
 	int ReportKeyCopyResults(std::string sn = "");
 
+	static void ParserKey(std::string file, std::vector<STKeys> &vtKyes);
+	static bool ParserSNKey(std::string json, SNKeys &snKey);
 private:
 	static std::list<STMid> m_vtMidTask;
 	static void AddDownloadTask(STMid &mid);
 	static BOOL PopDownloadTask(STMid &mid);
-	static void ParserKey(std::string file, std::vector<STKeys> &vtKyes);
-	
+
 	HANDLE m_hDownloadEvent;
 	HANDLE m_hThreadDownload;
 	static DWORD WINAPI ThreadDownload(LPVOID lpParam);

+ 15 - 0
scbc.tools/scbc.tools/TableInfo.h

@@ -49,6 +49,7 @@ typedef struct __ST_KEYS__
 {
 	std::string		sn;								// sn;
 	std::string		keys;							// key包Json字符串;
+	std::string		order;							// 订单号;
 	std::string		copy_date;						// 抄写成功时间;
 	std::string		report_date;					// 上报时间;
 	std::string		copy_status;					// 抄写状态:0=未抄写、-1=抄写成失败、1=抄写成功;
@@ -65,4 +66,18 @@ typedef struct __ST_LOG__
 	std::string		report_date;					// 日志上报时间;
 	std::string		report_status;					// 上报状态:0=未上报、1=上报成功、-1=上报失败;
 }STLog, *pSTLog;
+
+// 抄写表;
+typedef struct __SN_KEYS__
+{
+	int				pid;							// project id;
+	std::string		did;							// device id;
+	std::string		mac;							// mac地址;
+	std::string		hdcp;							// ;
+	std::string		hdcp22;							// ;
+	std::string		widi;							// ;
+	std::string		widevine;						// ;
+	std::string		esn;							// neflix esn;
+	std::string		cikey;							// ;
+}SNKeys, *pSNKeys;
 #endif

+ 23 - 28
scbc.tools/scbc.tools/scbc.tools.cpp

@@ -78,6 +78,7 @@ int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
 			for ( int i = 0; it != vtKeys.end(); it++, i++ )
 			{
 				_itoa_s(i, szdata, 10);
+				it->order = "1";
 				it->sn = szdata;
 				it->keys = "{\"did\":\"did\",\"mac\":\"mac\",\"cikey\":\"cikey\",\"hdcp\":\"hdcp\",\"hdcp22\":\"hdcp22\",\"widi\":\"widi\",\"esn\":\"esn\",\"widevine\":\"widevine\"}";
 			}
@@ -155,35 +156,13 @@ int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
 #else
 // È«¾ÖÊý¾Ý¿â¶ÔÏó;
 CDataImpl g_db;
-
+CSDK g_sdk;
 int QueryMidInfo(const char* lpOrder)
 {
 	if ( lpOrder == NULL || lpOrder[0] == '\0' )
 		return -1;
 
-	CDataImpl db;
-	if ( !db.Open() )
-		return -2;
-	
-	STMid mid;
-	int nRow = db.QueryMidInfo(lpOrder, mid);
-	if ( nRow == -1)
-		return -3;
-
-	if ( nRow == 0 )
-		return 0;
-
-	if ( nRow == 1)
-	{
-		if ( _tcsicmp(mid.status.c_str(), "0") == 0 )
-			return 1;
-		else if ( _tcsicmp(mid.status.c_str(), "1") == 0 )
-			return 2;
-		else if ( _tcsicmp(mid.status.c_str(), "1") == -1 )
-			return 3;
-	}
-
-	return -4;
+	return g_sdk.QueryMidInfo(lpOrder);
 }
 
 int DownloadMidData(const char* lpOrder)
@@ -230,19 +209,35 @@ int DownloadMidData(const char* lpOrder)
 	return 0;
 }
 
-int QueryKeyInfo(const char* lpSN, LPTSTR lpKeys, int len)
+int QueryKeyInfo(const char* lpSN, SNKeys &snKeys)
 {
-	return 0;
+	if ( lpSN == NULL || lpSN[0] == '\0' )
+		return -1;
+
+	STKeys keys;
+	int nRet = g_sdk.QueryKeyInfo(lpSN, keys);
+	if ( nRet == 1 )
+	{
+		nRet = CSDK::ParserSNKey(keys.keys, snKeys);
+	}
+
+	return nRet;
 }
 
 int UpdateKeyCopyStatus(const char* lpSN)
 {
-	return 0;
+	if ( lpSN == NULL || lpSN[0] == '\0' )
+		return -1;
+
+	return g_sdk.UpdateKeyCopyStatus(lpSN, 1);
 }
 
 int UpdateKeyReportStatus(const char* lpSN)
 {
-	return 0;
+	if ( lpSN == NULL || lpSN[0] == '\0' )
+		return -1;
+
+	return g_sdk.UpdateKeyReportStatus(lpSN, 1);
 }
 
 int ReportKeyCopyResults(const char* lpSN)

+ 75 - 84
scbc.tools/scbc.tools/scbc.tools.h

@@ -10,92 +10,83 @@
 #define SCBCTOOLS_API __declspec(dllimport)
 #endif
 
-#ifdef  __cplusplus  
-extern "C" {  
-#endif
-	/*
-	函数:查询指定批次MID信息。
-		一般用于DownloadMidData调用后,查询是否下载成功;或者下载前,查询该批次是否已经在下载中;
-	参数:lpOrder 批次号;
-	返回:
-		0=表示该批次未下载过,不存在数据库中;
-		1=表示该批次下载中;
-		2=表示该批次已完成下载;
-		3=表示该批次下载失败;
-		-1=表示lpOrder参数空;
-		-2=表示打开db失败;
-		-3=表示查询批次出错;
-		-4=表示数据异常;
-	*/
-	extern SCBCTOOLS_API int QueryMidInfo(const char* lpOrder);
+#include "TableInfo.h"
+
+/*
+描述:查询指定批次MID信息。
+	一般用于DownloadMidData调用后,查询是否下载成功;或者下载前,查询该批次是否已经在下载中;
+参数:lpOrder 批次号;
+返回:
+	0=表示该批次未下载过,不存在数据库中;
+	1=表示该批次下载中;
+	2=表示该批次已完成下载;
+	3=表示该批次下载失败(再次调用DownloadMidData可断点下载);
+	-1=表示lpOrder参数空;
+	-2=表示打开db失败;
+	-3=表示查询批次出错;
+	-4=表示数据异常;
+*/
+extern SCBCTOOLS_API int QueryMidInfo(const char* lpOrder);
 
-	/*
-	函数:下载指定批次MID数据;(后台线程下载),调用QueryMidInfo查询是否下载完成;
-	参数:lpOrder 批次号;
-	返回:
-		0=表示该批次未下载过,不存在数据库中
-		1=表示该批次下载中;
-		2=表示该批次已完成下载;
-		3=表示该批次下载失败;
-		-1=表示lpOrder参数空;
-		-2=表示打开db失败;
-		-3=表示查询批次出错;
-		-4=表示数据异常;
-	*/
-	extern SCBCTOOLS_API int DownloadMidData(const char* lpOrder);
+/*
+描述:下载指定批次MID数据;(后台线程下载),调用QueryMidInfo查询是否下载完成;
+参数:lpOrder 批次号;
+返回:
+	0=表示该批次不存在云服务器(批次信息未导入)
+	1=表示该批次在云服务器中存在,下载任务后台启动中;
+	2=表示该批次已完成下载;
+	-1=表示lpOrder参数空;
+	-2=表示打开db失败;
+	-3=表示查询批次出错;
+	-4=表示数据异常;
+	-5=表示https网络请求失败;
+*/
+extern SCBCTOOLS_API int DownloadMidData(const char* lpOrder);
 
-	/*
-	函数:查询SN对应的Keys;
-	参数:
-		lpSN 条码;
-		lpKeys 返回的字符串,json数组格式;
-		len lpkeys缓存区长度;
-	返回:
-		0=表示没有该sn,不存在数据库中;
-		1=表示获取sn绑定的keys成功;
-		-1=表示lpSN参数空;
-		-2=表示打开数据库失败;
-		-3=表示查询SN出错;
-		-4=表示数据异常;
-	*/
-	extern SCBCTOOLS_API int QueryKeyInfo(const char* lpSN, LPTSTR lpKeys, int len);
+/*
+描述:查询SN对应的Keys;
+参数:
+	lpSN 条码;
+	lpKeys 返回的字符串,json数组格式;
+	len lpkeys缓存区长度;
+返回:
+	0=表示没有该sn,不存在数据库中;
+	1=表示获取sn绑定的keys成功;
+	-1=表示lpSN参数空;
+	-2=表示打开数据库失败;
+	-3=表示查询SN出错;
+	-4=表示数据异常;
+*/
+extern SCBCTOOLS_API int QueryKeyInfo(const char* lpSN, SNKeys &snKeys);
 
-	/*
-	函数:更新抄写状态;
-	参数:lpSN 条码;
-	返回:
-		0=表示没有该sn,更新抄写状态失败;
-		1=表示更新sn的抄写状态成功;
-		-1=表示lpSN参数空;
-		-2=表示打开数据库失败;
-		-3=表示查询SN出错;
-		-4=表示数据异常;
-	*/
-	extern SCBCTOOLS_API int UpdateKeyCopyStatus(const char* lpSN);
+/*
+描述:更新抄写状态;(在抄写key成功后调用该接口)
+参数:lpSN 条码;
+返回:
+	0=表示更新sn的抄写状态失败;
+	1=表示更新sn的抄写状态成功;
+	-1=表示lpSN参数空;
+	-2=表示打开数据库失败;
+*/
+extern SCBCTOOLS_API int UpdateKeyCopyStatus(const char* lpSN);
 
-	/*
-	函数:更新上报状态;
-	参数:lpSN 条码;
-	返回:
-		0=表示没有该sn,更新上报状态失败;
-		1=表示更新sn的上报状态成功;
-		1=表示该sn并没有抄写成功,无法更新上报状态;;
-		-1=表示lpSN参数空;
-		-2=表示打开数据库失败;
-		-3=表示查询SN出错;
-		-4=表示数据异常;
-	*/
-	extern SCBCTOOLS_API int UpdateKeyReportStatus(const char* lpSN);
+/*
+描述:更新上报状态;(的UpdateKeyCopyStatus成功后调用)
+参数:lpSN 条码;
+返回:
+	0=表示更新sn的上报状态失败;
+	1=表示更新sn的上报状态成功;
+	-1=表示lpSN参数空;
+	-2=表示打开数据库失败;
+*/
+extern SCBCTOOLS_API int UpdateKeyReportStatus(const char* lpSN);
 
-	/*
-	函数:上报抄写结果;
-	参数:lpSN 条码; lpSN = NULL时,上报所有抄写成功且未上报的抄写结果;
-	返回:
-		0=表示上报抄写结果失败
-		1=表示上报抄写结果成功;
-		上报成功后,调用UpdateKeyReportStatus更新上报状态;
-	*/
-	extern SCBCTOOLS_API int ReportKeyCopyResults(const char* lpSN);
-#ifdef  __cplusplus  
-}
-#endif
+/*
+描述:上报抄写结果;
+参数:lpSN 条码; lpSN = NULL时,上报所有抄写成功且未上报的抄写结果;
+返回:
+	0=表示上报抄写结果失败
+	1=表示上报抄写结果成功;
+	上报成功后,需调用UpdateKeyReportStatus更新上报状态;
+*/
+extern SCBCTOOLS_API int ReportKeyCopyResults(const char* lpSN);

+ 6 - 8
scbc.tools/scbc.tools/scbc.tools.vcproj

@@ -62,7 +62,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="crypt32.lib ws2_32.lib winmm.lib wldap32.lib log4C.lib libcurld.lib libeay32.lib ssleay32.lib sqlite3d.lib"
+				AdditionalDependencies="crypt32.lib ws2_32.lib winmm.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib sqlite3d.lib"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\lib"
 				IgnoreDefaultLibraryNames=""
@@ -90,6 +90,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine="copy $(TargetDir)\$(SolutionName).lib $(SolutionDir)\test\$(ProjectName).lib /y/a"
 			/>
 		</Configuration>
 		<Configuration
@@ -120,7 +121,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				EnableIntrinsicFunctions="true"
-				AdditionalIncludeDirectories="..\cJson;..\filehelper;..\Include;..\Log4C;..\MD5"
+				AdditionalIncludeDirectories="..\cJson;..\filehelper;..\Include;..\MD5"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCBCTOOLS_EXPORTS;LOG4C_ENABLE;CURL_STATICLIB"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
@@ -139,7 +140,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="crypt32.lib ws2_32.lib winmm.lib wldap32.lib log4C.lib libcurl.lib libeay32.lib ssleay32.lib sqlite3.lib"
+				AdditionalDependencies="crypt32.lib ws2_32.lib winmm.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib sqlite3.lib"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\lib"
 				GenerateDebugInformation="true"
@@ -168,6 +169,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine="copy $(TargetDir)\$(SolutionName).lib $(SolutionDir)\test\$(ProjectName).lib /y/a&#x0D;&#x0A;copy $(TargetPath) $(SolutionDir)\test\$(TargetFileName) /y/a&#x0D;&#x0A;copy $(SolutionDir)$(SolutionName)\TableInfo.h $(SolutionDir)\test\TableInfo.h /y/a&#x0D;&#x0A;copy $(SolutionDir)$(SolutionName)\$(SolutionName).h $(SolutionDir)\test\$(SolutionName).h  /y/a"
 			/>
 		</Configuration>
 		<Configuration
@@ -216,7 +218,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="crypt32.lib ws2_32.lib winmm.lib wldap32.lib log4C.lib libcurld.lib libeay32.lib sqlite3d.lib ssleay32.lib"
+				AdditionalDependencies="crypt32.lib ws2_32.lib winmm.lib wldap32.lib libcurld.lib libeay32.lib sqlite3d.lib ssleay32.lib"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\lib"
 				GenerateDebugInformation="true"
@@ -304,10 +306,6 @@
 				RelativePath=".\Global.h"
 				>
 			</File>
-			<File
-				RelativePath=".\log4c.h"
-				>
-			</File>
 			<File
 				RelativePath=".\Resource.h"
 				>

+ 0 - 2
scbc.tools/scbc.tools/stdafx.h

@@ -31,8 +31,6 @@
 #include <string>
 #include <list>
 
-// log4c头文件;
-#include "log4c.h"
 // sqlite3头;
 #include "sqlite3.h"
 // TODO: 在此处引用程序需要的其他头文件

+ 40 - 0
scbc.tools/test/ReadMe.txt

@@ -0,0 +1,40 @@
+========================================================================
+    控制台应用程序:test 项目概述
+========================================================================
+
+应用程序向导已为您创建了此 test 应用程序。
+
+本文件概要介绍组成 test 应用程序的
+的每个文件的内容。
+
+
+test.vcproj
+    这是使用应用程序向导生成的 VC++ 项目的主项目文件,
+    其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。
+
+test.cpp
+    这是主应用程序源文件。
+
+/////////////////////////////////////////////////////////////////////////////
+应用程序向导创建了下列资源:
+
+test.rc
+这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。
+此文件可以直接在 Microsoft Visual C++ 中进行编辑。
+
+Resource.h
+    这是标准头文件,可用于定义新的资源 ID。
+    Microsoft Visual C++ 将读取并更新此文件。
+
+/////////////////////////////////////////////////////////////////////////////
+其他标准文件:
+
+StdAfx.h, StdAfx.cpp
+    这些文件用于生成名为 test.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。
+
+/////////////////////////////////////////////////////////////////////////////
+其他注释:
+
+应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。
+
+/////////////////////////////////////////////////////////////////////////////

+ 17 - 0
scbc.tools/test/Resource.h

@@ -0,0 +1,17 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by test.rc
+//
+
+#define IDS_APP_TITLE			103
+
+// жÔÏóµÄÏÂÒ»×éĬÈÏÖµ
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE	101
+#define _APS_NEXT_COMMAND_VALUE		40001
+#define _APS_NEXT_CONTROL_VALUE		1000
+#define _APS_NEXT_SYMED_VALUE		101
+#endif
+#endif

+ 8 - 0
scbc.tools/test/stdafx.cpp

@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// test.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用

+ 33 - 0
scbc.tools/test/stdafx.h

@@ -0,0 +1,33 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#include <stdio.h>
+#include <tchar.h>
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // 某些 CString 构造函数将是显式的
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // 从 Windows 头中排除极少使用的资料
+#endif
+
+#include <afx.h>
+#include <afxwin.h>         // MFC 核心组件和标准组件
+#include <afxext.h>         // MFC 扩展
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC 对 Internet Explorer 4 公共控件的支持
+#endif
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h>                     // MFC 对 Windows 公共控件的支持
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <iostream>
+#include "TableInfo.h"
+#include "scbc.tools.h"
+#pragma comment(lib, "scbc.tools.lib")
+
+// TODO: 在此处引用程序需要的其他头文件

+ 24 - 0
scbc.tools/test/targetver.h

@@ -0,0 +1,24 @@
+#pragma once
+
+// 以下宏定义要求的最低平台。要求的最低平台
+// 是具有运行应用程序所需功能的 Windows、Internet Explorer 等产品的
+// 最早版本。通过在指定版本及更低版本的平台上启用所有可用的功能,宏可以
+// 正常工作。
+
+// 如果必须要针对低于以下指定版本的平台,请修改下列定义。
+// 有关不同平台对应值的最新信息,请参考 MSDN。
+#ifndef WINVER                          // 指定要求的最低平台是 Windows Vista。
+#define WINVER 0x0600           // 将此值更改为相应的值,以适用于 Windows 的其他版本。
+#endif
+
+#ifndef _WIN32_WINNT            // 指定要求的最低平台是 Windows Vista。
+#define _WIN32_WINNT 0x0600     // 将此值更改为相应的值,以适用于 Windows 的其他版本。
+#endif
+
+#ifndef _WIN32_WINDOWS          // 指定要求的最低平台是 Windows 98。
+#define _WIN32_WINDOWS 0x0410 // 将此值更改为适当的值,以适用于 Windows Me 或更高版本。
+#endif
+
+#ifndef _WIN32_IE                       // 指定要求的最低平台是 Internet Explorer 7.0。
+#define _WIN32_IE 0x0700        // 将此值更改为相应的值,以适用于 IE 的其他版本。
+#endif

+ 39 - 0
scbc.tools/test/test.cpp

@@ -0,0 +1,39 @@
+// test.cpp : 定义控制台应用程序的入口点。
+//
+
+#include "stdafx.h"
+#include "test.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// 唯一的应用程序对象
+
+CWinApp theApp;
+
+using namespace std;
+
+int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
+{
+	int nRetCode = 0;
+
+	// 初始化 MFC 并在失败时显示错误
+	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
+	{
+		// TODO: 更改错误代码以符合您的需要
+		_tprintf(_T("错误: MFC 初始化失败\n"));
+		nRetCode = 1;
+	}
+	else
+	{
+		// TODO: 在此处为应用程序的行为编写代码。
+		int nRet = QueryMidInfo("10");
+		printf("查询结果:%d\n", nRet);
+	}
+
+	system("pause");
+
+	return nRetCode;
+}

+ 3 - 0
scbc.tools/test/test.h

@@ -0,0 +1,3 @@
+#pragma once
+
+#include "resource.h"

+ 69 - 0
scbc.tools/test/test.rc

@@ -0,0 +1,69 @@
+//Microsoft Visual C++ 生成的资源脚本。
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// 从 TEXTINCLUDE 2 资源生成。
+//
+#include "afxres.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
+LANGUAGE 4, 2
+#pragma code_page(936)
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// 字符串表
+//
+
+STRINGTABLE
+BEGIN
+   IDS_APP_TITLE       "test"
+END
+
+#endif
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// 从 TEXTINCLUDE 3 资源生成。
+//
+#ifndef _AFXDLL
+#include "l.CHS\\afxres.rc"
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // 不是 APSTUDIO_INVOKED

+ 247 - 0
scbc.tools/test/test.vcproj

@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="test"
+	ProjectGUID="{962E22D9-0EDB-4D96-874D-80FC8C2A2C68}"
+	RootNamespace="test"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\..\bin\$(ProjectName)"
+			IntermediateDirectory="$(OutDir)\$(ProjectName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\..\bin\$(SolutionName)"
+			IntermediateDirectory="$(OutDir)\$(ProjectName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Ô´Îļþ"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\test.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Í·Îļþ"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\Resource.h"
+				>
+			</File>
+			<File
+				RelativePath=".\scbc.tools.h"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath=".\TableInfo.h"
+				>
+			</File>
+			<File
+				RelativePath=".\targetver.h"
+				>
+			</File>
+			<File
+				RelativePath=".\test.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="×ÊÔ´Îļþ"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath=".\test.rc"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>