Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐:
搜索:
您的位置: Linux安全网 > Linux编程 > » 正文

Windows_Programing_English_To_Chinese_1_MSVC_C运行库(11)

来源: 未知 分享至:
These functions used to create routines that can be used to automate many tasks in Windows that not available in the standard C/C++.

接下来的几段将会讨论更多的关于C运行库文件函数的细节,这些函数在过去生成C运行库,

以前这些C运行库用来自动匹配windows应用程序,

但是这些函数在标准C/C++函数不在可用。


We will start with category, then the functions available in that category and finally followed by program examples that use some of the functions.

The functions discussed here mostly deal with directories and files.

For complete information please refer to Microsoft Visual C++ documentation (online MSDN: Microsoft Visual C++). 

 As a remainder, the following are the things that must be fully understood when you want to use a function, and here, _chsize() is used as an example.

下面将按类分析,并且将介绍各个类中所包含的函数,最后接下来的程序实例会使用所介绍的函数。

这里讨论的函数主要是处理目录和文件功能。

如果要获取完整的消息,请参考MSVC的帮助文档(在线帮助系统MSDN)。

当你使用函数的时候,你必须要完全理解所使用的函数,在这里我们将以_chsize()函数为例说明。


What is the use of the function?  This will match with \"what are you going to do or create?\" 

 Keep in mind that to accomplish some of the tasks you might need more (several) than one function.  For example:

_chsize() used to change the file size.

What is the function prototype, so we know how to write (call) a proper syntax of the function.  For example:

int _chsize(int handle, long size);

From the function prototype, how many parameters, the order and what are their types, so we can create the needed variables.  For example:

What header files need to be included?  For example the _chsize needs:

<io.h>

What is the return type and value?  For example:

_chsize() returns 0 if the file size is successfully changed.  A return value of 1 indicates an error: errno is set to EACCES

 if the specified file is locked against access, to EBADF if the specified file is read-only or the handle is invalid, or to ENOSPC if no space is left on the device.

 2


Tags:
分享至:
最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史