MIGetContentType() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
ft:locale
en-US
Product name
MapBasic
ft:title
MapInfo MapBasic Reference
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:32:32.686000

Purpose

Gets the content type of the file.

Syntax

MIGetContentType( ByVal hFile As CHttpFile, pBuffer As String,
	pBufferLength As Integer As SmallInt

hFile is a CHttpFile handle.

pBuffer is a reference to a string that receives the content type.

pBufferLength is a reference to an integer that contains the length of pBuffer in number of characters or bytes on entry. When the function succeeds (a string is written to pBuffer), it contains the length of the string in characters, minus 1 for the terminating NULL character.

Return Value

Nonzero if successful; otherwise 0. To determine the cause of the failure, call the MIGetErrorMessage() function.

Description

Use MIGetContentType() to get the content type of the file in string format. For example, written value in pBuffer could be "image/jpeg" or "text/html".