打印客户c++的示例

HRESULT PrintClients (IltmsServer *服务器){HRESULT人力资源;计数;CComPtr < IltmsClients >客户;/ /打印客户端发送到stdout_tprintf (_T (“- - - - - -客户- - - - - - \ n \ n”));hr =服务器- > GetClients(客户);如果(失败(人力资源)转到错误;hr =客户- > get_Count(数);如果(失败(人力资源)转到错误;(我= 0;我<数;我+ +){CComPtr < IltmsClient >客户端;CComBSTR ip;连接;connecttime日期;hr =客户- >项目(我的客户);如果(失败(人力资源)转到错误;hr =客户- > get_IPAddress (ip);如果(失败(人力资源)转到错误;hr =客户- > get_Connections(连接);如果(失败(人力资源)转到错误;hr =客户- > get_ConnectionTime (&connecttime);如果(失败(人力资源)转到错误;/ /转换为本地时间COleDateTime里程计(connecttime);SYSTEMTIME斯图;dtu.GetAsSystemTime (stu);SYSTEMTIME圣;SystemTimeToTzSpecificLocalTime (NULL,斯图、办法);COleDateTime dt (st);装运箱sconnecttime = dt.Format (_T (“Y % - % - % d % H: % m: % S”));_tprintf (_T (“客户端(% ld): % s,连接= % ld,连接时间= % s \ n "),我(LPCTSTR)装运箱(ip),连接,(LPCTSTR) sconnecttime);}错误:_tprintf (_T (“\ n”));返回人力资源;}
LEADTOOLS流媒体C API的帮助
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。