What's New in QuickTime 5

| Previous | Chapter Contents | Chapter Top | Next |

Using Gestalt to Get the QuickTime Version

As always, the standard way for Apple developers to determine which version of QuickTime is installed is by calling the Macintosh Toolbox API Gestalt function (this Mac OS function is included in QuickTime for Windows).

Listing 1 shows a code snippet that demonstrates how you can check the version of QuickTime that is installed -- in this case, QuickTime 5.0.1.

Listing 1 Determining which version of QuickTime is installed by calling the Gestalt function. The version installed here is QuickTime 5.0.1.

{
    /* check the version of QuickTime installed */
    long version;
    OSErr result;
    result = Gestalt(gestaltQuickTime,&version);
    if ((result == noErr) && (version >= 0x05018000))
    {
        /* we have version 5.0.1! */
    }
}


© 2001 Apple Computer, Inc.

What's New in QuickTime 5

| Previous | Chapter Contents | Chapter Top | Next |