一.borland c++ builder vcl的内存管理函数
1. allocmem
在队中分配指定字节的内存块,并将分配的每一个字节初始化为 0.函数原型如下:
void * __fastcall allocmem(cardinal size);
2. sysfreemem
释放所指定的内存块.函数原型如下:
int __fastcall sysfreemem(void * p);
3. sysreallocmem
要求重新分配参数size所指定的内存.函数原型如下:
void * __fastcall sysreallocmem(void * p , int size);
二.borland c++ builder vcl的文件操作函数
1. fileopen
打开指定的文件,如果返回为正数,表示操作成功,返回值为文件句柄:如果返回值为-1,表示操作失败,函数原型如下:
int __fastcall fileopen(const system::ansistring filename,int mode);
2. filecreate
以指定的文件名称创建一个新的文件,如果返回为正数,表示操作成功,返回值为文件句柄,如果返回值为-1,表示操作失败.函数原型如下:
int __fastcall filecreate(const system ::ansistring filename);
3. fileread
从文件中读取指定字节的数据到缓冲区中,函数返回实际读取的字节数,函数原型如下;
int __fastcall fileread(int handle,void *buffer,int count);
4. filewrite
将缓冲区的数据写入到指定的文件的当前位置中去如果操作成功,函数返回实际写入的字节数,如果返回为-1,则表示操作产生错误,函数原型如下:
int __fastcall filewrite(int handle,const void *buffer,int count);
5. fileseek
调整文件指针到新的位置,如果操作成功,则返回新的文件位置,如果操作失败,则函数返回-1,函数原型如下:
int __fastcall fileseek(int handle,int offset,int origin);
6. fileclose
关闭指定的文件,函数原型如下:
void __fastcall fileclose(int handle);
7. fileage
返回指定文件的时间标签,如果操作失败,则返回-1,函数原型如下:
int __fastcall fileage(const system::ansistring filename);
8. fileexists
用于测试指定的文件是否存在,如果存在返回真,否则返回假,函数原型如下:
bool __fastcall fileexists(const system::ansistring filename);
9. filegetdate
返回指定文件的dos时间标签,如果操作失败,则近回-1,函数原型如下:
int __fastcall filegetdate(int handle);
10.filesetdate
更改指定文件的dos时间标签,如果操作成功,返回0,否则返回错误代码,函数原型如下:
int __fastcall filesetdate(int handle,int age);
11.filegetattr
返回指定文件的属性,如果操作失败,则函数返回-1,函数原型如下;
int __fastcall filegetattr(const system::ansistring filename);
12.filesetattr
更改指定文件的属性参数,如果操作成功,则返回0,函数原型如下;
int __fastcall filesetattr(const system::ansistring filename,int attr);
13.findfirst
在指定的文件目录内,搜寻符合特定属性参数的文件,如果成功地查找到符合条件的文件,
则函数返回0,否则函数返回一个错误代码,函数原型如下:
int __fastcall findfirst(const system::ansistring path,int attr,tsearchrec &;f);
14.findnext
继续搜寻findfirst所指定属性参数的文件,如果成功地查找到符合条件的文件,则函数返回0,否则函数返回一个错误代码,函数原型如下:
int __fastcall findnext(tsearchrec &;f);
15.findclose
释放findfirst操作所申请的内存资源,函数原型如下:
void __fastcall findclose(tsearchrec &;f);
16.deletefile
在计算机磁盘中删除指定的文件,如果操作成功,则函数返回真,函数原型如下:
bool __fastcall deletefile(const ansistring filename);
17.renamefile
更改指定文件的名称,如果操作成功,则函数返回真,函数原型如下:
bool __fastcall renamefile(const ansistring oldname, const ansistring newname);
18.changefileext
更改指定文件的扩展名,函数原型如下:
ansistring __fastcall changefileext(const ansistring filename,const ansistring extension);
19.extractfilepath
返回指定文件的工作路径,函数原型如下:
ansistring __fastcall extractfilepath(const ansistring filename);
20.extractfiledir
返回指定文件的工作目录,函数原型如下:
ansistring __fastcall extractfiledir(const ansistring filename);
21.extractfiledrive
返回指定文件的驱动器,函数原型如下:
ansistring __fastcall extractfiledrive(const ansistring filename);
22.extractfilename
返回指定文件的文件名及扩展名,函数原型如下:
ansistring __fastcall extractfilename(const ansistring filename);
23.extractfileext
返回指定文件的扩展名,函数原型如下:
ansistring __fastcall extractfileext(const ansistring filename);
三,borland c++ builder vcl的磁盘管理函数
1. diskfree
返回指定磁盘的剩余空间,如果操作成功,返回剩余磁盘空间,如果操作失败,则返回-1,函数原型如下:
int __fastcall diskfree(byte drive);
2. disksize
返回指定磁盘的空间,如果操作成功,返回磁盘空间,如果操作失败,则返回-1,函数原型如下:
int __fastcall disksize(byte drive);
3. getcurrentdir
返回当前工作目录,函数原型如下:
ansistring __fastcall getcurrentdir();
4. setcurrentdir
设置当前工作目录,如果操作成功,则返回真,函数原型如下:
bool __fastcall setcurrentdir(const ansistring dir);
5. createdir
创建新的目录,如果操作成功,返回真,否则返回假,函数原型如下:
bool __fastcall createdir(const ansistring dir);
6. removedir
删除指定的目录,如果操作成功,返回真,否则返回假,函数原型如下:
bool __fastcall removedir(const ansistring dir);
四.borland c++ builder vcl的字符串函数
1. uppercase
将指定的ansistring字符串转换为大写形式,函数原型如下:
ansistring __fastcall uppercase(const ansistring s);
2. lowercase
将指定的ansistring字符串转换为小写形式,函数原型如下:
ansistring __fastcall lowercase(const ansistring s);
3. comparestr
比较两个ansistring字符串,函数原型如下:
int __fastcall comparestr(const ansistring s1, const ansistring s2);
4. comparetext
比较两个ansistring字符串,函数原型如下:
int __fastcall comparetext(const ansistring s1, const ansistring s2);
5. strlen