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 梳理的更多相关文章

  1. C# Windows API

    API:应用程序接口(API:Application Program Interface)应用程序接口(API:application programming interface)是一组定义.程序及协 ...

  2. Windows API 函数列表 附帮助手册

    所有Windows API函数列表,为了方便查询,也为了大家查找,所以整理一下贡献出来了. 帮助手册:700多个Windows API的函数手册 免费下载 API之网络函数 API之消息函数 API之 ...

  3. Windows API Hooking in Python

    catalogue . 相关基础知识 . Deviare API Hook Overview . 使用ctypes调用Windows API . pydbg . winappdbg . dll inj ...

  4. 初识【Windows API】--文本去重

    最近学习操作系统中,老师布置了一个作业,运用系统调用函数删除文件夹下两个重复文本类文件,Linux玩不动,于是就只能在Windows下进行了. 看了一下介绍Windows API的博客: 点击打开 基 ...

  5. C#调用windows API的一些方法

    使用C#调用windows API(从其它地方总结来的,以备查询) C#调用windows API也可以叫做C#如何直接调用非托管代码,通常有2种方法: 1.  直接调用从 DLL 导出的函数. 2. ...

  6. Qt中使用Windows API

    在Windows平台上进行开发,不可避免与Windows API打交道,Qt中使用的时候要添加对应API的头文件和链接lib文件,另外使用的Windows API的代码部分要使用#ifdef  Q_O ...

  7. 在VBA中使用Windows API

    VBA是一种强大的编程语言,可用于自定义Microsoft Office解决方案.通过使用VBA处理一个或多个Office应用程序对象模型,可以容易地修改Office应用程序的功能或者能够使两个或多个 ...

  8. FormatMessage与GetLastError配合使用,排查windows api调用过程中的错误

    前一段时间在学习windows api调用过程中,遇到过一些调用错误或者程序没能显示预期的结果,或者直接出现vc运行时错误. 这对新手来说是司空见惯的事,因为不太熟悉难免会出错,出错的信息如果能显示很 ...

  9. C#调用Windows API函数截图

    界面如下: 下面放了一个PictureBox 首先是声明函数: //这里是调用 Windows API函数来进行截图 //首先导入库文件 [System.Runtime.InteropServices ...

随机推荐

  1. Laravel OAuth2 (三) ---使用 services 和 facades

    前言 既然要判断用户是否存在,然后创建用户,那么就要实现几个功能函数.为了方便调用,于是我尝试着写了第一个service 和 facade . 创建 Facade class Social exten ...

  2. 在word中批量制作条形码

    条码打印软件可以批量生成条形码然后直接打印,但是有些客户不需要直接打印,而是想将生成的条形码在word中进行排版,发给自己的客户或者下属部门来打印.那么如何实现在word中批量制作条形码呢? 操作很简 ...

  3. vs2010根据字符串内容添加断点

    在vs中我们可以直接用表达式.数值型比较直接用操作符即可. 如i==2,i<2; 但是字符型比较呢? 加入我们有一个名为string的变量,定义如下: char *string="Tw ...

  4. B. Friends and Presents(Codeforces Round #275(div2)

    B. Friends and Presents time limit per test 1 second memory limit per test 256 megabytes input stand ...

  5. 【STL__set_的应用】

    1.关于set C++ STL 之所以得到广泛的赞誉,也被很多人使用,不只是提供了像vector, string, list等方便的容器, 更重要的是STL封装了许多复杂的数据结构算法和大量常用数据结 ...

  6. ZOJ 1893 A Multiplication Game 【简单博弈】

    感觉ZJU上有不少博弈的题目. 这道题目还是比较好理解的,题目大概意思是:两人轮流乘一个2-9的数,从1开始乘,求谁的乘积先大于N. 还是寻找必败点必胜点,不过在这个题目里转换成了寻找必败区间必胜区间 ...

  7. stdcall、cdecl、fastcall、thiscall 、naked call的汇编详解

    函数调用规范   当高级语言函数被编译成机器码时,有一个问题就必须解决:因为CPU没有办法知道一个函数调用需要多少个.什么样的参数.即计算机不知道怎么给这个函数传递参数,传递参数的工作必须由函数调用者 ...

  8. This exception may occur if matchers are combined with raw values

    org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers!3 ma ...

  9. JSpider是一个用Java实现的WebSpider

    JSpider是一个用Java实现的WebSpider,JSpider的执行格式如下: jspider [URL] [ConfigName] URL一定要加上协议名称,如:http://,否则会报错. ...

  10. NOI2015 寿司晚宴

    今年NOI确实是在下输了.最近想把当时不会做的题都写一下. 题意 从2到n(500)这些数字中,选若干分给A,若干分给B,满足不存在:A的某个数和B的某个数的GCD不等于1. 对于寿司晚宴这题,标准解 ...