91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 299.99 KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2024-09-22
  • 語言: 其他
  • 標簽: C++??

資源簡介

C++實現的即時通訊工具源碼,模仿QQ實現的即時通訊工具,里面有詳細的設計源碼。

資源截圖

代碼片段和文件信息

#include?“stdafx.h“
#include?“ado.h“
ado::ado()
{
::CoInitialize(NULL);
try
{
m_pConnection.CreateInstance(__uuidof(Connection));
// _bstr_t?strConnect=“Provider=SQLOLEDB;SERVER=PC-3128999;Database=Honglin;UID=sa;PWD=;“;
//_bstr_t?strConnect=“driver={SQL?server};server=127.0.0.1;DATAbase=db_Client;uid=sa;pwd=“;
_bstr_t?strConnect=“Provider=Microsoft.Jet.OLEDB.4.0;Data?Source=db.db“;
//ntServer
m_pConnection->Open(strConnect““““0);
}
catch(_com_error?e)
{
AfxMessageBox(e.Description());

}
}
ado::~ado()
{
//m_pRecordset->Close();
/// m_pConnection->Close();
// m_pRecordset=NULL;
// m_pConnection=NULL;
// ::CoUninitialize();

}
bool?ado::Open(CString?srecordset?UINT?adCmd)
{

try{
?m_pRecordset=m_pConnection->Execute((_bstr_t)srecordsetNULLadCmd);
}
catch(_com_error&e)
{
this->GetErrors(e);
return?false;
}
return?true;
}
int?ado::GetRecordCount()
{
int?nCount=0;
try{

m_pRecordset->MoveFirst();
}
catch(...)
{
return?0;
}
if(m_pRecordset->adoEOF)
return?0;
while?(!m_pRecordset->adoEOF)
{
m_pRecordset->MoveNext();
nCount=nCount+1;
}
m_pRecordset->MoveFirst();
return?nCount;
}
void?ado::GetErrors(_com_error?eErrors)
{
/*CString?string;
CFile?file;

file.Open(“Error.Rxe“CFile::modeWrite|CFile::modeNoTruncate);
ErrorsPtr?pErrors=cnn->GetErrors();
if?(pErrors->GetCount()==0)
{
string=(char*)(_bstr_t)eErrors.ErrorMessage();
file.Write(string+“\r\n“string.GetLength()+1);
//::AfxMessageBox(string);
}
else
{
for?(int?i=0;iGetCount();i++)
{
_bstr_t?desc=pErrors->GetItem((long)i)->GetDescription();
string=(char*)desc;
file.Write(string+“\r\n“string.GetLength()+1);
//::AfxMessageBox(string);
}
}
file.Close();
*/
ErrorsPtr?pErrors=m_pConnection->GetErrors();
if?(pErrors->GetCount()==0)
MessageBox(NULLeErrors.ErrorMessage()“錯??誤“MB_OK|MB_ICONEXCLAMATION);
else
{
for?(int?i=0;iGetCount();i++)
{
_bstr_t?desc=pErrors->GetItem((long)i)->GetDescription();
MessageBox(NULLdesc“錯??誤“MB_OK|MB_ICONEXCLAMATION);
}
}
}
//_RecordsetPtr&

void?ado::rstOpen(CString?TSQL)
{
try
{
_bstr_t?bstrSQL=TSQL.AllocSysString();
m_pRecordset.CreateInstance(__uuidof(Recordset));
//m_pRecordset->Open(bstrSQL(IDispatch*)m_pConnectionadOpenDynamicadLockOptimisticadCmdText);
m_pRecordset->Open(bstrSQLm_pConnection.GetInterfacePtr()adOpenDynamicadLockOptimisticadCmdText);
}
catch(_com_error?e)
{
m_pRecordset=m_pConnection->Execute((_bstr_t)TSQLNULLadCmdText);
//return?false;
}
//return?m_pRecordset;
}

CString?ado::GetFieldValue(CString?Field)
{
????_variant_t?Thevalue;
CString?temp;

????Thevalue=m_pRecordset->GetCollect((_bstr_t)Field);
if(Thevalue.vt==VT_EMPTY?||Thevalue.vt==VT_NULL)
temp=““;
else
{
temp=(char*)(_bstr_t)Thevalue;
temp.TrimRight();
temp.TrimLeft();
}

return?temp;

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????4767??2008-08-10?13:44??C++實現的即時通訊工具源碼\Client\ado.cpp

?????文件????????748??2008-05-11?16:56??C++實現的即時通訊工具源碼\Client\ado.h

?????文件???????2425??2008-09-04?11:57??C++實現的即時通訊工具源碼\Client\Client.clw

?????文件???????2157??2008-08-08?08:14??C++實現的即時通訊工具源碼\Client\Client.cpp

?????文件???????3719??2009-02-17?16:51??C++實現的即時通訊工具源碼\Client\Client.dsp

?????文件????????520??2008-08-08?08:14??C++實現的即時通訊工具源碼\Client\Client.dsw

?????文件??????73728??2009-02-17?15:52??C++實現的即時通訊工具源碼\Client\Client.exe

?????文件???????1324??2008-08-08?08:14??C++實現的即時通訊工具源碼\Client\Client.h

?????文件?????189440??2009-02-17?17:25??C++實現的即時通訊工具源碼\Client\Client.ncb

?????文件??????50688??2009-02-17?16:51??C++實現的即時通訊工具源碼\Client\Client.opt

?????文件???????2044??2009-02-17?16:49??C++實現的即時通訊工具源碼\Client\Client.plg

?????文件???????8265??2009-02-17?16:08??C++實現的即時通訊工具源碼\Client\Client.rc

?????文件??????27253??2009-02-17?17:08??C++實現的即時通訊工具源碼\Client\ClientDlg.cpp

?????文件???????2608??2008-08-25?16:49??C++實現的即時通訊工具源碼\Client\ClientDlg.h

?????文件?????139264??2009-03-31?18:30??C++實現的即時通訊工具源碼\Client\db.db

?????文件???????1987??2008-08-10?09:54??C++實現的即時通訊工具源碼\Client\Login.cpp

?????文件???????1220??2008-08-08?10:58??C++實現的即時通訊工具源碼\Client\Login.h

?????文件??????90619??2006-12-26?21:19??C++實現的即時通訊工具源碼\Client\msado15.tlh

?????文件??????76614??2006-12-26?21:19??C++實現的即時通訊工具源碼\Client\msado15.tli

?????文件??????15552??2009-02-17?15:57??C++實現的即時通訊工具源碼\Client\RCa02372

?????文件???????3579??2008-08-08?08:14??C++實現的即時通訊工具源碼\Client\ReadMe.txt

?????文件??????22572??2009-02-17?16:08??C++實現的即時通訊工具源碼\Client\Release\Client.res

?????文件??????15556??2009-02-17?16:01??C++實現的即時通訊工具源碼\Client\Release\RCa00176

?????文件??????15556??2009-02-17?16:03??C++實現的即時通訊工具源碼\Client\Release\RCa00724

?????文件??????15556??2009-02-17?15:58??C++實現的即時通訊工具源碼\Client\Release\RCa01908

?????文件??????15552??2009-02-17?15:58??C++實現的即時通訊工具源碼\Client\Release\RCa02480

?????文件??????15552??2009-02-17?15:58??C++實現的即時通訊工具源碼\Client\Release\RCa02552

?????文件??????15552??2009-02-17?15:57??C++實現的即時通訊工具源碼\Client\Release\RCa03368

?????文件??????15556??2009-02-17?16:04??C++實現的即時通訊工具源碼\Client\Release\RCa03676

?????文件???????1078??2008-08-10?14:03??C++實現的即時通訊工具源碼\Client\res\Client.ico

............此處省略53個文件信息

評論

共有 條評論