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
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. |
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