IPersistFileFormat.Load(String, UInt32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Opens a specified file and initializes an object from the file contents.
public:
int Load(System::String ^ pszFilename, System::UInt32 grfMode, int fReadOnly);
public:
int Load(Platform::String ^ pszFilename, unsigned int grfMode, int fReadOnly);
int Load(std::wstring const & pszFilename, unsigned int grfMode, int fReadOnly);
public int Load (string pszFilename, uint grfMode, int fReadOnly);
abstract member Load : string * uint32 * int -> int
Public Function Load (pszFilename As String, grfMode As UInteger, fReadOnly As Integer) As Integer
Parameters
- pszFilename
- String
[in] Pointer to the name of the file to load, which, for an existing file, should always include the full path.
- grfMode
- UInt32
[in] File format mode. If zero, the object uses the usual defaults as if the user had opened the file.
- fReadOnly
- Int32
[in] true
indicates that the file should be opened as read-only.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
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.