|
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
namespace System.Com
{
[Guid("00000109-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.106+a37a0b4b70")]
internal interface IPersistStream
:winmdroot.System.Com.IPersist {
unsafe new void GetClassID(global::System.Guid* pClassID);
/// <summary>Determines whether an object has changed since it was last saved to its stream. (IPersistStream.IsDirty)</summary>
/// <returns>This method returns S_OK to indicate that the object has changed. Otherwise, it returns S_FALSE.</returns>
/// <remarks>
/// <para>Use this method to determine whether an object should be saved before closing it. The dirty flag for an object is conditionally cleared in the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ipersiststream-save">IPersistStream::Save</a> method. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> You should treat any error return codes as an indication that the object has changed. Unless this method explicitly returns S_FALSE, assume that the object must be saved. Note that the OLE-provided implementations of the <b>IPersistStream::IsDirty</b> method in the OLE-provided moniker interfaces always return S_FALSE because their internal state never changes.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ipersiststream-isdirty#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
[PreserveSig()]
winmdroot.Foundation.HRESULT IsDirty();
/// <summary>Initializes an object from the stream where it was saved previously. (IPersistStream.Load)</summary>
/// <param name="pStm">An <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-istream">IStream</a> pointer to the stream from which the object should be loaded.</param>
/// <returns>
/// <para>This method can return the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>This method loads an object from its associated stream. The seek pointer is set as it was in the most recent <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ipersiststream-save">IPersistStream::Save</a> method. This method can seek and read from the stream, but cannot write to it. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> Rather than calling <b>IPersistStream::Load</b> directly, you typically call the <a href="https://docs.microsoft.com/windows/desktop/api/ole/nf-ole-oleloadfromstream">OleLoadFromStream</a> function does the following: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ipersiststream-load#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
void Load(winmdroot.System.Com.IStream pStm);
/// <summary>Saves an object to the specified stream. (IPersistStream.Save)</summary>
/// <param name="pStm">An <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-istream">IStream</a> pointer to the stream into which the object should be saved.</param>
/// <param name="fClearDirty">Indicates whether to clear the dirty flag after the save is complete. If <b>TRUE</b>, the flag should be cleared. If <b>FALSE</b>, the flag should be left unchanged.</param>
/// <returns>
/// <para>This method can return the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><b>IPersistStream::Save</b> saves an object into the specified stream and indicates whether the object should reset its dirty flag. The seek pointer is positioned at the location in the stream at which the object should begin writing its data. The object calls the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-isequentialstream-write">ISequentialStream::Write</a> method to write its data. On exit, the seek pointer must be positioned immediately past the object data. The position of the seek pointer is undefined if an error returns. <h3><a id="Notes_to_Callers"></a><a id="notes_to_callers"></a><a id="NOTES_TO_CALLERS"></a>Notes to Callers</h3> Rather than calling <b>IPersistStream::Save</b> directly, you typically call the <a href="https://docs.microsoft.com/windows/desktop/api/ole/nf-ole-olesavetostream">OleSaveToStream</a> helper function which does the following: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ipersiststream-save#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
void Save(winmdroot.System.Com.IStream pStm, winmdroot.Foundation.BOOL fClearDirty);
/// <summary>Retrieves the size of the stream needed to save the object. (IPersistStream.GetSizeMax)</summary>
/// <param name="pcbSize">The size in bytes of the stream needed to save this object, in bytes.</param>
/// <returns>This method returns S_OK to indicate that the size was retrieved successfully.</returns>
/// <remarks>
/// <para>This method returns the size needed to save an object. You can call this method to determine the size and set the necessary buffers before calling the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ipersiststream-save">IPersistStream::Save</a> method. <h3><a id="Notes_to_Implementers"></a><a id="notes_to_implementers"></a><a id="NOTES_TO_IMPLEMENTERS"></a>Notes to Implementers</h3> The <b>GetSizeMax</b> implementation should return a conservative estimate of the necessary size because the caller might call the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ipersiststream-save">IPersistStream::Save</a> method with a non-growable stream. <h3><a id="URL_Moniker_Notes"></a><a id="url_moniker_notes"></a><a id="URL_MONIKER_NOTES"></a>URL Moniker Notes</h3> This method retrieves the maximum number of bytes in the stream that will be required by a subsequent call to <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-ipersiststream-save">IPersistStream::Save</a>. This value is sizeof(ULONG)==4 plus sizeof(WCHAR)*n where n is the length of the full or partial URL string, including the NULL terminator.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ipersiststream-getsizemax#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
void GetSizeMax(out ulong pcbSize);
}
}
}
|