Поделиться через


CMonikerFile::Open

Call this member function to open a file or moniker object.

virtual BOOL Open(
   LPCTSTR lpszURL,
   CFileException* pError = NULL 
);
virtual BOOL Open(
   IMoniker* pMoniker,
   CFileException* pError = NULL 
);

Параметры

  • lpszURL
    A URL or filename of the file to be opened.

  • pError
    A pointer to a file exception. In the event of an error, it will be set to the cause.

  • pMoniker
    A pointer to the moniker interface IMoniker to be used to obtain a stream.

Возвращаемое значение

Nonzero if successful; otherwise 0.

Заметки

The lpszURL parameter cannot be used on a Macintosh. Only the pMoniker form of Open can be used on a Macintosh.

You can use a URL or a filename for the lpszURL parameter. For example:

CMyMoniker* pMyMoniker = new CMyMoniker();
pMyMoniker->Open(_T("https://www.microsoft.com"));

 – or – 

CMyMoniker* pMyMoniker = new CMyMoniker();
pMyMoniker->Open(_T("file:c:\\mydata.dat"));

Требования

Header: afxole.h

См. также

Основные понятия

CMonikerFile Class

CMonikerFile Members

Hierarchy Chart

CMonikerFile::CMonikerFile

CAsyncMonikerFile::Open