Compartilhar via


IVsPersistDocData.SetUntitledDocPath(String) Method

Definition

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

public:
 int SetUntitledDocPath(System::String ^ pszDocDataPath);
public:
 int SetUntitledDocPath(Platform::String ^ pszDocDataPath);
int SetUntitledDocPath(std::wstring const & pszDocDataPath);
public int SetUntitledDocPath (string pszDocDataPath);
abstract member SetUntitledDocPath : string -> int
Public Function SetUntitledDocPath (pszDocDataPath As String) As Integer

Parameters

pszDocDataPath
String

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

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsPersistDocData::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.

Applies to