GopherGetAttribute function

[The GopherGetAttribute function is available for use in the operating systems specified in the Requirements section.]

Retrieves the specific attribute information from the server.


BOOL GopherGetAttribute(
  _In_  HINTERNET                   hConnect,
  _In_  LPCTSTR                     lpszLocator,
  _In_  LPCTSTR                     lpszAttributeName,
  _Out_ LPBYTE                      lpBuffer,
  _In_  DWORD                       dwBufferLength,
  _Out_ LPDWORD                     lpdwCharactersReturned,
  _In_  DWORD_PTR                   dwContext


hConnect [in]

Handle to a Gopher session returned by InternetConnect.

lpszLocator [in]

Pointer to a null-terminated string that identifies the item at the Gopher server on which to return attribute information.

lpszAttributeName [in]

Pointer to a space-delimited string specifying the names of attributes to return. If lpszAttributeName is NULL, GopherGetAttribute returns information about all attributes.

lpBuffer [out]

Pointer to an application-defined buffer from which attribute information is retrieved.

dwBufferLength [in]

Size of the lpBuffer buffer, in TCHARs.

lpdwCharactersReturned [out]

Pointer to a variable that contains the number of characters read into the lpBuffer buffer.

lpfnEnumerator [in]

Pointer to a GopherAttributeEnumerator callback function that enumerates each attribute of the locator. This parameter is optional. If it is NULL, all Gopher attribute information is placed into lpBuffer. If lpfnEnumerator is specified, the callback function is called once for each attribute of the object.

The callback function receives the address of a single GOPHER_ATTRIBUTE_TYPE structure with each call. The enumeration callback function allows the application to avoid having to parse the Gopher attribute information.

dwContext [in]

Application-defined value that associates this operation with any application data.

Return value

Returns TRUE if the request is satisfied, or FALSE otherwise. To get extended error information, call GetLastError or InternetGetLastResponseInfo.


Generally, applications call this function after calling GopherFindFirstFile or InternetFindNextFile.

The size of the lpBuffer parameter must be equal to or greater than the value of MIN_GOPHER_ATTRIBUTE_LENGTH.

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.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).


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







Unicode and ANSI names

GopherGetAttributeW (Unicode) and GopherGetAttributeA (ANSI)

See also

WinINet Functions