| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzLogger::Close | (void) |
Declared in file: hzProcess.h
Defined in file : hzLogger.cpp
Function Logic:
Function body:
hzEcode hzLogger::Close (void)
{
_hzfunc("hzLogger::Close") ;
uint32_t nBytes ;
uint32_t nProcID ;
uchar* u ;
if (m_File)
{
if (m_pFile)
fclose(m_pFile) ;
m_pFile = 0;
m_nSessID = 0;
m_Base.Clear() ;
m_File.Clear() ;
return E_OK ;
}
u = (uchar*) m_cvData ;
nProcID = getpid() ;
u[0]= LS_STOP ;
u[1]= 0;
u[2]= 8;
u[3]= (m_nSessID & 0x00ff0000)>>16;
u[4]= (m_nSessID & 0x0000ff00)>>8;
u[5]= (m_nSessID & 0x000000ff);
u[6]= (nProcID & 0xff00)>>8;
u[7]= (nProcID & 0xff00)>>8;
u[8]= (nProcID & 0xff00)>>8;
u[9]= (nProcID & 0xff);
nBytes = 10;
if (m_pConnection->Send(m_cvData, nBytes) != E_OK)
return E_SENDFAIL ;
if (m_pConnection->Recv(m_cvData, nBytes, 64)!=E_OK)
return E_RECVFAIL ;
if (m_cvData[0]== LS_OK)
return E_OK ;
return E_PROTOCOL ;
}