IVsPersistDocData2::SetUntitledDocPath Method (String^)

 

Sets the initial name (or path) for unsaved, newly created document data.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int SetUntitledDocPath(
	String^ pszDocDataPath
)

Parameters

pszDocDataPath
Type: System::String^

[in] String indicating the path of the document. Most editors can ignore this parameter. It exists for historical reasons.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell.idl:

HRESULT IVsPersistDocData2::SetUntitledDocPath(
   [in] LPCOLESTR pszDocDataPath
);

SetUntitledDocPath is called by all projects after a new document instance is created.

Editors use the same CreateInstance/InitNew design pattern of standard COM objects.

Editors can use this method to perform one-time initializations that are required after a new document instance was created through a call to CreateEditorInstance with a parameter of CEF_CLONEFILE.

Return to top
Show: