Compare commits

..
Author SHA1 Message Date
hugy 861a04e7a0 修复无法正确卸载dll 2023-02-21 16:24:39 +08:00
hugy 04e7967236 错误查询导致的崩溃 2023-02-20 10:38:22 +08:00
5 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -701,7 +701,7 @@ int http_start(int port) {
#endif
kHttpRuning = true;
kHttpThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)http_server,
(LPVOID)port, NULL, 0);
(LPVOID)port, NULL, 0);
return 0;
}
+7
View File
@@ -135,4 +135,11 @@ BOOL FindOrCreateDirectoryW(const wchar_t *path) {
return false;
}
return true;
}
void CloseConsole(){
fclose(stdin);
fclose(stdout);
fclose(stderr);
FreeConsole();
}
+1
View File
@@ -53,6 +53,7 @@ std::string Wstring2String(std::wstring wstr);
/// @return
BOOL FindOrCreateDirectoryW(const wchar_t *path);
void CloseConsole();
template <typename T1, typename T2>
std::vector<T1> split(T1 str, T2 letter) {
+6 -1
View File
@@ -97,10 +97,15 @@ int Select(DWORD db_hanle, const char *sql,
if (status == 0) {
return 0;
}
if(data.size() == 0){
return 1;
}
vector<string> index;
for (size_t i = 0; i < data[0].size(); i++)
for (size_t i = 0; i < data[0].size(); i++){
index.push_back(data[0][i].column_name);
}
query_result.push_back(index);
for (auto it : data) {
vector<string> item;
for (size_t i = 0; i < it.size(); i++) {
+1
View File
@@ -16,6 +16,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call,
break;
}
case DLL_PROCESS_DETACH: {
CloseConsole();
http_close();
break;
}