Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PathIsContentType

PathIsContentType function

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 pszContentType. The comparison is not case-sensitive.

Syntax


BOOL PathIsContentType(
  _In_ LPCTSTR pszPath,
  _In_ LPCTSTR pszContentType
);

Parameters

pszPath [in]

Type: LPCTSTR

A pointer to a null-terminated string of maximum length MAX_PATH that contains the file whose content type will be compared.

pszContentType [in]

Type: LPCTSTR

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

Type: BOOL

Returns nonzero if the file's registered content type matches pszContentType, or zero otherwise.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 4.71 or later)

Unicode and ANSI names

PathIsContentTypeW (Unicode) and PathIsContentTypeA (ANSI)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft