VCL Library functions

Source: Internet
Author: User
Tags count function prototype int size time and date

1. Memory allocation

2. File operation

3. Disk Directory Management

4. String manipulation

5. Type conversion

6. Time and date management

A. BORLAND C + + BUILDER VCL memory management function

1. AllocMem

Allocates the specified bytes of memory to the team and initializes each byte allocated to 0. The function prototype is as follows:

void * __fastcall AllocMem (cardinal Size);

2. Sysfreemem

Frees the specified memory block. The function prototype is as follows:

int __fastcall sysfreemem (void * P);

3. Sysreallocmem

Requires the memory specified by the parameter size to be reassigned. The function prototype is as follows:

void * __fastcall sysreallocmem (void * P, int Size);

Two. Borland C + + Builder VCL file manipulation functions

1. FileOpen

Opens the specified file and, if returned as a positive number, indicates that the operation succeeded and the return value is a file handle: If the return value is-1, the table

The operation failed with the following function prototype:

int __fastcall FileOpen (const system::ansistring filename,int Mode);

2. Filecreate

Creates a new file with the specified file name, if returned as a positive number, the operation succeeds, and the return value is a file handle.

If the return value is-1, the operation fails. The function prototype is as follows:

int __fastcall filecreate (const System:: ansistring FileName);

3. Fileread

Reads the specified byte of data from the file into the buffer, the function returns the number of bytes actually read, and the function prototype is as follows;

int __fastcall fileread (int handle,void *buffer,int Count);

4. FileWrite

Writes the data for the buffer to the current location of the specified file if the operation succeeds, the function returns the actual written word

The number of sections, if returned to 1, indicates that the operation generated an error, and the function prototype is as follows:

int __fastcall filewrite (int handle,const void *buffer,int Count);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.