📄 getreturnthread.cpp
字号:
#include "GetReturnThread.h"#include "global.h"// Function name : GetReturnThread// Description : // Return type : void // Argument : GetReturnThreadArg *pArgvoid GetReturnThread(GetReturnThreadArg *pArg){ int n = 0; void *pDbsValue; char *pBuf; MPD_CMD_HANDLE hCommand; g_Database.Get(pArg->pszDbsID, pArg->pszDbsKey, pDbsValue, &n); if (n>0) { pDbsValue = new char[n]; if (g_Database.Get(pArg->pszDbsID, pArg->pszDbsKey, pDbsValue, &n) == MPI_DBS_SUCCESS) { pArg->command.hCmd.nBufferLength = 2 * sizeof(unsigned long) + 2 * sizeof(int); pBuf = &pArg->command.pCommandBuffer[2 * sizeof(unsigned long) + sizeof(int)]; *((int *)(pBuf)) = n; pBuf += sizeof(int); memcpy(pBuf, pDbsValue, n); delete pArg->pszDbsKey; } delete pDbsValue; } pArg->command.hCmd.nBufferLength += n; pArg->command.nCommand = MPD_CMD_FORWARD; hCommand = InsertCommand(pArg->command); //WaitForCommand(hCommand); delete pArg;}// Function name : GetThread// Description : // Return type : void // Argument : GetReturnThreadArg *pArgvoid GetThread(GetReturnThreadArg *pArg){ int n = 0; void *pDbsValue = NULL; g_Database.Get(pArg->pszDbsID, pArg->pszDbsKey, pDbsValue, &n); if (n>0) { pDbsValue = new char[n]; if (g_Database.Get(pArg->pszDbsID, pArg->pszDbsKey, pDbsValue, &n) == MPI_DBS_SUCCESS) { pArg->pCommand->hCmd.nBufferLength = n; memcpy(pArg->pCommand->pCommandBuffer, pDbsValue, n); delete pArg->pszDbsKey; } delete pDbsValue; } MarkCommandCompleted(pArg->pCommand); delete pArg;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -