CGopherConnection::OpenFile

调用此成员函数打开在地鼠服务器的文件。

CGopherFile* OpenFile( 
   CGopherLocator& refLocator, 
   DWORD dwFlags = 0, 
   LPCTSTR pstrView = NULL, 
   DWORD_PTR dwContext = 1  
);

参数

  • refLocator
    CGopherLocator 对象的引用。

  • dwFlags
    INTERNET_FLAG_*标志的任意组合。 有关INTERNET_FLAG_*标志的详细信息,请参见 CInternetSession::OpenUrl

  • pstrView
    对文件视图字符串的指针。 如果文件的多种视图存在服务器,此参数指定打开的哪个文件的视图。 如果 pstrView 是 NULL,使用默认文件的视图。

  • dwContext
    已打开的文件的上下文ID。 请参见 Remarks 有关 dwContext的更多信息。

返回值

对要打开的 CGopherFile 对象的指针。

备注

重写 dwContext 默认设置上下文标识符到您选择的值。 上下文标识符与其 CInternetSession 对象创建的 CGopherConnection 对象的此特定操作。 该值在它标识的操作返回到 CInternetSession::OnStatusCallback 提供状态。 参见中的文章 Internet第一步:WinInet 有关上下文标识符的更多信息。

要求

Header: afxinet.h

请参见

参考

CGopherConnection Class

层次结构图

CFtpConnection Class

CHttpConnection Class

CInternetConnection Class

CGopherFile Class

CGopherLocator Class

CInternetSession Class