|
请教高手smartphone 5.0中网络通讯程序出现12029错误如何调试,多谢!
[复制链接]
是visual 2005环境 smartphone 5.0
hConnect = InternetConnect( hOpen,HostName, uc.nPort, NULL, NULL, INTERNET_SERVICE_HTTP, INTERNET_FLAG_NO_CACHE_WRITE, 0);
if(!hConnect)
{
return g_Buffer = NULL;
}
//------------------------
//连接一个http url地址结束
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
//打开请求
//--------
LPTSTR AcceptTypes[2] = {TEXT("*/*"), NULL};
OpenRequest = HttpOpenRequest(hConnect, _T("POST"), FileName, NULL, NULL, (LPCTSTR*)AcceptTypes, INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, 0);
if( !OpenRequest )
{
return g_Buffer = NULL;
}
BOOL sendRet = HttpSendRequest(OpenRequest, WCHeaders, wcslen(WCHeaders), pDataBuffer, ( sizeof(PacketHead)+sizeof(MPAskData) - 1));
DWORD DLastErr = GetLastError();
返回错误12029察看参数并没有发现什么错误,而且这段程序在MFC(非wince环境)下是没有问题的。
|
|