windows api 梳理
PathMatchSpec Function
Searches a string using a Microsoft MS-DOS wild card match type.
Syntax
BOOL PathMatchSpec(
LPCTSTR pszFileParam,
LPCTSTR pszSpec
);
Parameters
- pszFileParam
- [in] Pointer to a null-terminated string of maximum length MAX_PATH that contains the path to be searched.
- pszSpec
- [in] Pointer to a null-terminated string of maximum length MAX_PATH that contains the file type for which to search. For example, to test whether or not pszFileParam is a DOC file, pszSpec should be set to "*.doc".
Return Value
Returns TRUE if the string matches, or FALSE otherwise.
Function Information
Minimum DLL Version shlwapi.dll version 4.71 or later Custom Implementation No Header shlwapi.h Import library shlwapi.lib Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0 Unicode Implemented as ANSI and Unicode versions.
GetCompressedFileSize
The GetCompressedFileSize function retrieves the actual number of bytes of disk storage used to store a specified file. If the file is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size of the specified file. If the file is located on a volume that supports sparse files and the file is a sparse file, the value obtained is the sparse size of the specified file.
DWORD GetCompressedFileSize(
LPCTSTR lpFileName,
LPDWORD lpFileSizeHigh
);
Parameters
- lpFileName
- [in] Pointer to a null-terminated string that specifies the name of the file.
Do not specify the name of a file on a nonseeking device, such as a pipe or a communications device, as its file size has no meaning.
- lpFileSizeHigh
- [out] Pointer to a variable that receives the high-order DWORD of the compressed file size. The function's return value is the low-order DWORD of the compressed file size.
This parameter can be NULL if the high-order DWORD of the compressed file size is not needed. Files less than 4 gigabytes in size do not need the high-orderDWORD.
Return Values
If the function succeeds, the return value is the low-order DWORD of the actual number of bytes of disk storage used to store the specified file, and iflpFileSizeHigh is non-NULL, the function puts the high-order DWORD of that actual value into theDWORD pointed to by that parameter. This is the compressed file size for compressed files, the actual file size for noncompressed files.
If the function fails, and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, callGetLastError.
If the return value is INVALID_FILE_SIZE and lpFileSizeHigh is non-NULL, an application must callGetLastError to determine whether the function has succeeded (value is NO_ERROR) or failed (value is other than NO_ERROR).
Requirements
| Client | Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation. |
|---|---|
| Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server. |
| Header |
Declared in Winbase.h; include Windows.h. |
| Library |
Link to Kernel32.lib. |
| DLL | Requires Kernel32.dll. |
| Unicode |
Implemented as GetCompressedFileSizeW (Unicode) and GetCompressedFileSizeA (ANSI). |
windows api 梳理的更多相关文章
- C# Windows API
API:应用程序接口(API:Application Program Interface)应用程序接口(API:application programming interface)是一组定义.程序及协 ...
- Windows API 函数列表 附帮助手册
所有Windows API函数列表,为了方便查询,也为了大家查找,所以整理一下贡献出来了. 帮助手册:700多个Windows API的函数手册 免费下载 API之网络函数 API之消息函数 API之 ...
- Windows API Hooking in Python
catalogue . 相关基础知识 . Deviare API Hook Overview . 使用ctypes调用Windows API . pydbg . winappdbg . dll inj ...
- 初识【Windows API】--文本去重
最近学习操作系统中,老师布置了一个作业,运用系统调用函数删除文件夹下两个重复文本类文件,Linux玩不动,于是就只能在Windows下进行了. 看了一下介绍Windows API的博客: 点击打开 基 ...
- C#调用windows API的一些方法
使用C#调用windows API(从其它地方总结来的,以备查询) C#调用windows API也可以叫做C#如何直接调用非托管代码,通常有2种方法: 1. 直接调用从 DLL 导出的函数. 2. ...
- Qt中使用Windows API
在Windows平台上进行开发,不可避免与Windows API打交道,Qt中使用的时候要添加对应API的头文件和链接lib文件,另外使用的Windows API的代码部分要使用#ifdef Q_O ...
- 在VBA中使用Windows API
VBA是一种强大的编程语言,可用于自定义Microsoft Office解决方案.通过使用VBA处理一个或多个Office应用程序对象模型,可以容易地修改Office应用程序的功能或者能够使两个或多个 ...
- FormatMessage与GetLastError配合使用,排查windows api调用过程中的错误
前一段时间在学习windows api调用过程中,遇到过一些调用错误或者程序没能显示预期的结果,或者直接出现vc运行时错误. 这对新手来说是司空见惯的事,因为不太熟悉难免会出错,出错的信息如果能显示很 ...
- C#调用Windows API函数截图
界面如下: 下面放了一个PictureBox 首先是声明函数: //这里是调用 Windows API函数来进行截图 //首先导入库文件 [System.Runtime.InteropServices ...
随机推荐
- Subsets 【dfs】
Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must ...
- Uva 11694 Gokigen Naname
基本思路是Dfs: 1. 一个一个格子摆放,以每个各自的左上角的点为基准点代表格子,比如(0,0)代表(0,0)(0,1)(1,0)(1,1)组成的格子,(0,1)代表(0,1)(0,2)(1,1), ...
- Vijos P1740聪明的质检员
题目 描述 小 T 是一名质量监督员,最近负责检验一批矿产的质量.这批矿产共有n个矿石,从1到n逐一编号,每个矿石都有自己的重量wi以及价值vi.检验矿产的流程是:1.给定m个区间[Li,Ri]:2. ...
- C语言中操作符的优先级大全
C语言中操作符的优先级大全, 当然c++, Objective-C,大部分语言都试用. 下面是来自The C Programming Language 2th的总结. OperatorsAssocia ...
- CSS3中的border-radius
以前在CSS2的基础上做圆角还能算得上是门学问!!各种图片.各种嵌套(<精通CSS——高级web标准解决方案>中有介绍,过程在这就不说了,网上一查就查得到,总之就是:没用CSS3之前觉得很 ...
- SQL语句简单记录
SQL SERVER 新增列与默认值 alter table 表名 add 列明 bit default 0 not null 删除列(容易删除失败) alter table 表名 drop colu ...
- java多线程监听JMS、MQ队列
本作品采用知识共享署名-非商业性使用-相同方式共享 2.5 中国大陆许可协议进行许可. 转载请注明出处和作者.http://blog.csdn.net/xtj332 背景:消息队列中有非常多的消息需要 ...
- vhost文件设置
#例子<VirtualHost *.82> #设置端口号为82 ServerName localhost #服务器名称 DocumentRoot "d:/Web" #文 ...
- zabbix 邮件告警配置
使用外部邮箱账号发送报警邮件设置 一.关闭sendmail或者postfix service sendmail stop #关闭 chkconfig sendmail off #禁止开机启动 serv ...
- Python 数据处理扩展包: pandas 模块的DataFrame介绍(创建和基本操作)
DataFrame是Pandas中的一个表结构的数据结构,包括三部分信息,表头(列的名称),表的内容(二维矩阵),索引(每行一个唯一的标记). 一.DataFrame的创建 有多种方式可以创建Data ...