IPersistFileFormat.InitNew Method
Instructs the object to initialize itself in the untitled state.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Déclaration
Function InitNew ( _
nFormatIndex As UInteger _
) As Integer
'Utilisation
Dim instance As IPersistFileFormat
Dim nFormatIndex As UInteger
Dim returnValue As Integer
returnValue = instance.InitNew(nFormatIndex)
int InitNew(
uint nFormatIndex
)
int InitNew(
[InAttribute] unsigned int nFormatIndex
)
abstract InitNew :
nFormatIndex:uint32 -> int
function InitNew(
nFormatIndex : uint
) : int
Parameters
- nFormatIndex
Type: System.UInt32
[in] Index value that indicates the current format of the file. The nFormatIndex parameter controls the beginning format of the file. The caller should pass DEF_FORMAT_INDEX if the object is to choose its default format. If this parameter is non-zero, then it is interpreted as the index into the list of formats, as returned by a call to GetFormatList. An index value of 0 indicates the first format, 1 the second format, and so on.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From fpstfmt.idl:
HRESULT IPersistFileFormat::InitNew(
[in] DWORD nFormatIndex
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.