version topic
Version Information APIs
The version information functions enable applications to query a version resource for file information and present the information in a clear format. This information includes the file's purpose, author, version number, and so on.
Functions
-
GetFileVersionInfo(
Pointer< versionUtf16> lptstrFilename, int dwHandle, int dwLen, Pointer<NativeType> lpData) → int - Retrieves version information for the specified file.
-
GetFileVersionInfoEx(
int dwFlags, Pointer< versionUtf16> lpwstrFilename, int dwHandle, int dwLen, Pointer<NativeType> lpData) → int - Retrieves version information for the specified file.
-
GetFileVersionInfoSize(
Pointer< versionUtf16> lptstrFilename, Pointer<Uint32> lpdwHandle) → int - Determines whether the operating system can retrieve version information for a specified file. If version information is available, GetFileVersionInfoSize returns the size, in bytes, of that information.
-
GetFileVersionInfoSizeEx(
int dwFlags, Pointer< versionUtf16> lpwstrFilename, Pointer<Uint32> lpdwHandle) → int - Determines whether the operating system can retrieve version information for a specified file. If version information is available, GetFileVersionInfoSizeEx returns the size, in bytes, of that information.
-
IsWindows10OrGreater(
) → int version - Indicates if the current OS version matches, or is greater than, the Windows 10 version.
-
IsWindowsServer(
) → int version - Indicates if the current OS is a Windows Server release. Applications that need to distinguish between server and client versions of Windows should call this function.
-
IsWindowsVersionOrGreater(
int wMajorVersion, int wMinorVersion, int wServicePackMajor) → int version - Indicates if the current OS version matches, or is greater than, the provided version information. This function is useful in confirming a version of Windows Server that doesn't share a version number with a client release.
-
VerFindFile(
int uFlags, Pointer< versionUtf16> szFileName, Pointer<Utf16> szWinDir, Pointer<Utf16> szAppDir, Pointer<Utf16> szCurDir, Pointer<Uint32> puCurDirLen, Pointer<Utf16> szDestDir, Pointer<Uint32> puDestDirLen) → int - 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.
-
VerInstallFile(
int uFlags, Pointer< versionUtf16> szSrcFileName, Pointer<Utf16> szDestFileName, Pointer<Utf16> szSrcDir, Pointer<Utf16> szDestDir, Pointer<Utf16> szCurDir, Pointer<Utf16> szTmpFile, Pointer<Uint32> puTmpFileLen) → int - Installs 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.
-
VerQueryValue(
Pointer< versionNativeType> pBlock, Pointer<Utf16> lpSubBlock, Pointer<Pointer< lplpBuffer, Pointer<NativeType> >Uint32> puLen) → int - Retrieves specified version information from the specified version-information resource. To retrieve the appropriate resource, before you call VerQueryValue, you must first call the GetFileVersionInfoSize function, and then the GetFileVersionInfo function.