Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Legacy Documents > QuickTime >

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:

Calling InitializeQTML from DLL Main

Q Is there a known problem calling the QuickTime 3 for Windows InitializeQTML(0) function from the DllMain procedure of a DLL?

A Yes, but there's more to it than that. It's a known problem on Windows with calling LoadLibrary or FreeLibrary (or any of several other APIs) from the DllMain procedure of a DLL. The basic rule of thumb on Windows is: "Don't do anything significant in your DLL Main." Moreover, don't *ever* call DLL-related APIs.

Instead, I would recommend adding an Initialize call to your DLL that calls InitializeQTML, and a Terminate call that calls TerminateQTML. That avoids the problem entirely.

[Sep 21 1998]