ADC Home > Reference Library > Technical Q&As > QuickTime > QuickTime for Windows >

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]


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.