1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054 |
- #include "StdAfx.h"
- #include "Global.h"
- //#include <tlhelp32.h>
- //#include <afxcoll.h>
- //#include <afxtempl.h>
- //#include <shlwapi.h>
- #include <strsafe.h>
- // GetFileVersion函数使用;
- #include <winver.h>
- #pragma comment(lib,"Version.lib")
- // 加密狗SDK;
- // #include "my32.h"
- // #pragma comment(lib,"my32.lib")
- // 全局变量;
- //////////////////////////////////////////////////////////////////////////
- vector <STBranchInfo> g_vtBranchInfo; // 从branchinfo.dat中获取的分店信息;
- //////////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
- TCHAR g_szModulePath[MAX_PATH] = _T(""); // 软件目录;
- TCHAR g_szModuleFileName[MAX_PATH] = _T(""); // 软件全名称;
- TCHAR g_szConnectString[MAX_PATH] = _T(""); // DB连接串;
- // 服务端主机信息;
- TCHAR g_szHostComputerIP[MAX_PATH] = _T(""); // 服务端主机名称;
- DWORD g_dwNICP = 0; // 多网卡时的网卡索引号;
- DWORD g_dwTCPChatPort = 0; // 服务端主机通信TCP端口;
- DWORD g_dwTCPFilePort = 0; // 服务端主机文件传输端口;
- // 短信服务端主机信息;
- TCHAR g_szSMSServer[MAX_PATH] = _T(""); // 短信服务端主机名称;
- DWORD g_dwTCPSMSPort = 0; // 短信服务端主机通信端口;
- // 数据库信息;
- TCHAR g_szDBSource[MAX_PATH] = _T(""); // 数据库源(服务所在IP或计算机名);
- TCHAR g_szDBSourcePort[MAX_PATH] = _T(""); // 数据库源端口;
- DWORD g_dwDBServerPort = 0; // 数据库源端口;
- TCHAR g_szDBAccount[MAX_PATH] = _T(""); // 数据库登录用户;
- TCHAR g_szDBPassWord[MAX_PATH] = _T(""); // 数据库登录密码;
- TCHAR g_szDBName[MAX_PATH] = _T(""); // 数据库名称;
- // SMScfg.ini中的加密狗类型信息;
- DWORD g_dwEncryType = 0;
- TCHAR g_szEncryS1[50] = _T("");
- // 相片存储目录;
- TCHAR g_szShareHost[MAX_PATH] = _T(""); // 共享主机名;
- TCHAR g_szOriginalFolder[MAX_PATH] = _T(""); // 原片目录;
- TCHAR g_szEarlyRepairFolder[MAX_PATH] = _T(""); // 初修片目录;
- TCHAR g_szFurtherRepairFolder[MAX_PATH] = _T(""); // 精修片目录;
- TCHAR g_szDesignFolder[MAX_PATH] = _T(""); // 设计片目录;
- TCHAR g_szOriginalBkFolder[MAX_PATH] = _T(""); // 原片备份目录;
- TCHAR g_szEarlyRepairBkFolder[MAX_PATH] = _T(""); // 初修片备份目录;
- TCHAR g_szFurtherRepairBkFolder[MAX_PATH] = _T(""); // 精修片备份目录;
- TCHAR g_szDesignBkFolder[MAX_PATH] = _T(""); // 设计片备份目录;
- TCHAR g_szTelRecordingFolder[MAX_PATH] = _T(""); // 电话录音目录;
- TCHAR g_szFullDressImageFolder[MAX_PATH] = _T(""); // 礼服图片目录;
- //////////////////////////////////////////////////////////////////////////
- DWORD g_dwFTPPort = 21;
- //////////////////////////////////////////////////////////////////////////
- // 升级包版本号;
- //WORD g_arrFileVersion[4] = { 0 };
- CHAR g_szKeyPath[MAX_PATH] = {0};
- int g_nVersion = -1;
- BYTE g_byShotVersion[6][10] =
- {
- { 6, 0, 148, 11, 205, 50, 4, 171, 32, 39 }, // 儿童座席版;
- { 6, 0, 4, 29, 24, 247, 189, 95, 83, 76 }, // 婚纱座席版;
- { 6, 0, 4, 187, 103, 10, 59, 169, 240, 220 }, // 儿童企业版;
- { 6, 0, 137, 160, 230, 173, 202, 2, 117, 142 }, // 婚纱企业版;
- { 6, 0, 194, 199, 210, 67, 185, 1, 138, 195 }, // 儿童全能版;
- { 6, 0, 188, 145, 100, 47, 154, 177, 34, 205 }, // 婚纱全能版;
- };
- // endof------------6版本加密狗信息----------------;
- // start---------------加密表达式加密后的数组----------------------;
- BYTE g_byCalExVersion[7][114] =
- {
- // 儿童座席版;
- { 109, 0, 90, 15, 108, 138, 37, 190, 82, 8, 20, 252, 32, 162, 7, 8, 254, 255, 56, 245, 194, 4, 46, 120, 49, 120, 156, 27, 17, 164, 217,
- 79, 167, 146, 197, 69, 55, 117, 197, 149, 42, 217, 151, 195, 254, 145, 187, 197, 232, 188, 114, 223, 40, 229, 151, 245, 116, 177, 141, 94, 134, 14,
- 13, 169, 165, 94, 5, 216, 235, 60, 176, 38, 174, 121, 187, 174, 16, 30, 17, 20, 246, 34, 20, 252, 32, 162, 7, 8, 254, 255, 56, 245, 194,
- 4, 46, 120, 49, 120, 156, 27, 17, 164, 217, 79, 167, 146, 143, 132, 219, 173, 211, 2, 99, 180 },
- // 婚纱座席版;
- { 109, 0, 128, 13, 164, 143, 252, 87, 30, 48, 20, 21, 145, 114, 160, 96, 49, 127, 181, 32, 144, 213, 109, 99, 142, 219, 71, 26, 22, 220, 177,
- 179, 191, 82, 138, 45, 173, 160, 9, 83, 162, 106, 182, 175, 47, 92, 214, 78, 93, 21, 202, 165, 167, 200, 198, 172, 218, 74, 236, 194, 194, 228,
- 40, 27, 95, 60, 160, 173, 66, 185, 178, 7, 159, 220, 58, 71, 140, 19, 20, 37, 66, 84, 20, 21, 145, 114, 160, 96, 49, 127, 181, 32, 144,
- 213, 109, 99, 142, 219, 71, 26, 22, 220, 177, 179, 191, 82, 232, 182, 45, 27, 13, 195, 225, 204 },
- // 儿童企业版;
- { 109, 0, 229, 36, 223, 222, 213, 46, 70, 55, 240, 207, 237, 75, 226, 68, 133, 100, 42, 119, 89, 131, 79, 104, 158, 17, 172, 239, 4, 158, 201,
- 51, 62, 51, 94, 232, 14, 124, 81, 64, 100, 141, 187, 85, 156, 59, 205, 116, 200, 24, 108, 218, 145, 22, 7, 36, 45, 7, 156, 255, 170, 130,
- 165, 140, 99, 216, 120, 72, 171, 196, 27, 49, 138, 199, 137, 246, 214, 247, 121, 114, 215, 199, 240, 207, 237, 75, 226, 68, 133, 100, 42, 119, 89,
- 131, 79, 104, 158, 17, 172, 239, 4, 158, 201, 51, 62, 51, 248, 214, 27, 254, 221, 208, 181, 209 },
- // 婚纱企业版;
- { 109, 0, 94, 220, 40, 182, 30, 120, 56, 193, 78, 101, 1, 144, 68, 206, 192, 52, 67, 9, 243, 20, 9, 195, 153, 15, 22, 217, 243, 79, 177,
- 22, 24, 171, 185, 157, 172, 67, 117, 124, 153, 165, 3, 41, 218, 47, 149, 150, 48, 152, 75, 250, 204, 253, 92, 53, 121, 147, 242, 140, 80, 66,
- 34, 194, 16, 109, 237, 17, 222, 161, 96, 8, 11, 194, 58, 45, 86, 15, 207, 121, 247, 104, 78, 101, 1, 144, 68, 206, 192, 52, 67, 9, 243,
- 20, 9, 195, 153, 15, 22, 217, 243, 79, 177, 22, 24, 171, 122, 243, 190, 146, 77, 222, 208, 129 },
- // 儿童全能版;
- { 109, 0, 26, 222, 0, 239, 199, 199, 188, 225, 180, 168, 178, 208, 21, 79, 62, 90, 51, 31, 88, 128, 180, 105, 53, 137, 230, 254, 244, 50, 195,
- 49, 167, 143, 168, 125, 130, 125, 8, 73, 224, 120, 80, 95, 178, 49, 44, 158, 38, 38, 247, 169, 62, 187, 119, 192, 77, 194, 118, 246, 133, 241,
- 157, 62, 144, 24, 94, 173, 49, 192, 46, 250, 249, 239, 82, 78, 135, 3, 86, 154, 8, 135, 180, 168, 178, 208, 21, 79, 62, 90, 51, 31, 88,
- 128, 180, 105, 53, 137, 230, 254, 244, 50, 195, 49, 167, 143, 241, 214, 38, 180, 198, 3, 158, 165 },
- // 婚纱全能版;
- { 109, 0, 139, 145, 163, 176, 66, 18, 207, 79, 172, 200, 12, 124, 89, 151, 248, 238, 26, 85, 137, 146, 119, 58, 76, 194, 151, 239, 204, 104, 18,
- 166, 208, 54, 37, 85, 3, 174, 28, 74, 154, 156, 120, 194, 8, 112, 79, 42, 27, 89, 81, 95, 238, 74, 59, 199, 160, 101, 117, 179, 51, 138,
- 70, 176, 239, 182, 160, 212, 11, 33, 224, 74, 155, 143, 216, 10, 220, 71, 8, 168, 18, 175, 172, 200, 12, 124, 89, 151, 248, 238, 26, 85, 137,
- 146, 119, 58, 76, 194, 151, 239, 204, 104, 18, 166, 208, 54, 114, 118, 181, 24, 252, 41, 246, 88 },
- };
- // endof---------------加密表达式加密后的数组----------------------;
- //////////////////////////////////////////////////////////////////////////
- // 删除文件或者文件夹;
- // DeleteFile("d:\\PID\0\0"); //删除一个文件夹;
- // DeleteFile("d:\\PID.dsp\0d:\\PID.dsw\0\0"); //删除多个文件;
- BOOL DeleteFolder(LPCTSTR lpszPath) // 只能删除本地目录,共享路径无法删除;
- {
- SHFILEOPSTRUCT FileOp;
- ZeroMemory((void*)&FileOp,sizeof(SHFILEOPSTRUCT));
- // fFlags:
- // FOF_ALLOWUNDO 允许放回回收站;
- // FOF_NOCONFIRMATION; 不出现确认对话框
- FileOp.fFlags = FOF_NOCONFIRMATION;
- FileOp.hNameMappings = NULL;
- FileOp.hwnd = NULL;
- //FileOp.hwnd = GetActiveWindow();
- FileOp.lpszProgressTitle = NULL;
- FileOp.pFrom = lpszPath;
- FileOp.pTo = NULL; // 一定要是NULL;
- FileOp.wFunc = FO_DELETE; // 删除操作;
- return SHFileOperation(&FileOp) == 0;
- }
- void GetPathFromNetShareName(LPTSTR lpShareDir, LPTSTR lpRet)
- {
- PSHARE_INFO_502 BufPtr = NULL;
- NET_API_STATUS res;
- #ifndef UNICODE
- TCHAR szPathName[255];
- WCHAR wszShareName[255];
- MultiByteToWideChar(CP_ACP, 0, lpShareDir, -1, wszShareName, 255);
- if (res = NetShareGetInfo(NULL, wszShareName, 502, (LPBYTE *)&BufPtr) == ERROR_SUCCESS)
- {
- _stprintf_s(szPathName, _T("%s"), BufPtr->shi502_path);
- }
- #else
- if ( (res = NetShareGetInfo(NULL, lpShareDir, 502, (LPBYTE *)&BufPtr)) == ERROR_SUCCESS)
- {
- _stprintf_s(lpRet, wcslen(BufPtr->shi502_path)+1, _T("%s"), BufPtr->shi502_path);
- }
- #endif
- // 释放缓冲;
- NetApiBufferFree(BufPtr);
- }
- //复制文件或文件夹;
- /*
- CopyFile("d:\0\0","D:\\MyProjects\\临时程序\0\0"); //把"临时程序"文件夹放到d盘下面
- CopyFile("d:\0\0","D:\\MyProjects\\临时程序\\PID.dsp\0D:\\MyProjects\\临时程序\\PID.dsw\0"); //把PID.dsp和PID.dsw俩个文件放到d盘下面
- 注意:,如果你想把"D:\\MyProjects\\临时程序\0\0"的文件夹复制到D盘下,并从命名为NewName,应该这样
- CopyFile("d:\\NewName\0\0","D:\\MyProjects\\临时程序\\*.*\0\0"); //把"临时程序"文件夹复制到d盘下并从命名为"NewName"
- */
- BOOL CopyFolder(LPCTSTR lpszFromPath,LPCTSTR lpszToPath)
- {
- SHFILEOPSTRUCT FileOp;
- ZeroMemory((void*)&FileOp,sizeof(SHFILEOPSTRUCT));
- FileOp.fFlags = FOF_NOCONFIRMATION ;
- FileOp.hNameMappings = NULL;
- FileOp.hwnd = NULL;
- FileOp.lpszProgressTitle = NULL;
- FileOp.pFrom = lpszFromPath;
- FileOp.pTo = lpszToPath;
- FileOp.wFunc = FO_COPY;
- return SHFileOperation(&FileOp) == 0;
- }
- BOOL IsValidDate(LPCTSTR lpDate)
- {
- if(lpDate == NULL || _tcscmp(lpDate,_T("")) == 0)
- return FALSE;
- CString strDate = lpDate;
- if (strDate.IsEmpty()) return FALSE;
- // 判断日期合法性;
- static int nYear = 0;
- static int nMonth = 0;
- static int nDay = 0;
- nYear = nMonth = nDay = 0;
- nYear = _ttoi(strDate.Left(4));
- nMonth = _ttoi(strDate.Mid(5, 2));
- nDay = _ttoi(strDate.Mid(8, 2));
- CONST static INT nNormalMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
- CONST static INT nLeapMonth[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
- if ((nDay <= 0) || (nDay > 31) || (nMonth <= 0) || (nMonth > 12)) return FALSE;
- if ((nYear % 400 == 0) || (nYear % 4 == 0 && nYear % 100 != 0))
- {
- if (nDay > nLeapMonth[nMonth - 1]) return FALSE;
- }
- else
- {
- if (nDay > nNormalMonth[nMonth - 1]) return FALSE;
- }
- return TRUE;
- }
- //************************************//
- // 数据库地址;
- // 数据库端口;
- // 数据库管理员账号;
- // 数据库管理员密码;
- // 数据库名称;
- //
- // [函数]:GetIniInfo
- // [描述]:获取指定ini信息;
- // [参数]:
- // szPath:ini所在目录;
- // szIniName:ini名;
- // [返回]:void
- //************************************//
- int GetSysIniInfo(const TCHAR *szPath, const TCHAR *szIniName)
- {
- TCHAR szDrive[_MAX_DRIVE] = { 0 };
- TCHAR szDir[_MAX_DIR] = { 0 };
- TCHAR szFna[_MAX_DIR] = { 0 };
- TCHAR szExt[_MAX_DIR] = { 0 };
- ::GetModuleFileName(NULL, g_szModuleFileName, sizeof(g_szModuleFileName) / sizeof(TCHAR));
- _stprintf_s(g_szModulePath, _T("%s"), g_szModuleFileName);
- _tsplitpath_s(g_szModulePath, szDrive, szDir, szFna, szExt);
- _tcscpy_s(g_szModulePath, szDrive);
- _tcscat_s(g_szModulePath, szDir);
- // -----------------------------------------------------//
- TCHAR szFile[MAX_PATH + 1] = _T("");
- if (szPath != NULL && szIniName != NULL)
- _stprintf_s(szFile, _T("%s\\%s"), szPath, szIniName);
- else
- _stprintf_s(szFile, _T("%s\\ServiceInfo.ini"), g_szModulePath);
- TRACE("szFile =%s\n", szFile);
- HANDLE hFile = CreateFile(szFile, 0/*GENERIC_READ*/, 0, NULL, OPEN_EXISTING, 0, NULL);
- if (ERROR_FILE_NOT_FOUND == GetLastError())
- {
- // 如果没找到,使用默认连接;
- _tcscpy_s(g_szHostComputerIP, _T("."));
- g_dwTCPChatPort = 5678;
- return -1;
- }
- // 获取数据库信息;
- GetPrivateProfileString(_T("DatabaseInfo"), _T("dbSource"), _T(""), g_szDBSource, MAX_PATH, szFile);
- g_dwDBServerPort = GetPrivateProfileInt(_T("DatabaseInfo"), _T("dbServerPort"), 0, szFile);
- GetPrivateProfileString(_T("DatabaseInfo"), _T("dbAccount"), _T(""), g_szDBAccount, MAX_PATH, szFile);
- GetPrivateProfileString(_T("DatabaseInfo"), _T("dbPassWord"), _T(""), g_szDBPassWord, MAX_PATH, szFile);
- GetPrivateProfileString(_T("DatabaseInfo"), _T("dbName"), _T(""), g_szDBName, MAX_PATH, szFile);
- if (g_dwDBServerPort != 0)
- _stprintf_s(g_szConnectString, _T("driver={SQL Server};Server=%s,%d;database=%s;uid=%s;pwd=%s"),
- g_szDBSource, g_dwDBServerPort, g_szDBName, g_szDBAccount, g_szDBPassWord);
- else
- _stprintf_s(g_szConnectString, _T("driver={SQL Server};Server=%s;database=%s;uid=%s;pwd=%s"),
- g_szDBSource, g_szDBName, g_szDBAccount, g_szDBPassWord);
- // 获取服务器信息;
- GetPrivateProfileString(_T("NetWorkInfo"), _T("ServerName"), _T(""), g_szHostComputerIP, MAX_PATH, szFile);
- g_dwTCPChatPort = GetPrivateProfileInt(_T("NetWorkInfo"), _T("TCPChatPort"), 0, szFile);
- g_dwTCPFilePort = GetPrivateProfileInt(_T("NetWorkInfo"), _T("TCPFilePort"), 0, szFile);
- // 获取利亚方舟服务器信息;
- GetPrivateProfileString(_T("NetWorkInfo"), _T("SMSServerName"), _T(""), g_szSMSServer, MAX_PATH, szFile);
- g_dwTCPSMSPort = GetPrivateProfileInt(_T("NetWorkInfo"), _T("TCPSMSPort"), 0, szFile);
- return 0;
- }
- // Jeff.注册控件函数;2014.09.11
- //----------------------------------------------------------
- // 函数:RegisterOcx
- // 描述:注册指定的组件文件;
- // 参数:ocxfile指定要注册的组件文件名;
- // 返回:TRUE表示注册成功;
- //----------------------------------------------------------
- BOOL RegisterOcx(LPCTSTR ocxfile)
- {
- HKEY hKey;
- bool bRet;
- USES_CONVERSION;
- ITypeLib* pTypeLib;
- CString CLSIDStr;
- CLSID clsid;
- LPOLESTR wRes = NULL;
- #ifdef UNICODE
- if (LoadTypeLib(ocxfile, &pTypeLib) == S_OK)
- #else
- if (LoadTypeLib(T2OLE(ocxfile), &pTypeLib) == S_OK)
- #endif
- {
- TLIBATTR tlibAttr, *ptlibAttr;
- ptlibAttr = &tlibAttr;
- pTypeLib->GetLibAttr(&ptlibAttr);
- clsid = ptlibAttr->guid;
- pTypeLib->Release();
- }
- ::StringFromCLSID(clsid, &wRes);
- CLSIDStr = OLE2CT(wRes);
- if ((RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("CLSID\\") + CLSIDStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS) || (RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("Wow6432Node\\TypeLib\\") + CLSIDStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS))
- {
- return true;
- }
- else
- {
- HINSTANCE hLib = LoadLibrary(ocxfile);
- if (hLib < (HINSTANCE)HINSTANCE_ERROR)
- {
- MessageBox(0, _T("权限不足,不能载入OCX文件!无法注册控件!"), _T("结果"), MB_OK);
- bRet = false;
- }
- else
- {
- FARPROC lpDllEntryPoint;
- lpDllEntryPoint = GetProcAddress(hLib, "DllRegisterServer");
- if (lpDllEntryPoint != NULL)
- {
- if (FAILED((*lpDllEntryPoint)()))
- {
- MessageBox(0, _T("调用注册函数(DllRegisterServer)失败!无法注册控件!"), _T("结果"), MB_OK);
- bRet = false;
- }
- else
- bRet = true;
- }
- else
- {
- MessageBox(0, _T("调用注册函数(DllRegisterServer)失败!无法注册控件!"), _T("结果"), MB_OK);
- bRet = false;
- }
- }
- FreeLibrary(hLib);
- return bRet;
- }
- }
- // Jeff.Hacker. WINDOWS NT 以上的内核需要提权,才能对系统进行高级管理;
- //----------------------------------------------------------
- // 函数:GetDebugPriv
- // 描述:对程序提权;
- // 参数:
- // 返回:TRUE表示程序提权成功;
- //----------------------------------------------------------
- BOOL GetDebugPriv()
- {
- // 返回的访问令牌指针;
- HANDLE hToken;
- // 接收所返回的制定特权名称的信息;
- LUID sedebugnameValue;
- // 新特权信息的指针(结构体);
- TOKEN_PRIVILEGES tkp;
- DWORD dwCurProcId = GetCurrentProcessId();
- // 要修改访问权限的进程句柄;
- HANDLE hCurProc;
- hCurProc = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwCurProcId);
- if (!::OpenProcessToken(hCurProc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
- {
- ShowSystemErrorInfo(CString("提权OpenProcessToken失败。"), GetLastError());
- return FALSE;
- }
- if (!::LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &sedebugnameValue))
- {
- ShowSystemErrorInfo(CString("提权LookupPrivilegeValue失败。"), GetLastError());
- CloseHandle(hToken);
- return FALSE;
- }
- tkp.PrivilegeCount = 1;
- tkp.Privileges[0].Luid = sedebugnameValue;
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- if (!::AdjustTokenPrivileges(hToken, FALSE, &tkp, sizeof tkp, NULL, NULL))
- {
- ShowSystemErrorInfo(CString("提权AdjustTokenPrivileges失败。"), GetLastError());
- CloseHandle(hToken);
- return FALSE;
- }
- CloseHandle(hCurProc);
- CloseHandle(hToken);
- return TRUE;
- }
- //----------------------------------------------------------
- // 函数:GetFileVersion
- // 描述:获取指定模块的文件版本信息
- // 参数:
- // hModule: 指定的模块(如果为NULL,表示获取自身文件版本信息);
- // pBuffer: 返回的文件版本信息;
- //
- // 返回:TRUE表示获取模块文件版本信息成功;
- //----------------------------------------------------------
- bool GetFileVersion(HMODULE hModule, WORD *pBuffer)
- {
- TCHAR fname[MAX_PATH];
- VS_FIXEDFILEINFO *pVi;
- DWORD dwHandle;
- std::string str;
- if (::GetModuleFileName(hModule, fname, MAX_PATH))
- {
- int size = GetFileVersionInfoSize(fname, &dwHandle);
- if (size > 0)
- {
- BYTE *buffer = new BYTE[size];
- memset(buffer, 0, size);
- if (GetFileVersionInfo(fname, dwHandle, size, buffer))
- {
- if (VerQueryValue(buffer, _T("\\"), (LPVOID *)&pVi, (PUINT)&size))
- {
- pBuffer[0] = HIWORD(pVi->dwFileVersionMS);
- pBuffer[1] = LOWORD(pVi->dwFileVersionMS);
- pBuffer[2] = HIWORD(pVi->dwFileVersionLS);
- pBuffer[3] = LOWORD(pVi->dwFileVersionLS);
- delete buffer;
- return true;
- }
- }
- delete buffer;
- }
- }
- return false;
- }
- //---------------------------------------------------------------------
- // Jeff add 2014.06.23;
- // 函数:ShowErrorInfo
- // 描述:
- // 参数:
- // lpszFunction:函数名;
- // dwError:错误码;
- // 返回:
- //---------------------------------------------------------------------
- void ShowSystemErrorInfo(CString &strDescription, const DWORD &dwError)
- {
- LPVOID lpMsgBuf;
- BOOL fOk = FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- dwError,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR)&lpMsgBuf,
- 0, NULL);
- if (!fOk)
- {
- // Is it a network-related error?
- HMODULE hDll = LoadLibraryEx(TEXT("netmsg.dll"), NULL, DONT_RESOLVE_DLL_REFERENCES);
- if (hDll != NULL)
- {
- FormatMessage(
- FORMAT_MESSAGE_FROM_HMODULE |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- hDll,
- dwError,
- MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
- (LPTSTR)&lpMsgBuf,
- 0,
- NULL);
- FreeLibrary(hDll);
- }
- }
- if (lpMsgBuf != NULL)
- {
- CString strDisplay;
- strDisplay.Format(_T("%s.错误码=%d,Windows描述:%s"), strDescription, dwError, (PCTSTR)LocalLock(lpMsgBuf));
- //WriteLogin(strDisplay);
- AfxMessageBox(strDisplay);
- LocalFree(lpMsgBuf);
- }
- else
- {
- //WriteLogin(strDescription);
- AfxMessageBox(_T("未知道错误"));
- }
- }
- CString GetLastErrorInfo(CONST DWORD &dwError)
- {
- LPVOID lpMsgBuf;
- BOOL fOk = FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- dwError,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR)&lpMsgBuf,
- 0, NULL);
- if (!fOk)
- {
- // Is it a network-related error?
- HMODULE hDll = LoadLibraryEx(TEXT("netmsg.dll"), NULL, DONT_RESOLVE_DLL_REFERENCES);
- if (hDll != NULL)
- {
- FormatMessage(
- FORMAT_MESSAGE_FROM_HMODULE |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- hDll,
- dwError,
- MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
- (LPTSTR)&lpMsgBuf,
- 0,
- NULL);
- FreeLibrary(hDll);
- }
- }
- CString strErrorInfo = _T("");
- if (lpMsgBuf != NULL)
- {
- strErrorInfo.Format(_T("错误码=%d,Windows描述:%s"), dwError, (PCTSTR)LocalLock(lpMsgBuf));
- LocalFree(lpMsgBuf);
- }
- else
- {
- strErrorInfo = _T("未知道错误");
- }
- return strErrorInfo;
- }
- CString FilterFileName(LPCTSTR lpFileName)
- {
- CString &strFileName = (CString)lpFileName;
- strFileName.Remove(_T('/'));
- strFileName.Remove(_T('\\'));
- strFileName.Remove(_T(':'));
- strFileName.Remove(_T('*'));
- strFileName.Remove(_T('?'));
- strFileName.Remove(_T('\"'));
- strFileName.Remove(_T('<'));
- strFileName.Remove(_T('>'));
- strFileName.Remove(_T('|'));
- return strFileName;
- }
- void InitSharePathInfo()
- {
- // 1.获取本机计算机名;
- DWORD dwLeng = 0;
- GetComputerName(NULL,&dwLeng);
- GetComputerName(g_szShareHost,&dwLeng);
- // 2.本机共享目录;
- _stprintf_s(g_szOriginalFolder,_T("\\\\%s\\%s"),g_szShareHost,ORIGINAL);
- _stprintf_s(g_szEarlyRepairFolder,_T("\\\\%s\\%s"),g_szShareHost,EARLY);
- _stprintf_s(g_szFurtherRepairFolder,_T("\\\\%s\\%s"),g_szShareHost,FUTHER);
- _stprintf_s(g_szDesignFolder,_T("\\\\%s\\%s"),g_szShareHost,DESIGN);
- #if 1
- // 3.读取branchinfo.dat文件信息;
- CArray<CStringArray, CStringArray> AryBranchInfo;
- CFile fbranchInfo;
- CString path = _T(".\\branchinfo.dat");
- if (PathFileExists(path) == 0)
- {
- return;
- }
- fbranchInfo.Open(path, CFile::modeRead);
- DWORD leng = fbranchInfo.GetLength();
- if (leng < sizeof(DWORD) * 2)
- {
- fbranchInfo.Close(); return;
- }
- DWORD flag;
- fbranchInfo.Seek(-(LONG)sizeof(DWORD), CFile::end);
- fbranchInfo.Read(&flag, sizeof(DWORD));
- if (flag != 889900)
- {
- fbranchInfo.Close(); return;
- }
- fbranchInfo.SeekToBegin();
- DWORD arraysize;
- fbranchInfo.Read(&arraysize, sizeof(DWORD));
- if (arraysize > 20)
- {
- fbranchInfo.Close();
- return;
- }
- BYTE *pData = new BYTE[leng - sizeof(DWORD)];
- fbranchInfo.Read(pData, leng - sizeof(DWORD));
- fbranchInfo.Close();
- CMemFile memfile;
- memfile.Attach(pData, leng - sizeof(DWORD));
- CArchive ar(&memfile, CArchive::load);
- AryBranchInfo.SetSize(arraysize, 1);
- for (int i = 0; i < AryBranchInfo.GetSize(); i++)
- {
- AryBranchInfo.ElementAt(i).Serialize(ar);
- }
- ar.Close();
- memfile.Detach();
- delete[]pData;
- // 4.存储为全局变量;
- for ( int i = 0; i < AryBranchInfo.GetSize(); i++)
- {
- CStringArray &strAry = AryBranchInfo.ElementAt(i);
-
- BOOL bExist = FALSE;
- vector<STBranchInfo>::iterator it;
- for ( it = g_vtBranchInfo.begin(); it != g_vtBranchInfo.end(); it++)
- {
- if (strAry.ElementAt(i).Compare(it->szBranchDoMain) == 0)
- {
- bExist = TRUE;
- break;
- }
- }
- if ( !bExist )
- {
- STBranchInfo tagBranchInfo;
- _stprintf_s(tagBranchInfo.szBranchDoMain,_T("%s"),strAry.ElementAt(0));
- _stprintf_s(tagBranchInfo.szBranchName,_T("%s"),strAry.ElementAt(1));
- _stprintf_s(tagBranchInfo.szBranchIP,_T("%s"),strAry.ElementAt(2));
- g_vtBranchInfo.push_back(tagBranchInfo);
- }
- }
- #endif
- }
- int FindPortEx(int start, BYTE *InByte, int InLen, char *OutPath)
- {
- int n;
- int ret;
- int D[8];
- double F[8];
- char s0[50] = "", s1[50] = "", s2[50] = "", s3[50] = "", s4[50] = "", s5[50] = "", s6[50] = "", s7[50] = "";
- CHAR KeyPath[MAX_PATH] = "";
- //查找系统上所有的锁;
- for (n = 0; n < 256; n++)
- {
- ZeroMemory(KeyPath, sizeof(KeyPath));
- ret = 0;//FindPort(n, KeyPath);
- if (ret != 0 && n == 0)return -1053;//表示系统上没有任何智能锁;
- if (ret != 0)return ret;
- #if 1
- sprintf_s(g_szKeyPath,"%s",KeyPath);
- #endif
- //使用该设备路径锁进行运算;
- // ret = CalEx(InByte, InLen, &D[0], &D[1], &D[2], &D[3], &D[4], &D[5], &D[6], &D[7],
- // &F[0], &F[1], &F[2], &F[3], &F[4], &F[5], &F[6], &F[7],
- // s0, s1, s2, s3, s4, s5, s6, s7, KeyPath, 20000);
- //如果正确,则返回该设备路径供以后使用;
- if (ret == -63)return ret;
- if ((ret == 0) && (D[0] == 123))return 0;
- }
- return -53;
- }
- int GetSoftWareVersion()
- {
- int nRet = 0;
- CHAR szUSBKeyPath[MAX_PATH] = "";
- for (int i(0); i < 6; i++)
- {
- nRet = FindPortEx(0, g_byShotVersion[i], 10, szUSBKeyPath);
- if (nRet == 0)
- {
- g_nVersion = i;
- break;
- }
- else
- {
- TCHAR szErrInfo[MAX_PATH] = _T("");
- GetUSBKey32ErrInfo(nRet,szErrInfo,MAX_PATH);
- }
- }
- if (nRet == 0 )
- {
- // 再获取本机加密狗的s1位置字符串;
- INT nUnit[8] = {0};
- double fUnit[8] = {0.0};
- char cUnit[8][50] = {""};
- // nRet = CalEx(g_byCalExVersion[g_nVersion],114,
- // &nUnit[0],&nUnit[1],&nUnit[2],&nUnit[3],&nUnit[4],&nUnit[5],&nUnit[6],&nUnit[7],
- // &fUnit[0],&fUnit[1],&fUnit[2],&fUnit[3],&fUnit[4],&fUnit[5],&fUnit[6],&fUnit[7],
- // cUnit[0],cUnit[1],cUnit[2],cUnit[3],cUnit[4],cUnit[5],cUnit[6],cUnit[7],
- // g_szKeyPath,200);
- if ( nRet == 0 || nRet == -43)
- {
- #if _DEBUG
- TRACE("加密狗S1:");
- TRACE(cUnit[1]);;
- TRACE("\n");
- #endif
- //LOG4C_NO_FILENUM((LOG_NOTICE,"本店域名:%s",cUnit[1]));
- USES_CONVERSION;
- _stprintf_s(g_szEncryS1,_T("%s"),A2W(cUnit[1]));
- }
- }
-
- return g_nVersion;
- }
- //------------------------------------------------------------------------------
- // Remark by Jeff 2014.11.05
- // 函数:GetUSBKey32ErrInfo
- // 描述:返回加密狗错误;
- // 参数:
- // lError:域天加密狗函数返回的错误码;
- // ErrorInfo:错误码描述缓冲区;
- // nErrorLen:错误码描述缓冲区大小;
- // 返回:无
- //
- //------------------------------------------------------------------------------
- void GetUSBKey32ErrInfo(IN const long lError, OUT TCHAR *ErrInfo, IN const INT_PTR &nErrorLen)
- {
- switch (lError)
- {
- case -1:
- StringCchCat(ErrInfo,nErrorLen, _T("未找到返回结果变量"));
- break;
- case -2:
- StringCchCat(ErrInfo,nErrorLen, _T("未找到 = 符号"));
- break;
- case -3:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有找到相应常数"));
- break;
- case -5:
- StringCchCat(ErrInfo,nErrorLen, _T("代表找不到字符串的第一个双引号"));
- break;
- case -6:
- StringCchCat(ErrInfo,nErrorLen, _T("代表找不到字符串的第二个双引号"));
- break;
- case -7:
- StringCchCat(ErrInfo,nErrorLen, _T("IF语句没有找到goto字符"));
- break;
- case -8:
- StringCchCat(ErrInfo,nErrorLen, _T("IF语句没有找到第一个比较字符"));
- break;
- case -9:
- StringCchCat(ErrInfo,nErrorLen, _T("IF语句没有找到比较符号"));
- break;
- case -10:
- StringCchCat(ErrInfo,nErrorLen, _T("两边变量类型不相符"));
- break;
- case -11:
- StringCchCat(ErrInfo,nErrorLen, _T("没有找到NOT符号"));
- break;
- case -12:
- StringCchCat(ErrInfo,nErrorLen, _T("不是整形变量"));
- break;
- case -13:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有找到相应整形常数"));
- break;
- case -14:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有找到相应字符串常数"));
- break;
- case -15:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有找到相应浮点常数"));
- break;
- case -16:
- StringCchCat(ErrInfo,nErrorLen, _T("代表不支持这个运算"));
- break;
- case -17:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有左边括号"));
- break;
- case -18:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有变量"));
- break;
- case -19:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没“,”"));
- break;
- case -20:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没有右边括号"));
- break;
- case -21:
- StringCchCat(ErrInfo,nErrorLen, _T("代表常数超过指这定的范围"));
- break;
- case -22:
- StringCchCat(ErrInfo,nErrorLen, _T("代表储存器的地址超过指定的范围,整数不能超过EEPROM_LEN-4,浮点不能超过30720-8"));
- break;
- case -23:
- StringCchCat(ErrInfo,nErrorLen, _T("代表储存器的地址超过指定的范围,字符串不能超过EEPROM_LEN-LEN,其中LEN为字符串的长度"));
- break;
- case -24:
- StringCchCat(ErrInfo,nErrorLen, _T("除法中,被除数不能为0"));
- break;
- case -25:
- StringCchCat(ErrInfo,nErrorLen, _T("未知错误"));
- break;
- case -26:
- StringCchCat(ErrInfo,nErrorLen, _T("第二个变量不在指定的位置"));
- break;
- case -27:
- StringCchCat(ErrInfo,nErrorLen, _T("字符串常量超过指定的长度"));
- break;
- case -28:
- StringCchCat(ErrInfo,nErrorLen, _T("不是字符串变量"));
- break;
- case -29:
- StringCchCat(ErrInfo,nErrorLen, _T("没有第三个变量"));
- break;
- case -30:
- StringCchCat(ErrInfo,nErrorLen, _T("GOTO的标识语句不能全为数字"));
- break;
- case -31:
- StringCchCat(ErrInfo,nErrorLen, _T("不能打开ENC文件"));
- break;
- case -32:
- StringCchCat(ErrInfo,nErrorLen, _T("不能读ENC文件"));
- break;
- case -33:
- StringCchCat(ErrInfo,nErrorLen, _T("GOTO CALL不能找到指定的跳转位置"));
- break;
- case -34:
- StringCchCat(ErrInfo,nErrorLen, _T("智能卡运算中,未知数据类型"));
- break;
- case -35:
- StringCchCat(ErrInfo,nErrorLen, _T("智能卡运算中,未知代码类型"));
- break;
- case -36:
- StringCchCat(ErrInfo,nErrorLen, _T("字符串长度超出50"));
- break;
- case -37:
- StringCchCat(ErrInfo,nErrorLen, _T("操作时超长,负长"));
- break;
- case -38:
- StringCchCat(ErrInfo,nErrorLen, _T("标识重复"));
- break;
- case -39:
- StringCchCat(ErrInfo,nErrorLen, _T("程序堆栈溢出"));
- break;
- case -40:
- StringCchCat(ErrInfo,nErrorLen, _T("堆栈溢出"));
- break;
- case -41:
- StringCchCat(ErrInfo,nErrorLen, _T("不能建立编译文件,请查看文件是否有只读属性,或被其它文件打开"));
- break;
- case -42:
- StringCchCat(ErrInfo,nErrorLen, _T("不能写文件,请查看文件是否有只读属性,或被其它文件打开"));
- break;
- case -43:
- StringCchCat(ErrInfo,nErrorLen, _T("程序被中途使用END语句结束"));
- break;
- case -44:
- StringCchCat(ErrInfo,nErrorLen, _T("程序跳转到外部的空间"));
- break;
- case -45:
- StringCchCat(ErrInfo,nErrorLen, _T("传送数据失败"));
- break;
- case -46:
- StringCchCat(ErrInfo,nErrorLen, _T("程序超出运算次数,可能是死循环"));
- break;
- case -47:
- StringCchCat(ErrInfo,nErrorLen, _T("写密码不正确"));
- break;
- case -48:
- StringCchCat(ErrInfo,nErrorLen, _T("读密码不正确"));
- break;
- case -49:
- StringCchCat(ErrInfo,nErrorLen, _T("读写EEPROM时,地址溢出"));
- break;
- case -50:
- StringCchCat(ErrInfo,nErrorLen, _T("USB操作失败,可能是没有找到相关的指令"));
- break;
- case -51:
- StringCchCat(ErrInfo,nErrorLen, _T("打开USB文件句柄失败"));
- break;
- case -52:
- StringCchCat(ErrInfo,nErrorLen, _T("使用加密锁加密自定义表达式,生成加密代码时生产错误"));
- break;
- case -53:
- StringCchCat(ErrInfo,nErrorLen, _T("无法打开usb设备,可能驱动程序没有安装或没有插入加密锁."));
- break;
- case -63:
- StringCchCat(ErrInfo,nErrorLen, _T("不能打开指定的文件"));
- break;
- case -64:
- StringCchCat(ErrInfo,nErrorLen, _T("不能建立指定的文件"));
- break;
- case -65:
- StringCchCat(ErrInfo,nErrorLen, _T(" 验证码错误,可能是输入解密密钥错误,或注册授权码错误"));
- break;
- case -66:
- StringCchCat(ErrInfo,nErrorLen, _T("执行TIMEOUT函数时,输入的ID与锁ID不相符"));
- break;
- case -67:
- StringCchCat(ErrInfo,nErrorLen, _T("执行TIMEOUT函数时,智能卡运行函数已到期"));
- break;
- case -68:
- StringCchCat(ErrInfo,nErrorLen, _T("操作浮点运算时,输入的参数将会导致返回值是一个无穷值"));
- break;
- case -69:
- StringCchCat(ErrInfo,nErrorLen, _T("代表没足够的变量参数"));
- break;
- case -70:
- StringCchCat(ErrInfo,nErrorLen, _T("返回变量与函数不相符"));
- break;
- case -71:
- StringCchCat(ErrInfo,nErrorLen, _T("浮点数转换字符串时,要转换的数据太大"));
- break;
- case -72:
- StringCchCat(ErrInfo,nErrorLen, _T("初始化服务器错误"));
- break;
- case -73:
- StringCchCat(ErrInfo,nErrorLen, _T("对缓冲区进行MD5运算时错误"));
- break;
- case -74:
- StringCchCat(ErrInfo,nErrorLen, _T("MD5验证IPVAR错误"));
- break;
- case -75:
- StringCchCat(ErrInfo,nErrorLen, _T("MD5验证IPCount错误"));
- break;
- case -76:
- StringCchCat(ErrInfo,nErrorLen, _T("没有找到对应的SOCKET连接"));
- break;
- case -77:
- StringCchCat(ErrInfo,nErrorLen, _T("没有找到要删除的对应的SOCKET连接"));
- break;
- case -78:
- StringCchCat(ErrInfo,nErrorLen, _T("没有找到要删除的对应的功能模块号连接"));
- break;
- case -79:
- StringCchCat(ErrInfo,nErrorLen, _T("没有找到要增加的对应的功能模块号连接"));
- break;
- case -80:
- StringCchCat(ErrInfo,nErrorLen, _T("用户数已超过限制的授权数量"));
- break;
- case -81:
- StringCchCat(ErrInfo,nErrorLen, _T("找不到对应的INI文件条目"));
- break;
- case -82:
- StringCchCat(ErrInfo,nErrorLen, _T("没有进行初始化服务工作"));
- break;
- case -252:
- StringCchCat(ErrInfo,nErrorLen, _T("密码不正确"));
- break;
- case -1088:
- StringCchCat(ErrInfo,nErrorLen, _T("发送数据错误"));
- break;
- case -1089:
- StringCchCat(ErrInfo,nErrorLen, _T("获取数据错误"));
- break;
- case -1092:
- StringCchCat(ErrInfo,nErrorLen, _T("找不到对应的服务端操作码"));
- break;
- case -1093:
- StringCchCat(ErrInfo,nErrorLen, _T("表示连接服务时错误"));
- break;
- case -1095:
- StringCchCat(ErrInfo,nErrorLen, _T("获取主机名称失败"));
- break;
- case -1097:
- StringCchCat(ErrInfo,nErrorLen, _T("建立套字接错误"));
- break;
- case -1098:
- StringCchCat(ErrInfo,nErrorLen, _T("绑定套字节端口错误"));
- break;
- case -1099:
- StringCchCat(ErrInfo,nErrorLen, _T("表示无效连接,不能进行相关的操作"));
- break;
- case -2002:
- StringCchCat(ErrInfo,nErrorLen, _T("表示监听时产生错误"));
- break;
- case -2003:
- StringCchCat(ErrInfo,nErrorLen, _T("表示发送的数据长度与接收的数据长度不相符"));
- break;
- case -2005:
- StringCchCat(ErrInfo,nErrorLen, _T("表示当前服务不存在任何连接"));
- break;
- case -2006:
- StringCchCat(ErrInfo,nErrorLen, _T("表示当前查询节点超出集合范范围"));
- break;
- case -2009:
- StringCchCat(ErrInfo,nErrorLen, _T("表示关闭连接错误"));
- break;
- case -1052:
- StringCchCat(ErrInfo,nErrorLen, _T("可能是输入的授权号不正确"));
- break;
- case -1053:
- StringCchCat(ErrInfo,nErrorLen, _T("系统上没有任何智能锁"));
- break;
- default:
- StringCchCat(ErrInfo,nErrorLen, _T("未知错误代码"));
- }
- }
- //////////////////////////////////////////////////////////////////////////
|