GopherCreateLocatorGopherCreateLocator*
*Contents  *Index  *Topic Contents
*Previous Topic: GopherAttributeEnumerator
*Next Topic: GopherFindFirstFile

GopherCreateLocator

BOOL GopherCreateLocator(
    IN LPCSTR lpszHost,
    IN INTERNET_PORT nServerPort,
    IN LPCSTR lpszDisplayString,
    IN LPCSTR lpszSelectorString,
    IN DWORD dwGopherType,
    OUT LPCSTR lpszLocator,
    IN OUT LPDWORD lpdwBufferLength
);

Creates a Gopher or Gopher+ locator string from its component parts.

lpszHost
Address of a string that contains the name of the host, or a dotted-decimal IP address (such as 198.105.232.1).
nServerPort
Number of the port on which the Gopher server at lpszHost lives, in host byte order. If nServerPort is INTERNET_INVALID_PORT_NUMBER, the default Gopher port is read from the \etc\services file.
lpszDisplayString
Gopher document or directory to be displayed. If this parameter is NULL, the function returns the default directory for the Gopher server.
lpszSelectorString
Address of the selector string to send to the Gopher server in order to retrieve information. This parameter can be NULL.
dwGopherType
Value that specifies whether lpszSelectorString refers to a directory or document, and whether the request is Gopher+ or Gopher. The default value, GOPHER_TYPE_DIRECTORY, is used if the value of dwGopherType is zero. Can be one of the following values:
GOPHER_TYPE_ASK Ask+ item.
GOPHER_TYPE_BINARY Binary file.
GOPHER_TYPE_BITMAP Bitmap file.
GOPHER_TYPE_CALENDAR Calendar file.
GOPHER_TYPE_CSO CSO telephone book server.
GOPHER_TYPE_DIRECTORY Directory of additional Gopher items.
GOPHER_TYPE_DOS_ARCHIVE MS-DOS® archive file.
GOPHER_TYPE_ERROR Indicator of an error condition.
GOPHER_TYPE_GIF GIF graphics file.
GOPHER_TYPE_GOPHER_PLUS Gopher+ item.
GOPHER_TYPE_HTML HTML document.
GOPHER_TYPE_IMAGE Image file.
GOPHER_TYPE_INDEX_SERVER Index server.
GOPHER_TYPE_INLINE Inline file.
GOPHER_TYPE_MAC_BINHEX Macintosh file in BINHEX format.
GOPHER_TYPE_MOVIE Movie file.
GOPHER_TYPE_PDF PDF file.
GOPHER_TYPE_REDUNDANT Indicator of a duplicated server. The information contained within is a duplicate of the primary server. The primary server is defined as the last directory entry that did not have a GOPHER_TYPE_REDUNDANT type.
GOPHER_TYPE_SOUND Sound file.
GOPHER_TYPE_TELNET Telnet server.
GOPHER_TYPE_TEXT_FILE ASCII text file.
GOPHER_TYPE_TN3270 TN3270 server.
GOPHER_TYPE_UNIX_UUENCODED UUENCODED file.
GOPHER_TYPE_UNKNOWN Item type is unknown.
lpszLocator
Address of a buffer that receives the locator string. If lpszLocator is NULL, lpdwBufferLength receives the needed buffer length, but the function performs no other processing.
lpdwBufferLength
Length of the lpszLocator buffer. When the function returns, this parameter receives the number of bytes written to the lpszLocator buffer. If GetLastError returns ERROR_INSUFFICIENT_BUFFER, this parameter receives the number of bytes required to form the locator successfully.

To retrieve information from a Gopher server, an application must first get a Gopher "locator" from the Gopher server.

The locator, which the application should treat as an opaque token, is normally used for calls to the GopherFindFirstFile function to retrieve a specific piece of information.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.