GopherGetAttributeA function (wininet.h)

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

Retrieves the specific attribute information from the server.

Syntax

BOOL GopherGetAttributeA(
  [in]  HINTERNET                   hConnect,
  [in]  LPCSTR                      lpszLocator,
  [in]  LPCSTR                      lpszAttributeName,
  [out] LPBYTE                      lpBuffer,
  [in]  DWORD                       dwBufferLength,
  [out] LPDWORD                     lpdwCharactersReturned,
  [in]  GOPHER_ATTRIBUTE_ENUMERATOR lpfnEnumerator,
  [in]  DWORD_PTR                   dwContext
);

Parameters

[in] hConnect

Handle to a Gopher session returned by InternetConnect.

[in] lpszLocator

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

[in] lpszAttributeName

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

[out] lpBuffer

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

[in] dwBufferLength

Size of the lpBuffer buffer, in TCHARs.

[out] lpdwCharactersReturned

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

[in] lpfnEnumerator

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.

[in] dwContext

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.

Remarks

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

Note

The wininet.h header defines GopherGetAttribute as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wininet.h
Library Wininet.lib
DLL Wininet.dll

See also

WinINet Functions