IPersistFileFormat::Load Method (String^, UInt32, Int32)
Visual Studio 2015
Opens a specified file and initializes an object from the file contents.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- pszFilename
-
Type:
System::String^
[in] Pointer to the name of the file to load, which, for an existing file, should always include the full path.
- grfMode
-
Type:
System::UInt32
[in] File format mode. If zero, the object uses the usual defaults as if the user had opened the file.
- fReadOnly
-
Type:
System::Int32
[in] true indicates that the file should be opened as read-only.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From fpstfmt.idl:
HRESULT IPersistFileFormat::Load( [in] LPCOLESTR pszFilename, [in] DWORD grfMode, [in] BOOL fReadOnly );
The IPersistFileFormat.Load method can return STG_E_INVALIDCODEPAGE or STG_S_DATALOSS.
Show: