portrait

Поиск



[software] [catdoc] [tcl] [geography] [old things]

Improved TCOM extension

TCOM extension is very handy if one want to automate some things on Windows.

I've discoverted two problems with it:

  1. Precompled version as distributed on author's site or in ActiveTcl, depends on external MSVCP60.DLL, which might not present on target systems. It is especially bad, if you are planning to wrap your script using freewrap or simular tool to provide standalone executable which don't need installation.
  2. Error reporting is flawed. Most times I encounter error in the Active-X object, tcom repports "Unknown Error xxxx" while errorcode it shows, have meaningful error message, which can be looked up using Windows API FormatMessage call.

Second problem is addressed with this patch.

To address first problem, one need to rebuild Tcom using different runtime library switches. I cannot provide patch for tcom.dsp project file, as distributed with tcom sources, because I've used Visual Studio 7.1, not obsolete 6.0, and it converts project files into completely different format before allowing to edit it with proprieties dialog.

Here is minimal set of files required to use tcom extension (no exeserver and dllserver). tcom.dll doesn't depend on external DLLs excepth those which are part of windows kernel and are guaranteed to present on any Windows system (2000/XP/2003 - I'm not interested in systems from previous century)