GopherFindFirstFile function
[The GopherFindFirstFile function is available for use in the operating systems specified in the Requirements section.]
Uses a Gopher locator and search criteria to create a session with the server and locate the requested documents, binary files, index servers, or directory trees.
Syntax
HINTERNET GopherFindFirstFile( _In_ HINTERNET hConnect, _In_ LPCTSTR lpszLocator, _In_ LPCTSTR lpszSearchString, _Out_ LPGOPHER_FIND_DATA lpFindData, _In_ DWORD dwFlags, _In_ DWORD_PTR dwContext );
Parameters
- hConnect [in]
-
Handle to a Gopher session returned by InternetConnect.
- lpszLocator [in]
-
Pointer to a null-terminated string that contains the name of the item to locate. This can be one of the following:
- Gopher locator returned by a previous call to this function or the InternetFindNextFile function.
- NULL pointer or empty string indicating that the topmost information from a Gopher server is being returned.
- Locator created by the GopherCreateLocator function.
- lpszSearchString [in]
-
Pointer to a buffer that contains the strings to search, if this request is to an index server. Otherwise, this parameter should be NULL.
- lpFindData [out]
-
Pointer to a GOPHER_FIND_DATA structure that receives the information retrieved by this function.
- dwFlags [in]
-
Controls the function behavior. This parameter can be a combination of the following values.
Value Meaning - INTERNET_FLAG_HYPERLINK
Forces a reload if there was no Expires time and no LastModified time returned from the server when determining whether to reload the item from the network.
- INTERNET_FLAG_NEED_FILE
Causes a temporary file to be created if the file cannot be cached.
- INTERNET_FLAG_NO_CACHE_WRITE
Does not add the returned entity to the cache.
- INTERNET_FLAG_RELOAD
Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
- INTERNET_FLAG_RESYNCHRONIZE
Reloads HTTP resources if the resource has been modified since the last time it was downloaded. All FTP and Gopher resources are reloaded.
- dwContext [in]
-
Pointer to a variable that contains the application-defined value that associates this search with any application data.
Return value
Returns a valid search handle if successful, or NULL otherwise. To retrieve extended error information, call GetLastError or InternetGetLastResponseInfo.
Remarks
GopherFindFirstFile closely resembles the FindFirstFile function. It creates a connection with a Gopher server, and then returns a single structure containing information about the first Gopher object referenced by the locator string.
After calling GopherFindFirstFile to retrieve the first Gopher object in an enumeration, an application can use the InternetFindNextFile function to retrieve subsequent Gopher objects.
After the calling application has finished using the HINTERNET handle returned by GopherFindFirstFile, it must be closed using the InternetCloseHandle function.
Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
End of client support |
Windows XP |
|
End of server support |
Windows Server 2003 R2 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
GopherFindFirstFileW (Unicode) and GopherFindFirstFileA (ANSI) |
See also