Skip to content

Latest commit

 

History

History
106 lines (71 loc) · 3.42 KB

cgopherfile-class.md

File metadata and controls

106 lines (71 loc) · 3.42 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CGopherFile Class
CGopherFile Class
11/04/2016
CGopherFile
AFXINET/CGopherFile
AFXINET/CGopherFile::CGopherFile
CGopherFile [MFC], CGopherFile
3ca9898f-8cdb-4495-bbde-46d40100feda

CGopherFile Class

Provides the functionality to find and read files on a gopher server.

Note

The classes CGopherConnection, CGopherFile, CGopherFileFind, CGopherLocator and their members have been deprecated because they do not work on the Windows XP platform, but they will continue to work on earlier platforms.

Syntax

class CGopherFile : public CInternetFile

Members

Protected Constructors

Name Description
CGopherFile::CGopherFile Constructs a CGopherFile object.

Remarks

The gopher service does not allow users to write data to a gopher file because this service functions mainly as a menu-driven interface for finding information. The CGopherFile member functions Write, WriteString, and Flush are not implemented for CGopherFile. Calling these functions on a CGopherFile object, returns a CNotSupportedException.

To learn more about how CGopherFile works with the other MFC Internet classes, see the article Internet Programming with WinInet.

Inheritance Hierarchy

CObject

CFile

CStdioFile

CInternetFile

CGopherFile

Requirements

Header: afxinet.h

CGopherFile::CGopherFile

This member function is called to construct a CGopherFile object.

CGopherFile(
    HINTERNET hFile,
    CGopherLocator& refLocator,
    CGopherConnection* pConnection);

CGopherFile(
    HINTERNET hFile,
    HINTERNET hSession,
    LPCTSTR pstrLocator,
    DWORD dwLocLen,
    DWORD_PTR dwContext);

Parameters

hFile
A handle to an HINTERNET file.

refLocator
A reference to a CGopherLocator object.

pConnection
A pointer to a CGopherConnection object.

hSession
A handle to the current Internet session.

pstrLocator
A pointer to a string used to locate the gopher server. See Gopher Sessions for more information about gopher locators.

dwLocLen
A DWORD containing the number of bytes in pstrLocator.

dwContext
A pointer to the context identifier of the file being opened.

Remarks

You need a CGopherFile object to read from a file during a gopher Internet session.

You never create a CGopherFile object directly. Instead, call CGopherConnection::OpenFile to open a file on a gopher server.

See also

CInternetFile Class
Hierarchy Chart
CInternetFile Class
CGopherLocator Class
CGopherFileFind Class
CGopherConnection Class