ShlwApiPathIsContentType Method
Determines if a file's registered content type matches the specified content type.
This function obtains the content type for the specified file type
and compares that string with the
contentType.
The comparison is not case-sensitive.
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("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PathIsContentType(
string path,
string contentType
)
<DllImportAttribute("ShlwApi.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function PathIsContentType (
path As String,
contentType As String
) As Boolean
Dim path As String
Dim contentType As String
Dim returnValue As Boolean
returnValue = ShlwApi.PathIsContentType(path,
contentType)
public:
[DllImportAttribute(L"ShlwApi.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool PathIsContentType(
String^ path,
String^ contentType
)
[<DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member PathIsContentType :
path : string *
contentType : string -> bool
No code example is currently available or this language may not be supported.
- path String
-
A pointer to a null-terminated string of maximum length MAX_PATH that contains the file whose content type will be compared.
- contentType String
-
The address of a character buffer that contains the null-terminated content type string to which the
file's registered content type will be compared.
Boolean
Returns
if the file's registered content type matches
contentType,
or
otherwise.