Shell32PathYetAnotherMakeUniqueName Method
Creates a unique filename based on an existing filename.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("Shell32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ExactSpelling := true, ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function PathYetAnotherMakeUniqueName (
uniqueName As StringBuilder,
path As String,
shortName As String,
fileSpec As String
) As Boolean
Dim uniqueName As StringBuilder
Dim path As String
Dim shortName As String
Dim fileSpec As String
Dim returnValue As Boolean
returnValue = Shell32.PathYetAnotherMakeUniqueName(uniqueName,
path, shortName, fileSpec)
public:
[DllImportAttribute(L"Shell32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ExactSpelling = true, ThrowOnUnmappableChar = true, SetLastError = true)]
static bool PathYetAnotherMakeUniqueName(
StringBuilder^ uniqueName,
String^ path,
String^ shortName,
String^ fileSpec
)
[<DllImportAttribute("Shell32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ExactSpelling = true, ThrowOnUnmappableChar = true, SetLastError = true)>]
static member PathYetAnotherMakeUniqueName :
uniqueName : StringBuilder *
path : string *
shortName : string *
fileSpec : string -> bool
No code example is currently available or this language may not be supported.
- 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.
Boolean
Returns
if a unique name was successfully created;
otherwise
.