[quote=引用 2 楼 stacksg 的回复:]
[quote=引用 1 楼 yudahai109 的回复:]
楼主,你的代码写的有问题呀,if(!bRequest) return false;????如果非真,应该直接结束程序吧,你这么多return false有什么用?非真,直接跳出程序,就知道哪一步错了。
看看微软给的例子
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384120(v=vs.85).aspx
貌似这句
char psPost[1024] = {0};
sprintf(psPost, "t=%&lhs_type=default&display=desktop&login_email=1626086788@qq.com&login_password=********&login_submit=1&login_submit_dummy=%E7%99%BB%E5%BD%95", this->m_sToken);
应该放在WinHttpSendRequest 这个函数之前,不能为0噢。
看看微软的解释
dwTotalLength [in]
An unsigned long integer value that contains the length, in bytes, of the total data sent. This parameter specifies the Content-Length header of the request. If the value of this parameter is greater than the length specified by dwOptionalLength, then WinHttpWriteData can be used to send additional data.
dwTotalLength must not change between calls to WinHttpSendRequest for the same request. If dwTotalLength needs to be changed, the caller should create a new request.
[quote=引用 1 楼 yudahai109 的回复:]
楼主,你的代码写的有问题呀,if(!bRequest) return false;????如果非真,应该直接结束程序吧,你这么多return false有什么用?非真,直接跳出程序,就知道哪一步错了。
看看微软给的例子
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384120(v=vs.85).aspx
貌似这句
char psPost[1024] = {0};
sprintf(psPost, "t=%&lhs_type=default&display=desktop&login_email=1626086788@qq.com&login_password=********&login_submit=1&login_submit_dummy=%E7%99%BB%E5%BD%95", this->m_sToken);
应该放在WinHttpSendRequest 这个函数之前,不能为0噢。
看看微软的解释
dwTotalLength [in]
An unsigned long integer value that contains the length, in bytes, of the total data sent. This parameter specifies the Content-Length header of the request. If the value of this parameter is greater than the length specified by dwOptionalLength, then WinHttpWriteData can be used to send additional data.
dwTotalLength must not change between calls to WinHttpSendRequest for the same request. If dwTotalLength needs to be changed, the caller should create a new request.
楼主,你的代码写的有问题呀,if(!bRequest) return false;????如果非真,应该直接结束程序吧,你这么多return false有什么用?非真,直接跳出程序,就知道哪一步错了。
看看微软给的例子
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384120(v=vs.85).aspx
貌似这句
char psPost[1024] = {0};
sprintf(psPost, "t=%&lhs_type=default&display=desktop&login_email=1626086788@qq.com&login_password=********&login_submit=1&login_submit_dummy=%E7%99%BB%E5%BD%95", this->m_sToken);
应该放在WinHttpSendRequest 这个函数之前,不能为0噢。
看看微软的解释
dwTotalLength [in]
An unsigned long integer value that contains the length, in bytes, of the total data sent. This parameter specifies the Content-Length header of the request. If the value of this parameter is greater than the length specified by dwOptionalLength, then WinHttpWriteData can be used to send additional data.
dwTotalLength must not change between calls to WinHttpSendRequest for the same request. If dwTotalLength needs to be changed, the caller should create a new request.
楼主,你的代码写的有问题呀,if(!bRequest) return false;????如果非真,应该直接结束程序吧,你这么多return false有什么用?非真,直接跳出程序,就知道哪一步错了。
看看微软给的例子
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384120(v=vs.85).aspx
貌似这句
char psPost[1024] = {0};
sprintf(psPost, "t=%&lhs_type=default&display=desktop&login_email=1626086788@qq.com&login_password=********&login_submit=1&login_submit_dummy=%E7%99%BB%E5%BD%95", this->m_sToken);
应该放在WinHttpSendRequest 这个函数之前,不能为0噢。
看看微软的解释
dwTotalLength [in]
An unsigned long integer value that contains the length, in bytes, of the total data sent. This parameter specifies the Content-Length header of the request. If the value of this parameter is greater than the length specified by dwOptionalLength, then WinHttpWriteData can be used to send additional data.
dwTotalLength must not change between calls to WinHttpSendRequest for the same request. If dwTotalLength needs to be changed, the caller should create a new request.
楼主,你的代码写的有问题呀,if(!bRequest) return false;????如果非真,应该直接结束程序吧,你这么多return false有什么用?非真,直接跳出程序,就知道哪一步错了。
看看微软给的例子
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384120(v=vs.85).aspx
貌似这句
char psPost[1024] = {0};
sprintf(psPost, "t=%&lhs_type=default&display=desktop&login_email=1626086788@qq.com&login_password=********&login_submit=1&login_submit_dummy=%E7%99%BB%E5%BD%95", this->m_sToken);
应该放在WinHttpSendRequest 这个函数之前,不能为0噢。
看看微软的解释
dwTotalLength [in]
An unsigned long integer value that contains the length, in bytes, of the total data sent. This parameter specifies the Content-Length header of the request. If the value of this parameter is greater than the length specified by dwOptionalLength, then WinHttpWriteData can be used to send additional data.
dwTotalLength must not change between calls to WinHttpSendRequest for the same request. If dwTotalLength needs to be changed, the caller should create a new request.