Click here to Skip to main content
15,911,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can I use ReadFile/WriteFile for USB device's handle? Pin
Eytukan18-May-06 21:36
Eytukan18-May-06 21:36 
GeneralRe: Can I use ReadFile/WriteFile for USB device's handle? Pin
Cedric Moonen18-May-06 21:39
Cedric Moonen18-May-06 21:39 
GeneralRe: Can I use ReadFile/WriteFile for USB device's handle? Pin
Eytukan18-May-06 21:45
Eytukan18-May-06 21:45 
GeneralRe: Can I use ReadFile/WriteFile for USB device's handle? Pin
Cedric Moonen18-May-06 21:47
Cedric Moonen18-May-06 21:47 
GeneralRe: Can I use ReadFile/WriteFile for USB device's handle? Pin
Eytukan18-May-06 21:57
Eytukan18-May-06 21:57 
AnswerRe: Can I use ReadFile/WriteFile for USB device's handle? Pin
NiceNaidu18-May-06 23:34
NiceNaidu18-May-06 23:34 
QuestionWhat is operation of "Overlay Mixer" Filter? Pin
Andy Rama18-May-06 20:01
Andy Rama18-May-06 20:01 
QuestionSending a web page to client on socket Pin
shuchigo_jane18-May-06 19:52
shuchigo_jane18-May-06 19:52 
Doin a simulation on web cache server...stored a web page like google on the hard disk of the machine actin as the wcs....fter the request is send by the client...the client receives the page without the .gif images on dem...is there something missin in the code written for it...
if(SUCCEEDED(hr))
{
HRESULT hr1 = m_pRecordset.CreateInstance(__uuidof(Recordset));

if(SUCCEEDED(hr1))
{
m_pRecordset->Open("SELECT * FROM wcs ;","Provider= MSDASQL.1 ;Data Source=wcs;Initial Catalog=;User Id=; Password=;",adOpenDynamic,adLockUnspecified,adCmdText);

while(!m_pRecordset->EndOfFile)
{
AfxMessageBox(( _bstr_t)m_pRecordset->GetFields()->GetItem("URL")->GetValue());
_bstr_t val=( _bstr_t)m_pRecordset->GetFields()->GetItem("URL")->GetValue();
if((strcmp(url,(char*)val))==0)
{
flag=1;//Page matched in DB
_bstr_t loc=( _bstr_t)m_pRecordset->GetFields()->GetItem("Location")->GetValue();
CFile f;
TCHAR* pFileName = _T(loc);
if( !f.Open( pFileName, CFile::modeRead,NULL) )
{
AfxMessageBox("cannot open file");
}
else
{
char *pbuf =new char [60000];
UINT nBytesRead = f.Read( pbuf, 60000 );
m_sConnected.Send(pbuf,60000);
AfxMessageBox("sent");
//UPDATING DB
_CommandPtr m_pCommand;
m_pCommand.CreateInstance(__uuidof(Command));
m_pCommand->ActiveConnection = m_pConnection;
m_pCommand->CommandText = "update wcs set no_of_accesses = no_of_accesses+1";
pRs.CreateInstance(__uuidof(Recordset));
pRs->PutRefSource(m_pCommand);
_variant_t vNull(DISP_E_PARAMNOTFOUND, VT_ERROR);
pRs->Open(&vNull, &vNull, adOpenDynamic, adLockOptimistic, adCmdUnknown);

}//open file
break;
}//if str compare
else
{
AfxMessageBox("else");
m_pRecordset->MoveNext();
}
}


-- modified at 1:53 Friday 19th May, 2006
QuestionCreating a Socket , where firewall is installed Pin
zahid_ash18-May-06 19:24
zahid_ash18-May-06 19:24 
AnswerRe: Creating a Socket , where firewall is installed Pin
ThatsAlok18-May-06 20:04
ThatsAlok18-May-06 20:04 
GeneralRe: Creating a Socket , where firewall is installed Pin
zahid_ash18-May-06 20:24
zahid_ash18-May-06 20:24 
GeneralRe: Creating a Socket , where firewall is installed Pin
Eytukan18-May-06 21:37
Eytukan18-May-06 21:37 
Questionpre compiled header files ? Pin
Krishnatv18-May-06 19:17
Krishnatv18-May-06 19:17 
AnswerRe: pre compiled header files ? Pin
_AnsHUMAN_ 18-May-06 19:27
_AnsHUMAN_ 18-May-06 19:27 
GeneralRe: pre compiled header files ? Pin
Krishnatv18-May-06 19:37
Krishnatv18-May-06 19:37 
GeneralRe: pre compiled header files ? Pin
_AnsHUMAN_ 18-May-06 19:53
_AnsHUMAN_ 18-May-06 19:53 
GeneralRe: pre compiled header files ? Pin
Stephen Hewitt18-May-06 19:55
Stephen Hewitt18-May-06 19:55 
AnswerRe: pre compiled header files ? Pin
David Crow19-May-06 3:44
David Crow19-May-06 3:44 
AnswerRe: pre compiled header files ? Pin
knoxplusplus23-May-06 7:54
knoxplusplus23-May-06 7:54 
Questionhelp??About mshtml and ie. Pin
shilianghui218-May-06 19:14
shilianghui218-May-06 19:14 
AnswerRe: help??About mshtml and ie. Pin
Laxman Auti18-May-06 20:23
Laxman Auti18-May-06 20:23 
AnswerRe: help??About mshtml and ie. Pin
Stephen Hewitt18-May-06 20:57
Stephen Hewitt18-May-06 20:57 
QuestionHow to Change CPropertyPage's Title Pin
zt978818-May-06 19:12
zt978818-May-06 19:12 
AnswerRe: How to Change CPropertyPage's Title Pin
_anil_18-May-06 20:55
_anil_18-May-06 20:55 
GeneralRe: How to Change CPropertyPage's Title Pin
zt978818-May-06 21:11
zt978818-May-06 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.