Shell32PathYetAnotherMakeUniqueName Method

Creates a unique filename based on an existing filename.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ExactSpelling = true, ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PathYetAnotherMakeUniqueName(
	StringBuilder uniqueName,
	string path,
	string shortName,
	string fileSpec
)

Parameters

uniqueName  StringBuilder
A string buffer that receives a null-terminated Unicode string that contains the fully qualified path of the unique file name.

This buffer should be at least MAX_PATH characters long to avoid causing a buffer overrun.

path  String
A null-terminated Unicode string that contains the fully qualified path of folder that will contain the new file.

If shortName is set to NULL, this string must contain a full destination path, ending with the long file name that the new file name will be base on.

shortName  String
A null-terminated Unicode string that contains the short file name that the unique name will be based on.

Set this value to NULL to create a name based on the long file name.

fileSpec  String
A null-terminated Unicode string that contains the long file name that the unique name will be based on.

Return Value

Boolean
Returns if a unique name was successfully created; otherwise .

Remarks

See Also