|
I haven't tried it yet but I've looked at the api and I believe it to be what I was looking for.
I've been Googling all kinds of search criteria looking for this answer.... so many thanks for your help.
Regards
RichardS71
|
|
|
|
|
Hi,
I am writing an appliction which downloads MJPEG stream from IP camera. My application supports many IP cameras at a time. So i need to download several URL at a time from single instance. But the problem is when I add my fifth camera my application gets hanged. So is there any limit on how many URLs we can open using CInternetSession's OpenURL method? From my application I am able to open upto 4 URLs for one instance. For fifth URL my application give "timeout" exception.
Code:
CStdioFile* m_pFile[5];
CInternetSession m_inetSession[5];
for(int iIndex = 0; iIndex < 5; ++iIndex)
{
m_pFile[iIndex] = m_inetSession[iIndex].OpenURL (cstrUrl, 1, INTERNET_FLAG_TRANSFER_BINARY | INTERNET_FLAG_RELOAD);
.
.
}
Thanks in Advance.
Amar
|
|
|
|
|
Since CInternetSession class is a wrapper around InternetOpenUrl() , you could temporarily change your code to use InternetOpenUrl() instead. When/if it fails, you can call GetLastError() to find out why.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
GetLastError() returns error code 12002.
|
|
|
|
|
From the docs:
ERROR_INTERNET_TIMEOUT
12002
The request has timed out.
Are you sure the URL is valid?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hello everyone,
Multiplies is a struct, why MSDN said it is a class?
http://msdn2.microsoft.com/en-us/library/a5hwk3ay(VS.80).aspx
thanks in advance,
George
|
|
|
|
|
Because in C++ a struct and a class are quite similar. The difference is that struct s give, by default, public public access to their members, while classes do the opposite (private access, by default, to their members).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
learn your school lessons. in C++, a struct is a class (the only difference is that is defaults is members as public instead of private).
|
|
|
|
|
C++ recommands that use class only for its spirit.
struct in C++ is for compatibility with C.
However you can think class as a mentally concept, as a more common concpet, so either can be called a class as you like.
|
|
|
|
|
I want to custom a Browseinfo window.
For original Browseinfo only gets the address information, I also want to know which form user choose(xsl,xml,txt,ect) now.
So, I want to add a ComboBox on the Browseinfo window.
I tried, but always encountered error when I calculate the ComboBox's location.
Does anyone have a relative Demo ? (a simple one is better )
And welcome any idea.
Thanks a lot!
------------------------------------------------------
zhangyuan0526@gmail.com(gtalk and mail,recommend)
alex_robin_526@hotmail.com(msn)
modified on Thursday, December 06, 2007 12:17:18 AM
|
|
|
|
|
moye2501 wrote: I tried, but always encountered error...
What error?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all,
i am developing a application using vc++ 6.0 in which i have add check boxes in multiple columns(in 5 columns)of a list ctrl. existing extended style option provides check boxes only in the 0th column. how can i do this... can some one help me out to do this...
|
|
|
|
|
|
oh.. but is it possible to get the check boxes in five columns...? did any one try this....
|
|
|
|
|
|
Member 3869682 wrote: how can i do this
Use XListCtrl from Hans Dietrich.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
When i call the CDialog::OnOK(); function I get error :
C:\Documents and Settings\Administrator\Desktop\new_pdf_latest\pdf_latest\itagane_latest\itagane_latest\itagane\CTools\daishi.cpp(116) : error C2039: 'OnOK' : is not a member of 'CDialog'
How can I solve this error?
|
|
|
|
|
One possibility is deriving your dialog from CDialog
The other one is establishing it by yourself
//in header
//{{AFX_MSG(CDaishi)
virtual void OnOK();
//in cpp
void CDaishi::OnOK()
{
//do whatever you need
}
Forget about it. I didn't pay attention, you are not in MFC.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
modified on Wednesday, December 05, 2007 5:45:52 AM
|
|
|
|
|
And how can he derive his CDialog from MFC's CDialog?
I see a little naming conflict...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I didn't realice...
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
/in header
//{{AFX_MSG(CDaishi)
void OnOK();
//in cpp
void CDaishi::OnOK()
{
//do whatever you need
CDialog::OnOk();
}
Remove the virtual keyword in the header.it will Work
|
|
|
|
|
Something is missing, could you please present the decalaration of your class!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
SOCKET s = socket(AF_INET,SOCK_STREAM,0);
after I successfully connect to server,I use send function to send data.
I use default buffer and i get default value is 8192. and i don't set s to nonblocking. as following is my code fragment:
char buf[100*1024]={0};
memset(buf,0x08,sizeof(buf));
int nRet = send(s,buf,sizeof(buf),0);
but this function successfully complete. according to my understand,this function should in blocking .
cys
|
|
|
|
|
my test environment is in LAN
|
|
|
|