IVsPersistDocData2::SetUntitledDocPath Method (String^)
Visual Studio 2015
Sets the initial name (or path) for unsaved, newly created document data.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
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::Int32If 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.
Show: