Esempio n. 1
0
long CGPS_Socket::writeGPS( const char *buf,const char *addr,int nPort )
{
    //nPort = 193;
    long nRet =m_pITSDevice_card->sendData(buf,strlen(buf),addr,nPort);
    CString strLog;
    CString sAddr(addr),sBuf(buf);
    strLog.Format(_T("writeGPS %s,%s,%d---ret=%d "),sBuf,sAddr,nPort,nRet);
    OutputDebugString(strLog);
    WriteLog(_T("GPS_Inteface"),logLevelInfo,strLog);
    return nRet;
}
Esempio n. 2
0
size_t wcsftime(wchar_t *s,
                const size_t maxsize,
                const wchar_t *format,
                const struct tm *t)
{
    wxCharBuffer sBuf(maxsize/sizeof(wchar_t));

    wxString formatStr(format);
    wxCharBuffer bufFormatStr(formatStr.mb_str());

    size_t sz = strftime(sBuf.data(), maxsize/sizeof(wchar_t), bufFormatStr, t);

    wxMB2WC(s, sBuf, maxsize);

    return sz;
}