Shell32PathMakeUniqueName Method
Creates a unique path name from a template.
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 PathMakeUniqueName(
StringBuilder uniqueName,
uint uniqueNameMax,
string shortTemplate,
string longTemplate,
string dir
)
<DllImportAttribute("Shell32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ExactSpelling := true, ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function PathMakeUniqueName (
uniqueName As StringBuilder,
uniqueNameMax As UInteger,
shortTemplate As String,
longTemplate As String,
dir As String
) As Boolean
Dim uniqueName As StringBuilder
Dim uniqueNameMax As UInteger
Dim shortTemplate As String
Dim longTemplate As String
Dim dir As String
Dim returnValue As Boolean
returnValue = Shell32.PathMakeUniqueName(uniqueName,
uniqueNameMax, shortTemplate, longTemplate,
dir)
public:
[DllImportAttribute(L"Shell32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ExactSpelling = true, ThrowOnUnmappableChar = true, SetLastError = true)]
static bool PathMakeUniqueName(
StringBuilder^ uniqueName,
unsigned int uniqueNameMax,
String^ shortTemplate,
String^ longTemplate,
String^ dir
)
[<DllImportAttribute("Shell32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ExactSpelling = true, ThrowOnUnmappableChar = true, SetLastError = true)>]
static member PathMakeUniqueName :
uniqueName : StringBuilder *
uniqueNameMax : uint32 *
shortTemplate : string *
longTemplate : string *
dir : string -> bool
No code example is currently available or this language may not be supported.
- uniqueName StringBuilder
-
A buffer that receives a null-terminated Unicode string that contains the unique path name.
It should be at least MAX_PATH characters in length.
- uniqueNameMax UInt32
-
The number of characters in the buffer pointed to by uniqueName.
- shortTemplate String
-
A null-terminated Unicode string that contains a template that is used to construct the unique name.
This template is used for drives that require file names with the 8.3 format.
This string should be no more than MAX_PATH characters in length, including the terminating null character.
- longTemplate String
-
A null-terminated Unicode string that contains a template that is used to construct the unique name.
This template is used for drives that support long file names.
This string should be no more than MAX_PATH characters in length, including the terminating null character.
- dir String
-
A null-terminated string that contains the directory in which the new file resides.
This string should be no more than MAX_PATH characters in length, including the terminating null character.
Boolean
Returns
if successful; otherwise,
.