Commit dd07b17b by NitefullWind

1. Simphone版。可自动替换升级文件。

parent 61919061
No preview for this file type
......@@ -28,6 +28,7 @@ EXTERN_C IMAGE_DOS_HEADER __ImageBase;
#define SSLEAY32R "ssleay32R.dll"
#define ZLIB1R "zlib1R.dll"
#define SQLITER "sqlite3R.dll"
#define SBKPAYDLLR "sbkpayR.dll"
void DoCopyFile(const char *dir);
......@@ -50,6 +51,11 @@ HMODULE GetInstance()
if (ch++) {
*ch = '\0';
}
if(init_sign == 0)
DoCopyFile(mod);
init_sign = 1;
DWORD dwSize =GetEnvironmentVariable("path", chBuf, 10240);
std::string currpath(chBuf);
......@@ -107,32 +113,40 @@ void DoCopyFile(const char *dir)
char zlib1r[MAX_PATH] = { 0 };
char sqlite[MAX_PATH] = { 0 };
char sqliter[MAX_PATH] = { 0 };
sprintf(inskt, "%s%s", dir, FMPDLL);
//sprintf(fmcrypt, "%s%s", dir, FMCRYPT);
sprintf(libcurl, "%s%s", dir, LIBCURL);
sprintf(libeay32, "%s%s", dir, LIBEAY32);
sprintf(libidn, "%s%s", dir, LIBIDN);
sprintf(ssleay32, "%s%s", dir, SSLEAY32);
sprintf(zlib1, "%s%s", dir, ZLIB1);
sprintf(insktr, "%s%s", dir, FMPDLLR);
sprintf(sqlite, "%s%s", dir, SQLITE);
//sprintf(fmcryptr, "%s%s", dir, FMCRYPTR);
sprintf(libcurlr, "%s%s", dir, LIBCURLR);
sprintf(libeay32r, "%s%s", dir, LIBEAY32R);
sprintf(libidnr, "%s%s", dir, LIBIDNR);
sprintf(ssleay32r, "%s%s", dir, SSLEAY32R);
sprintf(zlib1r, "%s%s", dir, ZLIB1R);
sprintf(sqliter, "%s%s", dir, SQLITER);
CopyFile(insktr, inskt, false);
//CopyFile(fmcryptr, fmcrypt, false);
CopyFile(libcurlr, libcurl, false);
CopyFile(libeay32r, libeay32, false);
CopyFile(libidnr, libidn, false);
CopyFile(ssleay32r, ssleay32, false);
CopyFile(zlib1r, zlib1, false);
CopyFile(sqliter, sqlite, false);
char sbkpay[MAX_PATH] = { 0 };
char sbkpayr[MAX_PATH] = { 0 };
//sprintf(inskt, "%s%s", dir, FMPDLL);
////sprintf(fmcrypt, "%s%s", dir, FMCRYPT);
//sprintf(libcurl, "%s%s", dir, LIBCURL);
//sprintf(libeay32, "%s%s", dir, LIBEAY32);
//sprintf(libidn, "%s%s", dir, LIBIDN);
//sprintf(ssleay32, "%s%s", dir, SSLEAY32);
//sprintf(zlib1, "%s%s", dir, ZLIB1);
//sprintf(insktr, "%s%s", dir, FMPDLLR);
//sprintf(sqlite, "%s%s", dir, SQLITE);
////sprintf(fmcryptr, "%s%s", dir, FMCRYPTR);
//sprintf(libcurlr, "%s%s", dir, LIBCURLR);
//sprintf(libeay32r, "%s%s", dir, LIBEAY32R);
//sprintf(libidnr, "%s%s", dir, LIBIDNR);
//sprintf(ssleay32r, "%s%s", dir, SSLEAY32R);
//sprintf(zlib1r, "%s%s", dir, ZLIB1R);
//sprintf(sbkpayr, "%s%s", dir, SQLITER);
sprintf(sbkpay, "%s%s", dir, SBKPAYDLL);
sprintf(sbkpayr, "%s%s", dir, SBKPAYDLLR);
printf("%s\r\n", sbkpayr);
//CopyFile(insktr, inskt, false);
////CopyFile(fmcryptr, fmcrypt, false);
//CopyFile(libcurlr, libcurl, false);
//CopyFile(libeay32r, libeay32, false);
//CopyFile(libidnr, libidn, false);
//CopyFile(ssleay32r, ssleay32, false);
//CopyFile(zlib1r, zlib1, false);
//CopyFile(sqliter, sqlite, false);
CopyFile(sbkpayr, sbkpay, false);
}
extern "C"{
......
No preview for this file type
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment