|
Ok, I got it. Sorry, friday morning so the brain is already in week-end and is away
Yes, I used to work with USB devices for my previous job and I know more or less how USB communications work. In general, there is a lot of confusion because people treat that as a standard serial communication but it's much more complex in fact.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: Ok, I got it. Sorry, friday morning so the brain is already in week-end and is away
Yeah, same here.. , waiting anxiously to pass another 8 hours , Ofcourse with some work done for the company ..
Cedric Moonen wrote: Yes, I used to work with USB devices for my previous job
Yeah, its good that at least there's someone to take care of the "USB" questions!!;)
Have a Nice weekend!
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Yaa..u can use CreateFile,ReadFile and WriteFile for USB communication also.
Takanobu Maekawa wrote: I saw some web pages that says I should use DeviceIoControl().
But I have never come accross DeviceIoControl()..Can anybody tell me ,how to work with DeviceIoControl().
http://www.codeproject.com/system/cserialcom.asp[^]
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Hi,
What is the operation performed by "Overlay Mixer" Filter in FilterGraph of DirectShow?
Is there any Filter that perform opertion same as VMR Filter having output pin? OR How I can use "Overlay Mixer" Filter?
Best Regards,
Aniket
|
|
|
|
|
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
|
|
|
|
|
Hi,
My server App is listening at an some IP at the port 1234.
I am using CSocket class, At client side CSocket.Create() will creat a random socket/port
Would the CSocket.Create() will be successfull at the client side where firewall is installed
and will the app start listening at that socket.
Thanks
Regards.
|
|
|
|
|
zahid_ash wrote: t client side CSocket.Create() will creat a random socket/portWould the CSocket.Create() will be successfull at the client side where firewall is installedand will the app start listening at that socket.
At Client End you will not Associate you Client Application to any port you just connect to port on that IP address where you server is listening!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
At server Side I will do:
CSocket sockSrvr;
sockSrvr.Create(PORT);
sockSrvr.Listen();
At Cleint side I will do as :
CSocket sockClient;
sockClient.Create();
sockClient.Connect( strIP, PORT );
When the line sockClient.Create(); will execute , would not it will create any random port on which it will recvie data from server. sned data to server via this created port.
Please calrify / make correction if I am wrong
Regards.
|
|
|
|
|
zahid_ash wrote: random port
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
hai, I want to know about pre compiled header files.
What are precompiled header files ?
Are they compile before compilation ?
How precompiled header files make the build much faster?
Thank you in advance.
|
|
|
|
|
The C++ compiler provides a mechanism for, in effect, taking a snapshot of the state of the compilation at a particular point and writing it to a disk file before completing the compilation; then, when recompiling the same source file or compiling another file with the same set of header files, it can recognize the ``snapshot point,'' verify that the corresponding precompiled header (``PCH'') file is reusable, and read it back in. Under the right circumstances, this can produce a dramatic improvement in compilation time; the trade-off is that PCH files can take a lot of disk space.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you very much.
Is there any relation to make file ? sorry if iam too beyond.
|
|
|
|
|
AFAIK None. Makefile has a set of commands and compiler options that are required to build a project on a machine with the help of nmake command.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Apart from the fact that if you use a make file and want to use precompiled headers the make file will have to call the compiler with the correct switches to enable precompiled headers.
Steve
|
|
|
|
|
See here.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi !!!
Precompiled Headers makes your build faster. They are compiled one time. Only if you change something in the Precompiled Header file, then it need this time for the new compilation of the all things in the Precompiled Header file. From my experience eith the C++ I thing the precompiled headers are good for the build time or that you don't have to include in each .cpp file the STL or the WIN32API headers. But it is not so clearly as without them, but C++ is not very clearly language so it is OK.
By !!!
-:KNOX:-
|
|
|
|
|
when i use a IHTMLDOMNode pointer which points to a #text node in the dom tree to get a IHTMLElement pointer,it fails. is there anyone who knows how to solve the problem?the purpose for getting the IHTMLElement pointer is that i want to get the bounding rect of the text node.
|
|
|
|
|
ASSERT the IHTMLDOMNode pointer is not NULL
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Can you be more specific? Show the code that is failing and describe the nature of the failure.
Steve
|
|
|
|
|
How to Change CPropertyPage's Title
i wrote the following code, however, the exception occurs in
int index = m_sheet.GetPageIndex(this);//make a Exception
Thanks
<br />
CPropertySheet m_sheet;<br />
CAboutDlg m_about;<br />
...<br />
m_sheet.AddPage(&m_about);<br />
m_sheet.Create(this, WS_CHILD|WS_VISIBLE,WS_EX_CONTROLPARENT);<br />
m_sheet.SetWindowPos(NULL, 4, 4,25, 50, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);<br />
....<br />
...<br />
m_sheet = GetPrient();<br />
CString szDlgName(_T("test"));<br />
TC_ITEM TabCtrlItem; <br />
TabCtrlItem.mask = TCIF_TEXT; <br />
TabCtrlItem.dwState = TCIS_BUTTONPRESSED; <br />
TabCtrlItem.pszText = buf;<br />
<br />
strcpy(TabCtrlItem.pszText,szDlgName);<br />
<br />
int index = m_sheet.GetPageIndex(this);
m_sheet.GetTabControl()->SetItem(index,&TabCtrlItem);<br />
<br />
...<br />
hi
-- modified at 1:26 Friday 19th May, 2006
|
|
|
|
|
You can change the caption of the dialog to cahnge the title.
in your case
m_about.SetWindowText( "test" );
Regards
Anil
|
|
|
|
|
Thanks for you reply!
but SetWindowText is not ok!
<br />
CPropertySheet* pSheet = (CPropertySheet*)this->GetParent();<br />
<br />
COptionDlg* dlg = (COptionDlg*)this->GetParentOwner();<br />
TCHAR buf[MAX_PATH];<br />
TC_ITEM TabCtrlItem; <br />
<br />
hi
|
|
|
|
|
Just check if the CAboutDlg is derived from CDialog or CPropertyPage. It should be CPropertyPaeg and must have done CPropertyPage but I am just asking to check it once more. so we can think of other options.
Regards
Anil
|
|
|
|
|
yes,my CAboutDlg is derved from CPropertyPage!!
hi
|
|
|
|
|
It sounds to me that you are calling this function before the window has been created.
The exception you get is probably about the hWnd being 0.
From where are you calling this?
What function?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|