Errata for Steal This Code!
Here are some known issues with the code for Steal This Code:
- DLL32.C works fine for Borland C++ and for many Microsoft DLLs (including
all the DLLs in the book). The issue you may have with Microsoft C++ and
DLL32.C is that, by default, Microsoft causes each user of the DLL to have
private data. The static variable in DLL32 is reproduced for each user!
Therefore, the count is 0 every time it is loaded and unloaded. Each time a
new process loads the DLL, DLL32 calls LibMain and each time a process exits
it calls WEP. Since the data is private, this probably works out just fine. If
your DLL does something that must absolutely only be done once at the
beginning or end, you need to share the counter. Click
here to find out how you can share DLL variables in Microsoft C.
- Please note that the CoolWorx demo ZIP file only works for Win16. It will
run under Windows 95 as a 16-bit program, but the install program won't run
because the version number is 4. Click here to get an updated
installer(about 29K).
- On a similar note, CoolWorx may have dependencies with specific versions
of the compilers you use. CoolWorx was tested with Borland C++ 4.0 and
Microsoft Visual C++ 1.5. Other versions may or may not work correctly. This
is a common problem with development tools and compilers.
- A few readers have reported problems with COOLGEN in the demo ZIP file. I
haven't been able to reproduce this. COOLGEN writes starter applications - you
can use COOLWORX without it (although it is certainly nice to have). I'll post
any more information I get about this here.