How to Obtain the Video for Windows Version

Last reviewed: August 5, 1996
Article ID: Q140067
The information in this article applies to:
  • Microsoft Video for Windows Development Kit version 1.1
  • Microsoft Windows Software Development Kit (SDK) version 3.1
  • Microsoft Win32 Software Development Kit (SDK) versions 3.51, 4.0

SUMMARY

This article explains how to obtain the version number for Video for Windows.

MORE INFORMATION

Using the GetVersionEx() Function

Video for Windows has been incorporated into Windows 95 and Windows NT version 3.51. Therefore, 32-bit applications should call the GetVersionEx() function to determine the version of the operating system and consequently the version of the multimedia system that is installed. GetVersionEx() returns extended information about the version of the operating system that is currently running.

Using the VideoForWindowsVersion() Function

16-bit applications (for example, those compiled with Visual C++ version 1.5x) should call the VideoForWindowsVersion() function to determine the version of Video for Windows that is installed. The VideoForWindowsVersion() function is not documented in the Video for Windows Development Kit. However, many of the samples from the kit use this function, and it is defined in the multimedia header files. The function is exported by Msvideo.dll, which is usually located in the Windows\System directory.

This function may be used to retrieve the major and minor versions of the currently installed Video for Windows system under Windows 3.x. For example, the following code fragment verifies that Video for Windows version 1.1 or higher is currently running:

WORD wVer;

// First make sure you are running version 1.1 or later
wVer = HIWORD(VideoForWindowsVersion()); if (wVer < 0x010a) {
   // oops, too old
   MessageBox(NULL, "Video for Windows version is too old",
              "Error", MB_OK | MB_ICONSTOP);
   return FALSE;
}

NOTE: As stated in the Win32 SDK, this function is obsolete in Windows NT and Windows 95. The GetVersion() or GetVersionEx() functions should be used on these platforms rather than VideoForWindowsVersion().

Here is an excerpt from the Win32 SDK "Multimedia, Introduction, Multimedia Possibilities, Version Checking" documentation:

   You may need to check the installed version of the multimedia
   system, particularly if your application takes advantage of
   features that were not available in previous releases. Although
   the multimedia header files contain two version-checking functions,
   they are obsolete. These obsolete functions are mmsystemGetVersion
   and VideoForWindowsVersion. Your application should rely on the
   standard Windows functions, GetVersion or GetVersionEx, instead.

Using the MCI String

The Multimedia Control Interface (MCI) string "info avivideo version" should not be used to determine the installed version of Video for Windows. This string is only meant to be displayed; it is not meant to be used for version comparison. It will become obsolete in the future.


Additional reference words: win16sdk 1.10 3.10 4.00
KBCategory: kbmm kbprg kbdocerr kbhowto kbwebcontent
KBSubcategory: MMVideo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 5, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.