IVsProject4::GenerateUniqueItemName Method (UInt32, String^, String^, String^)

 

Generates a unique document name for a given item.

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

int GenerateUniqueItemName(
	unsigned int itemidLoc,
	String^ pszExt,
	String^ pszSuggestedRoot,
	[OutAttribute] String^% pbstrItemName
)

Parameters

itemidLoc
Type: System::UInt32

[in] Container folder for the unique item name being generated. Should be a valid item identifier. For further information, see VSITEMID. The value of this parameter is typically determined by the itemidLoc parameter that the project passes to the AddProjectItemDlg method.

pszExt
Type: System::String^

[in] File extension of the new document name.

pszSuggestedRoot
Type: System::String^

[in] If not null or empty, this value should be used as the base name for the item, and numbers should be appended to make the name unique. If supplied, the project should make up its own root name based on the pszExt file extension.

pbstrItemName
Type: System::String^

[out] Pointer to the new name, which contains the name only, not the item's file path.

Return Value

Type: System::Int32

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

Return to top
Show: