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. vs2010 条件断点 has changed是什么意思?

    在vs2010 断点设置 condition里,有2个选项可以选择: 一个是true,另个是has changed,true好理解,如果表达式为真则停止.但是has changed是什么意思.看了官网 ...

  2. Vmware ESX 5.0 安装与部署

    近期我公司部署了虚拟化,採购了两台Dell R710的server(CPU:64位双核,主频:2.4GHZ, 32G 内存.硬盘:2块300G做Riad 1.3块2T做Riad 5 .10块网卡),在 ...

  3. Jquery获对HTML控件的控制

    Jquery获对HTML控件的控制 1.获取控件的值 1.1.radio 1.1.1 获取一组radio被选中项的值  var item = $('input[name=items][checked] ...

  4. 【Nginx】启动报错-端口被占用

    将下载的windows版nginx的压缩包nginx-1.4.2.zip解压到F:\server\nginx-1.4.2里面. dos命令键入: F: cd F:\server\nginx-1.4.2 ...

  5. 应用之间进行跳转,ComponentName的方式

    从应用A跳转到应用B, 关键代码如下: 有以下几个注意点: 1.ComponentName cn = new ComponentName("com.terry", "co ...

  6. mysql not in、left join、IS NULL、NOT EXISTS 效率问题记录

    原文:mysql not in.left join.IS NULL.NOT EXISTS 效率问题记录 mysql not in.left join.IS NULL.NOT EXISTS 效率问题记录 ...

  7. 使用MongoDB的开源项目(转)

    根据谷歌的搜索结果筛选出来的. 统计应用 counlty https://count.ly/ mongopress 开源CMS系统 http://www.mongopress.org/ Rubedo ...

  8. maven仓库--私服(Nexus的配置使用)

    maven--私服的搭建(Nexus的使用)和注意的问题 私服是什么 私服,私有服务器,是公司内部Maven项目经常需要的东东,不总结一下,不足以体现出重视.Nexus是常用的私用Maven服务器,一 ...

  9. #AzureChat - 自动伸缩和虚拟机

    我们很高兴地推出再一次 #AzureChat,这是 @WindowsAzure 团队为您精心打造的一个在 Twitter 上进行的聊天活动! #AzureChat 专注于云计算的各个方面以及云开发的最 ...

  10. About Us - Tech in Asia - Tech in Asia

    About Us - Tech in Asia - Tech in Asia About us Asia is big. Its place in the world, even bigger. Te ...