ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Checking For QD3D Windows DLL's


Q: Is there any QuickDraw 3D Gestalt equivalent on the Windows side which will tell you if QD3D is present?

A: There is no exact equivalent to Gestalt on Windows. It's not really necessary because the entire system is just based on shared libraries (DLLs). The simplest way to check for the presence of QD3D is to try and load the QD3D library.

#if defined (DEBUG)
    hinst = LoadLibrary( "QD3D_D.DLL" );  
#else
    hinst = LoadLibrary( "QD3D.DLL" );  
#endif
    if ( hinst != NULL )
    {
       Q3GetVersion( &major, &minor );
       // Use it...
    }
    else
    {
       // QuickDraw 3D not present
       // handle that...
    }

Additionally the QD3D DLLs all have version resources which can be queried using the Win32 version control API without loading the library.

The QD3D installer registers several keys in the registry which could also be used to determine if QD3D was installed. Note: Apple requires that Independent Software Vendors install QD3D using the QD3D installer or its equivalent. Just copying the DLLs is not sufficient. These include HKLM\SOFTWARE\Apple Computer Inc\QuickDraw 3D\...

Note there is no equivalent to "weak linking" on Windows. An application which links against QD3D will fail to load if QD3D is not present. An application which is concerned that QD3D might not be present will have to dynamically load and link against QD3D using the LoadLibrary and GetProcAddress routines or related functions. However, keep in mind that one of the most common reasons that Mac OS applications do not link against QD3D is because they wish to keep their memory image small. This is really not an issue on Windows due to the way virtual memory and the loader work in that environment. On Windows, a more accurate metric of runtime memory usage is working set.

QD3D should have only a minimal impact on working set if it is not fully initialized (via Q3Initialize) or used.

Note the QD3D Viewer can be used without explicit linking against the 3DViewer.DLL. See the Windows SDK sample "ViewerSampleWin32Only."

[Jul 11 1997]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.