This method dynamically loads other system libraries and allocates
thread local storage. In most cases, it is not necessary to call this
method directly because it is automatically invoked when an instance
of the control is created by the container. However, if the control is
created dynamically using CreateObject or a similar method,
this must be the first method that is called before you attempt to
modify any property values or invoke other methods. Failure to
initialize the control may result in in subsequent errors and/or cause
an exception to be raised.
Each time the Initialize method is invoked, it increments an
internal counter that keeps track of the number of times that it has
been called by any thread in the current process. The Uninitialize
method decrements this counter, and when the usage count drops to
zero, the control will automatically unload the system libraries that
it has dynamically loaded and will destroy the process heap that was
allocated when the first instance of the control was created.
If the control is being used within another DLL, it is
important that you do not attempt to create an instance of the control
or call the Initialize method from within the DllMain
function because it can result in deadlocks or access violation
errors. If the DLL is written in C++ and it is linked with the C
runtime library (CRT), it will automatically call the constructors and
destructors for any static and global C++ objects and has the same
restrictions.