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.

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("ShlwApi.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PathIsContentType(
	string path,
	string contentType
)

Parameters

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.

Return Value

Boolean
Returns if the file's registered content type matches contentType, or otherwise.

Remarks

See Also