网站首页  词典首页

请输入您要查询的函数:

 

术语 verfindfile
释义 VerFindFile
语法:
DWORD VerFindFile( DWORD dwFlags,
LPCTSTR szFileName,
LPCTSTR szWinDir,
LPCTSTR szAppDir,
LPCSTR szCurDir,
PUINT lpuCurDirLen,
LPTSTR szDestDir,
PUINT lpuDestDirLen
);
VerFindFile功能
该VerFindFile函数确定在何处安装它是否位于另一个系统中的文件版本为基础的文件。的值在指定的缓冲区VerFindFile回报在随后的调用中使用的VerInstallFile功能。
参数
dwFlags
[in]此参数可以是以下值。所有其他位均予以保留。
VFFF_ISSHAREDFILE
该文件可以被多个应用程序共享的来源。应用程序可以使用此信息来确定该文件应该被复制。
szFileName
[in]指向的文件名进行安装。文件名只能包含文件名和扩展名,而不是一个路径。
szWinDir
[in]指向一个字符串,指定目录中的Windows正在运行或将运行。这个字符串返回的GetWindowsDirectory函数。
szAppDir
[in]指向一个字符串,指定目录的安装程序安装相关文件集。如果安装程序正在安装一个应用程序,这是目录的应用程序将驻留。此参数还指出,应用程序的当前目录中,除非另有说明。
szCurDir
[out]指向的缓冲区接收路径的文件的当前版本正在安装。路径是一个零结尾的字符串。如果目前的版本是没有安装,缓冲区将包含零长度字符串。缓冲区应至少_MAX_PATH个字符,尽管这不是必需的。
lpuCurDirLen
[中,out]指向一个变量,指定szCurDir缓冲区的长度。该指针不能是NULL。
当函数返回时,lpuCurDirLen包含大小,以字符,在szCurDir返回的数据,包括终止空字符。如果缓冲区太小,无法包含所有的数据,lpuCurDirLen将所需的保存路径缓冲区的大小。
szDestDir
[out]指向的缓冲区接收路径到安装位置的VerFindFile建议。路径是一个零结尾的字符串。缓冲区应至少_MAX_PATH个字符,尽管这不是必需的。
lpuDestDirLen
[中,out]指向一个变量,指定szDestDir缓冲区的长度。该指针不能是NULL。
当函数返回时,lpuDestDirLen包含大小,以字符,在szDestDir返回的数据,包括终止空字符。如果缓冲区太小,无法包含所有的数据,lpuDestDirLen将所需的保存路径缓冲区的大小。
返回值
返回值是一个位掩码,表示该文件的状态。它可以是一个或多个下列值。所有其他值均予以保留。
VFF_CURNEDESTThe当前已安装文件的版本不建议目的地。
VFF_FILEINUSEThe系统正在使用的文件的当前安装的版本,因此,该文件不能被覆盖或删除。
VFF_BUFFTOOSMALLAt至少有一个缓冲区太小,包含相应的字符串。应用程序应检查输出缓冲器,以确定哪些缓冲区太小。
备注
Windows NT 3.51和更早的版本:版本信息功能不使用16位Windows文件图像。
Windows 95/98/Me中,Windows NT 4.0和Windows 2000中:这些问题都16 -和32位文件的图像功能的工作。
Windows XP中:16这些职能的工作- ,32 - ,和64位文件的图像。
为指定的文件的副本VerFindFile搜索使用OpenFile函数。然而,它决定从指定的Windows系统目录中的目录,或搜索路径。
如果dwFlags参数表明该文件是不公开的这个应用程序(不VFFF_ISSHAREDFILE),VerFindFile建议安装在应用程序的目录中的文件。否则,如果系统正在运行系统的共享副本,功能建议安装在Windows目录中的文件。如果系统正在运行的系统中的私人复制的功能,建议安装在系统目录中的文件。
在Windows 95/98/Me:VerFindFileW是支持微软?层为Unicode。若要使用此版本,您必须添加一些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 version.dll
在Winver.h HeaderDeclared,头文件:winuser.h
import libraryVersion.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
版本信息概览,GetWindowsDirectory,OpenFile,VerInstallFile
==英文原文==VerFindFile Function
The VerFindFile function determines where to install a file based on whether it locates another version of the file in the system. The values VerFindFile returns in the specified buffers are used in a subsequent call to the VerInstallFile function.
Syntax
DWORD VerFindFile( DWORD dwFlags,
LPCTSTR szFileName,
LPCTSTR szWinDir,
LPCTSTR szAppDir,
LPCSTR szCurDir,
PUINT lpuCurDirLen,
LPTSTR szDestDir,
PUINT lpuDestDirLen
);
Parameters
dwFlags
[in] This parameter can be the following value. All other bits are reserved.
VFFF_ISSHAREDFILE
The source file can be shared by multiple applications. An application can use this information to determine where the file should be copied.
szFileName
[in] Pointer to the name of the file to be installed. The filename can include only the filename and extension, not a path.
szWinDir
[in] Pointer to a string that specifies the directory in which Windows is running or will be run. This string is returned by the GetWindowsDirectory function.
szAppDir
[in] Pointer to a string that specifies the directory where the installation program is installing a set of related files. If the installation program is installing an application, this is the directory where the application will reside. This parameter also points to the application's current directory unless otherwise specified.
szCurDir
[out] Pointer to a buffer that receives the path to a current version of the file being installed. The path is a zero-terminated string. If a current version is not installed, the buffer will contain a zero-length string. The buffer should be at least _MAX_PATH characters long, although this is not required.
lpuCurDirLen
[in, out] Pointer to a variable that specifies the length of the szCurDir buffer. This pointer must not be NULL.
When the function returns, lpuCurDirLen contains the size, in characters, of the data returned in szCurDir, including the terminating null character. If the buffer is too small to contain all the data, lpuCurDirLen will be the size of the buffer required to hold the path.
szDestDir
[out] Pointer to a buffer that receives the path to the installation location recommended by VerFindFile. The path is a zero-terminated string. The buffer should be at least _MAX_PATH characters long, although this is not required.
lpuDestDirLen
[in, out] Pointer to a variable that specifies the length of the szDestDir buffer. This pointer must not be NULL.
When the function returns, lpuDestDirLen contains the size, in characters, of the data returned in szDestDir, including the terminating null character. If the buffer is too small to contain all the data, lpuDestDirLen will be the size of the buffer needed to hold the path.
Return Value
The return value is a bitmask that indicates the status of the file. It can be one or more of the following values. All other values are reserved.
VFF_CURNEDESTThe currently installed version of the file is not in the recommended destination.
VFF_FILEINUSEThe system is using the currently installed version of the file; therefore, the file cannot be overwritten or deleted.
VFF_BUFFTOOSMALLAt least one of the buffers was too small to contain the corresponding string. An application should check the output buffers to determine which buffer was too small.
Remarks
Windows NT 3.51 and earlier: The version information functions do not work with 16-bit Windows file images.
Windows 95/98/Me, Windows NT 4.0 and Windows 2000: These functions work on both 16- and 32-bit file images.
Windows XP: These functions work on 16-, 32-, and 64-bit file images.
VerFindFile searches for a copy of the specified file by using the OpenFile function. However, it determines the system directory from the specified Windows directory, or searches the path.
If the dwFlags parameter indicates that the file is private to this application (not VFFF_ISSHAREDFILE), VerFindFile recommends installing the file in the application's directory. Otherwise, if the system is running a shared copy of the system, the function recommends installing the file in the Windows directory. If the system is running a private copy of the system, the function recommends installing the file in the system directory.
Windows 95/98/Me: VerFindFileW is supported by the Microsoft? Layer for Unicode. To use this version, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionversion.dll
HeaderDeclared in Winver.h, include Windows.h
Import libraryVersion.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Version Information Overview , GetWindowsDirectory , OpenFile , VerInstallFile
==原始网址==http://msdn.microsoft.com/en-us/library/ms647461(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:28:31