Chapter 4 - Modifications/Corrections
In the source code for Example 4-5, change the public member for the example from:
int * tstValue
to:
int tstValue
Example 4-6 shows that the component is instantiated into the Application object collection
in the first ASP script page, and this is accessed for the second ASP script page. This
is incorrect: the component should be instantiated directly within both ASP pages:
Dim tst
Set tst = Server.CreateObject("CPPThreads.thrdTest.1")
In Example 4-8, the variable count2 should be initialized before
being used in loop:
count2 = 0;
Microsoft has changed its Web site, and many of the links listed in the chapter have changed.
The URLs in the Further Reading section have changed. Instead of:
- An article that covers synchronization classes provided in the Visual C++ MFC can be found at http://premium.microsoft.com/msdn/library/devprods/devdoc/F1/F6/D8/S22CA6.HTM.
- An article, "Threads and Locks," that talks about synchronization and locks within the Java language can be found at http://premium.microsoft.com/msdn/library/devprods/vj++/vjlang/chap17.htm.
- An article titled "Designing Thread-Safe DLL's" that contains an explanation of why apartment-threading provides for thread safety with Visual Basic can be found at http://premium.microsoft.com/msdn/library/devprods/vb/vb50docs/f1/d5/s1af22.htm.
- In addition to the above articles, one of the best articles on threading, DCOM, and threading models is "DCOM Architecture," by Markus Horstmann and Mary Kirtland, located in the MSDN library CD, or at http://premium.microsoft.com/msdn/library/bkgrnd/html/dcomarch.htm. If you have not worked with threads before, you should take time to read this article in addition to this chapter.
They now read:
- An article that covers synchronization classes provided in the Visual C++ MFC can be found at http://msdn.microsoft.com/library/devprods/vs6/vc++/vccore/_core_multithreading.3a_.how_to_use_the_synchronization_classes.htm.
- An article, "Threads and Locks," that talks about synchronization and locks within the Java language can be found at http://msdn.microsoft.com/library/devprods/vs6/vj/chap17.htm.
- An article titled "Designing Thread-Safe DLL's" that contains an explanation of why apartment-threading provides for thread safety with Visual Basic can be found at http://msdn.microsoft.com/library/devprods/vs6/vb/html/vbcondesigningthreadsafedlls.htm.
- In addition to the above articles, one of the best articles on threading, DCOM, and threading models is "DCOM Architecture," by Markus Horstmann and Mary Kirtland, located in the MSDN library CD, or at http://msdn.microsoft.com/library/backgrnd/html/msdn_dcomarch.htm.. If you have not worked with threads before, you should take time to read this article in addition to this chapter.