Re: Solved
- From: shrikant.gurav11@xxxxxxxxx
- Date: Sun, 17 Feb 2008 23:18:58 -0800 (PST)
On Feb 12, 6:53 pm, shrikant.gura...@xxxxxxxxx wrote:
On Feb 9, 4:06 am, jonathannah <jonathan...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
See use of WinHTTPAddRequestHeaders below.
Thanks.
HINTERNET hSession = WinHttpOpen
(
L"Example Program", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0
);
HINTERNET hConnect = WinHttpConnect
(
hSession, L"MyHHTPServer.com", INTERNET_DEFAULT_HTTP_PORT, 0
);
HINTERNET hCurRequest = WinHttpOpenRequest
(
hConnect, L"GET", L"/files/MyFile",
NULL, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES,
WINHTTP_FLAG_REFRESH
);
bResults = WinHttpAddRequestHeaders // May be Not required
(
hCurRequest,
L"Range:bytes=1024-2048",
-1,
WINHTTP_ADDREQ_FLAG_ADD
);
bResults = WinHttpSendRequest
(
hCurRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0,
WINHTTP_NO_REQUEST_DATA, 0, 0, 0
);
WinHttpReceiveResponse( hCurRequest, NULL);
//**********************************
Use following code.
sHeaders.Format(_T("Range: bytes=%I64u-%I64u\r
\n"),dwStartPos,dwEndPos);
::WinHttpSendRequest(m_hHttpFile, sHeaders.GetLength() ?
T2W(const_cast<LPTSTR>(sHeaders.operator LPCTSTR())) : NULL,
sHeaders.GetLength(), NULL, 0, 0, dwContextValue);
//*********************************- Hide quoted text -
- Show quoted text -
Plz tell how u solved ... for my knowllllagge...
Thanks..
.
- References:
- Solved
- From: jonathannah
- Re: Solved
- From: shrikant . gurav11
- Solved
- Prev by Date: Re: forwarding network traffic
- Next by Date: Re: forwarding network traffic
- Previous by thread: Re: Solved
- Next by thread: Per process share access?
- Index(es):