网站首页  词典首页

请输入您要查询的函数:

 

术语 verinstallfile
释义 VerInstallFile
语法:
DWORD VerInstallFile( DWORD uFlags,
LPCTSTR szSrcFileName,
LPCTSTR szDestFileName,
LPCTSTR szSrcDir,
LPCTSTR szDestDir,
LPCTSTR szCurDir,
LPTSTR szTmpFile,
PUINT lpuTmpFileLen
);
VerInstallFile功能
该VerInstallFile函数试图安装指定的文件从VerFindFile函数返回的信息为依据。 VerInstallFile解压缩文件,如果有必要,分配一个唯一的文件名,检查是否有错误,如过时的文件。
参数
uFlags
[in]此参数可以是下列值之一。所有其他位均予以保留。
VIFF_FORCEINSTALL
安装文件不管版本号不匹配。只有在安装过程中的物理错误的功能检查。
VIFF_DONTDELETEOLD
安装该文件,而不删除以前安装的文件,如果以前安装的文件不是在目标目录中。
szSrcFileName
[in]指向一个字符串,它指定的文件名进行安装。这是目录中的文件指出的szSrcDir参数,文件名只能包含文件名和扩展名,而不是一个路径。
szDestFileName
[in]指向一个字符串,指定名称VerInstallFile将使在安装新的文件。这个文件名可能会有所不同,在szSrcFileName目录中的文件名。新的名称应只包括文件名和扩展名,而不是一个路径。
szSrcDir
[in]指向的缓冲区指定的目录名称的文件可以找到。
szDestDir
[in]指向的缓冲区指定的目录名称的文件应该被安装。 VerFindFile返回此其szDestDir参数值。
szCurDir
[in]指向的缓冲区指定的目录名称的预先存在的版本,这个文件可以找到。 VerFindFile返回此其szCurDir参数值。
szTmpFile
[out]指向的缓冲区接收一个源文件的临时副本的名称。缓冲区应至少_MAX_PATH个字符,虽然这不是必须的,并应在输入空。
lpuTmpFileLen
[中,out]指向一个变量,指定szTmpFile缓冲区的长度。该指针不能是NULL。
当函数返回时,lpuTmpFileLen收到的大小,以文字,在szTmpFile返回的数据,包括终止空字符。如果缓冲区太小,无法包含所有的数据,lpuTmpFileLen将所需的保存数据缓冲区的大小。
返回值
返回值是一个位掩码,表示例外。它可以是一个或多个下列值。所有其他值均予以保留。
VIF_ACCESSVIOLATIONA读取,创建,删除或重命名操作失败,原因是访问冲突。
VIF_BUFFTOOSMALLThe szTmpFile缓冲区太小,包含临时源文件的名称。当函数返回时,lpuTmpFileLen包含须持有的文件名缓冲区的大小。
VIF_CANNOTCREATEThe功能无法创建临时文件。特定的错误可以说是另一个标志。
VIF_CANNOTDELETEThe功能不能删除目标文件,或者不能删除在另一目录中的文件的现有版本。如果VIF_TEMPFILE位被设置,安装失败,并且目标文件可能无法被删除。
VIF_CANNOTDELETECURThe该文件的现有版本无法删除VIFF_DONTDELETEOLD未指定。
VIF_CANNOTLOADCABINETThe功能无法加载CAB文件。
VIF_CANNOTLOADLZ32The功能无法加载压缩的文件。
VIF_CANNOTREADDSTThe功能无法读取目标(现有)文件。这可以防止检查文件的属性的功能。
VIF_CANNOTREADSRCThe功能无法读取源文件。这可能意味着,没有指定的路径正确。
VIF_CANNOTRENAMEThe函数不能重命名临时文件,但已删除目标文件。
VIF_DIFFCODEPGThe新的文件,需要一个代码页不能由系统版本显示当前正在运行。此错误可以通过调用VIFF_FORCEINSTALL标志VerInstallFile覆盖集。
VIF_DIFFLANGThe新的预先存在的文件具有不同的语言或代码页值。此错误可以通过调用VIFF_FORCEINSTALL旗VerInstallFile再次覆盖集。
VIF_DIFFTYPEThe新的文件具有不同的类型,子类型,从原有的文件或操作系统。此错误可以通过调用VIFF_FORCEINSTALL旗VerInstallFile再次覆盖集。
VIF_FILEINUSEThe先前存在的文件正在使用的系统,不能删除。
VIF_MISMATCHThe新的预先存在的文件不同的一个或多个属性。此错误可以通过调用VIFF_FORCEINSTALL旗VerInstallFile再次覆盖集。
VIF_OUTOFMEMORYThe功能无法完成请求的操作由于内存不足。一般来说,这意味着应用程序运行内存不足的企图展开一个压缩文件。
VIF_OUTOFSPACEThe功能无法创建目标驱动器上的临时文件,由于没有足够的磁盘空间。
VIF_SHARINGVIOLATIONA读取,创建,删除或重命名操作失败,原因是共享冲突。
VIF_SRCOLDThe文件来安装比原有的旧文件。此错误可以通过调用VIFF_FORCEINSTALL旗VerInstallFile再次覆盖集。
VIF_TEMPFILEThe新文件的临时副本在目标目录中。失败的原因是反映在其他旗帜。
VIF_WRITEPROTThe预先存在的文件是写保护。此错误可以通过调用VIFF_FORCEINSTALL旗VerInstallFile再次覆盖集。
备注
Windows NT 3.51和更早的版本:版本信息功能不使用16位Windows文件图像。
Windows 95/98/Me中,Windows NT 4.0和Windows 2000中:这些问题都16 -和32位文件的图像功能的工作。
Windows XP中:16这些职能的工作- ,32 - ,和64位文件的图像。
VerInstallFile复制从源目录的文件到目标目录。如果szCurDir表明,该文件的以前版本系统上存在,VerInstallFile比较文件'版本标记信息。如果该文件的以前安装的版本是最新较新的版本,或者如果文件'属性明显不同,例如,如果他们在不同的语言,然后与一个或多个恢复的错误代码VerInstallFile回报。
VerInstallFile离开目标目录中的临时文件。该应用程序可以重写错误或删除临时文件。如果应用程序重写错误,VerInstallFile删除以前安装的版本,并重新命名与原始文件名的临时文件。
Windows 95/98/Me的:所有文件名必须是8.3格式,长文件名不支持。
在Windows 95/98/Me:VerInstallFileW是支持微软层对于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版本。
参见
版本信息概览,VerFindFile
==英文原文==VerInstallFile Function
The VerInstallFile function attempts to install the specified file based on information returned from the VerFindFile function. VerInstallFile decompresses the file, if necessary, assigns a unique filename, and checks for errors, such as outdated files.
Syntax
DWORD VerInstallFile( DWORD uFlags,
LPCTSTR szSrcFileName,
LPCTSTR szDestFileName,
LPCTSTR szSrcDir,
LPCTSTR szDestDir,
LPCTSTR szCurDir,
LPTSTR szTmpFile,
PUINT lpuTmpFileLen
);
Parameters
uFlags
[in] This parameter can be one of the following values. All other bits are reserved.
VIFF_FORCEINSTALL
Installs the file regardless of mismatched version numbers. The function checks only for physical errors during installation.
VIFF_DONTDELETEOLD
Installs the file without deleting the previously installed file, if the previously installed file is not in the destination directory.
szSrcFileName
[in] Pointer to a string that specifies the name of the file to be installed. This is the filename in the directory pointed to by the szSrcDir parameter; the filename can include only the filename and extension, not a path.
szDestFileName
[in] Pointer to a string that specifies the name VerInstallFile will give the new file upon installation. This filename may be different from the filename in the szSrcFileName directory. The new name should include only the filename and extension, not a path.
szSrcDir
[in] Pointer to a buffer that specifies the name of the directory where the file can be found.
szDestDir
[in] Pointer to a buffer that specifies the name of the directory where the file should be installed. VerFindFile returns this value in its szDestDir parameter.
szCurDir
[in] Pointer to a buffer that specifies the name of the directory where a preexisting version of this file can be found. VerFindFile returns this value in its szCurDir parameter.
szTmpFile
[out] Pointer to a buffer that receives the name of a temporary copy of the source file. The buffer should be at least _MAX_PATH characters long, although this is not required, and should be empty on input.
lpuTmpFileLen
[in, out] Pointer to a variable that specifies the length of the szTmpFile buffer. This pointer must not be NULL.
When the function returns, lpuTmpFileLen receives the size, in characters, of the data returned in szTmpFile, including the terminating null character. If the buffer is too small to contain all the data, lpuTmpFileLen will be the size of the buffer required to hold the data.
Return Value
The return value is a bitmask that indicates exceptions. It can be one or more of the following values. All other values are reserved.
VIF_ACCESSVIOLATIONA read, create, delete, or rename operation failed due to an access violation.
VIF_BUFFTOOSMALLThe szTmpFile buffer was too small to contain the name of the temporary source file. When the function returns, lpuTmpFileLen contains the size of the buffer required to hold the filename.
VIF_CANNOTCREATEThe function cannot create the temporary file. The specific error may be described by another flag.
VIF_CANNOTDELETEThe function cannot delete the destination file, or cannot delete the existing version of the file located in another directory. If the VIF_TEMPFILE bit is set, the installation failed, and the destination file probably cannot be deleted.
VIF_CANNOTDELETECURThe existing version of the file could not be deleted and VIFF_DONTDELETEOLD was not specified.
VIF_CANNOTLOADCABINETThe function cannot load the cabinet file.
VIF_CANNOTLOADLZ32The function cannot load the compressed file.
VIF_CANNOTREADDSTThe function cannot read the destination (existing) files. This prevents the function from examining the file's attributes.
VIF_CANNOTREADSRCThe function cannot read the source file. This could mean that the path was not specified properly.
VIF_CANNOTRENAMEThe function cannot rename the temporary file, but already deleted the destination file.
VIF_DIFFCODEPGThe new file requires a code page that cannot be displayed by the version of the system currently running. This error can be overridden by calling VerInstallFile with the VIFF_FORCEINSTALL flag set.
VIF_DIFFLANGThe new and preexisting files have different language or code-page values. This error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL flag set.
VIF_DIFFTYPEThe new file has a different type, subtype, or operating system from the preexisting file. This error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL flag set.
VIF_FILEINUSEThe preexisting file is in use by the system and cannot be deleted.
VIF_MISMATCHThe new and preexisting files differ in one or more attributes. This error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL flag set.
VIF_OUTOFMEMORYThe function cannot complete the requested operation due to insufficient memory. Generally, this means the application ran out of memory attempting to expand a compressed file.
VIF_OUTOFSPACEThe function cannot create the temporary file due to insufficient disk space on the destination drive.
VIF_SHARINGVIOLATIONA read, create, delete, or rename operation failed due to a sharing violation.
VIF_SRCOLDThe file to install is older than the preexisting file. This error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL flag set.
VIF_TEMPFILEThe temporary copy of the new file is in the destination directory. The cause of failure is reflected in other flags.
VIF_WRITEPROTThe preexisting file is write-protected. This error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL flag set.
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.
VerInstallFile copies the file from the source directory to the destination directory. If szCurDir indicates that a previous version of the file exists on the system, VerInstallFile compares the files' version stamp information. If the previously installed version of the file is more recent than the new version, or if the files' attributes are significantly different, for example, if they are in different languages, then VerInstallFile returns with one or more recoverable error codes.
VerInstallFile leaves the temporary file in the destination directory. The application can either override the error or delete the temporary file. If the application overrides the error, VerInstallFile deletes the previously installed version and renames the temporary file with the original filename.
Windows 95/98/Me: All file names must be in 8.3 format; long file names are not supported.
Windows 95/98/Me: VerInstallFileW 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 , VerFindFile
==原始网址==http://msdn.microsoft.com/en-us/library/ms647462(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:27:48