问题描述
所以我正在尝试通过http连接与服务器异步连接。我在MSDN上找到了样本,但是我发生了奇怪的错误。
所以,就像在示例中,我使用InternetOpen与异步标志,我注册回调函数和openURL。
但是我的回调只用DWORD dwInternetStatus = 100调用一次,这意味着INTERNET_STATUS_REQUEST_COMPLETE,显然是LPINTERNET_ASYNC_RESULT(lpvStatusInfo) - > dwError!= ERROR_SUCCESS。
但是当我运行Microsoft Sample程序时,回调被调用大约20次,INTERNET_STATUS_REQUEST是最后一次。
我的来源:
Hi,
so I'm trying to connect asynchronously with server via http connection. I'm found samples on MSDN, but i've occured and strange error.
So, like in sample, I'm using InternetOpen with async flags, i register callback function and openURL.
But my callback is called only once with DWORD dwInternetStatus = 100, what means INTERNET_STATUS_REQUEST_COMPLETE, and obviously
LPINTERNET_ASYNC_RESULT(lpvStatusInfo)->dwError != ERROR_SUCCESS.
But when I run Microsoft Sample program, callback is called about 20 times, and INTERNET_STATUS_REQUEST is the last one.
My sources:
推荐答案
这篇关于异步连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!