Chapter 12 - Modifications/Corrections

Note that for Example 12-12 that the Deactivate method is not called first as the component is created with NT SP 4.0, and Visual Studio SP 2.0.


For Example 12-14, add a semi-colon after the 4th line of code. Online Example has correction.


For Example 12-19, memset must be used on the SYSTEMTIME structure before it is passed as a pointer to SystemTimetoVariantTime. Online code has this correction.


I wanted to stress that components marked as "apartment-threaded" or "free-threaded" should not be used as Application-level or Session-Level scopes objects. You will receive errors if you use apartment-threaded objects in the Application object collections. Using apartment-threaded components as Session objects can lock the Session object down to a single thread, which will degrade performance of the ASP application. For both built-in objects, free-threaded components impact on performance as communication between the application and the component must occur through proxies.

Using both-threaded components can be used with the Application object, but sparingly. Their use with Session objects should be problem free, depending on the object, of course.