ファイルまたはモニカー オブジェクトを開きます。
virtual BOOL Open(
LPCTSTR lpszURL,
CFileException* pError = NULL
);
virtual BOOL Open(
IMoniker* pMoniker,
CFileException* pError = NULL
);
パラメーター
lpszURL
開くファイルの URL またはファイル名。pError
ファイル例外へのポインター。 エラーが発生した場合は、原因が設定されます。pMoniker
ストリームを取得するために使用されるモニカー インターフェイス IMoniker へのポインター。
戻り値
正常終了した場合は 0 以外を返します。それ以外の場合は 0 を返します。
解説
lpszURL パラメーターは Macintosh 上では使用できません。 Macintosh 上で使用できるのは、Open の pMoniker だけです。
lpszURL パラメーターには URL またはファイル名を使用できます。 次に例を示します
CMyMoniker* pMyMoniker = new CMyMoniker();
pMyMoniker->Open(_T("https://www.microsoft.com"));
または
CMyMoniker* pMyMoniker = new CMyMoniker();
pMyMoniker->Open(_T("file:c:\\mydata.dat"));
必要条件
**ヘッダー:**afxole.h