MIGetContent() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Gets the content of the file.

Syntax

MIGetContent( ByVal hFile As CHttpFile )  As CString

hFile is a CHttpFile handle

Return Value

A handle to a CString object that contains the content of the file. If the call fails, Null is returned. To determine the cause of the failure, call MIGetErrorMessage() function.

Description

MIGetContent() gets the content of a file and stores it in a CString object, which is an alternative to the MIGetContentToFile() function. It has to remember that MIGetContentToFile and MIGetContent are exclusive, which means you can only use one of them during the life time of a CHttpFile object.

The caller has to dispose of the handle by calling the MICloseContent() procedure when the handle is no longer in use.