This documentation is archived and is not being maintained.


Call this member function to create a gopher locator to find or identify a file on a gopher server.

CGopherLocator CreateLocator(
   LPCTSTR pstrDisplayString,
   LPCTSTR pstrSelectorString,
   DWORD dwGopherType 
static CGopherLocator CreateLocator(
   LPCTSTR pstrLocator 
static CGopherLocator CreateLocator(
   LPCTSTR pstrServerName,
   LPCTSTR pstrDisplayString,
   LPCTSTR pstrSelectorString,
   DWORD dwGopherType,



A pointer to a string containing the name of the gopher document or directory to be retrieved. If the pstrDisplayString parameter is NULL, the default directory for the gopher server is returned.


A pointer to the selector string to be sent to the gopher server in order to retrieve an item. pstrSelectorString can be NULL.


This specifies whether pstrSelectorString refers to a directory or document, and whether the request is gopher or gopher+. See the attributes for the structure GOPHER_FIND_DATA in the Platform SDK.


A pointer to a string identifying the file to open. Generally, this string is returned from a call to CGopherFileFind::GetLocator.


A pointer to a string containing the gopher server name.


The number identifying the Internet port for this connection.

The static version of the member function requires you to specify a server, while the non-static version uses the server name from the connection object.

In order to retrieve information from a gopher server, an application must first get a gopher locator. The application must then treat the locator as an opaque token (that is, the application can use the locator but not directly manipulate or compare it). Normally, the application uses the locator for calls to the CGopherFileFind::FindFile member function to retrieve a specific piece of information.