Microsoft Windows CE 3.0  

InternetSetFilePointer

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function sets a file position for InternetReadFile. This is a synchronous call; however, subsequent calls to InternetReadFilemight block or return pending if the data is not available from the cache and the server does not support random access.

DWORD InternetSetFilePointer (
HINTERNET
hFile
,
LONG
lDistanceToMove
,
PVOID
pReserved
,
DWORD
dwMoveMethod, 
DWORD
dwContext
);

Parameters

hFile
[in] Valid HINTERNEThandle returned from a previous call to InternetOpenUrl(on an HTTP or HTTPS URL) or HttpOpenRequest(using the GET or HEAD method and passed to HttpSendRequestor HttpSendRequestEx). This handle must not have been created with the INTERNET_FLAG_DONT_CACHE or INTERNET_FLAG_NO_CACHE_WRITE value set.
lDistanceToMove
[in] Long integer value that contains the number of bytes to move the file pointer. A positive value moves the pointer forward in the file; a negative value moves it backward.
pReserved
[in] Reserved. Must be set to NULL.
dwMoveMethod
[in] Unsigned long integer value that indicates the starting point for the file pointer move. Can be one of the following values:
Value Description
FILE_BEGIN Starting point is zero or the beginning of the file. If FILE_BEGIN is specified, lDistanceToMoveis interpreted as an unsigned location for the new file pointer.
FILE_CURRENT Current value of the file pointer is the starting point.
FILE_END Current end-of-file position is the starting point. This method fails if the content length is unknown.
dwContext

Reserved. Must be set to zero.

Return Values

Returns the current file position if the function succeeds, or –1 otherwise.

Remarks

This function cannot be used once the end of file has been reached by InternetReadFile.

For HINTERNEThandles created by HttpOpenRequestand sent by HttpSendRequestEx, a call to HttpEndRequestmust be made on the handle before this function is used.

This function cannot be used reliably if the content length is unknown, and with chunked transfers.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.12 and later Wininet.h   Wininet.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

HINTERNET, HttpEndRequest, HttpOpenRequest, HttpSendRequest, HttpSendRequestEx, InternetOpenUrl, InternetReadFile