|
-
March 25th, 2003, 01:36 PM
#1
InternetQueryOption and InternetSetOption
I try to set internet option of
INTERNET_OPTION_RECEIVE_TIMEOUT by following code.
it return error code 12010.
I think that it maybe the handle is not the right type of handle .And try another handle return by InternetOpenUrl but failed also.
And I tried INTERNET_OPTION_CONNECT_TIMEOUT also but failed.
both handle is right.
thank you .
m_hSession = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
char szTimeout[10];
memset(szTimeout,0,10);
DWORD dwSize=10;
BOOL bSetInternetOption ;
bSetInternetOption = InternetQueryOption(m_hSession,INTERNET_OPTION_CONNECT_TIMEOUT ,szTimeout,&dwSize);
long lTimeout = atol(szTimeout);
memset(szTimeout,0,10);
memcpy(szTimeout,"3000",5);
bSetInternetOption = InternetSetOption(m_hSession,INTERNET_OPTION_CONNECT_TIMEOUT ,szTimeout,5);
strTimeout.Format("%d,%d,%x",bSetInternetOption,GetLastError(),GetLastError());
bSetInternetOption = InternetQueryOption(m_hSession,INTERNET_OPTION_CONNECT_TIMEOUT ,szTimeout,&dwSize);
lTimeout = atol(szTimeout);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|