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 ...
随机推荐
- PHP函数积累
1.mt_rand(min,max):随机返回min,max之间的随整数机数. 2.date('Y-m-d H:m:s',时间戳),将时间戳格式化为相应的时间格式.time()取得时间戳 3.arra ...
- 使用JS进行pc端、手机端判断
<script type="text/javascript"> (function(){ var ua = nav ...
- ORA-00031: session marked for kill 标记要终止的会话
原文转载处:http://moonsoft.itpub.net/post/15182/203828 一些ORACLE中的进程被杀掉后,状态被置为"killed",但是锁定的资源很长 ...
- 设计模式总结6--适配器模式 adapter pattern
适配器模式将一个类的接口,转化成客户期望的另一个接口,适配器让原本接口不兼容的类可以合作无间 public interface Sheep{ public void run(); public voi ...
- 用JLabel显示时间-- JAVA初学者遇到的一个困难
问题:用一个JLabe,显示秒数,每过一秒数字自动减少1 问题看似很简单,但对初学JAVA的我来说,还真费了一点劲. 首先是如何即时,可以采用线程的方法: try { Thread.sleep(100 ...
- java多线程制作计时器
基本思路: 在类中创建thread 供按钮监听器调用. 界面设计:
- 基于mini2440的IIC读写(裸机)
mini2440开发板提供的测试代码过于复杂,让人很难理解,而且有些错误,如GPE14-15不能设置上拉电阻,可是代码里却设置了,虽然无关紧要.为了方便学习,我在闲暇之时我研究了一下.IIC的原理是比 ...
- 请问set JAVA_OPTS的各项參数是什么意思?
http://topic.csdn.net/u/20090910/10/20c6ba01-28ac-482e-94b2-bfce0a952f77.html 请问set JAVA_OPTS的各项參数是什 ...
- 中国A股市场缘何遭遇9连跌?
端午长假刚过,当投资者对“红六月”预期信心满满的时候,A股市场却遭遇了诡异的跌势,截止6月17日收盘,A股出现了罕见的“9连跌”.不仅上证综指失守2200点年线整数位,深证成指跌幅则高达3%以上,而且 ...
- 我的Python成长之路---第三天---Python基础(13)---2016年1月16日(雾霾)
五.Python的常用的内置函数 Python为我们准备了大量的内置函数,如下图所示 这里我们只讨论红框内的内置函数 abs(x) 返回一个数的绝对值(模),参数可以是真说或浮点数 >>& ...