On 2009.09.15., at 17:18, Alex Strickland wrote:

Viktor Szakáts wrote:
+ To clarify: IMO any such explicit initialization as WIN_COMINIT()
isn't very elegant in Harbour programs and programmers tend to forget
it. Hence IMO it should be done automatically on first call, but in
this case we have to deal with MT mode also if I'm not missing anything.

Until such time, would you prefer an INIT PROCEDURE - this is MT safe I think?

This also doesn't work unless someone explicitly links in
the .prg level parts (or at least a stub). With some hacks
this can be solved, but not very good.

Another solution is to add an extra byte array of 256 element,
each initialized to zero at compile time, and use that array
to check for validity. Of course those flags need to be set/reset
from win_com open/close code, too. This would just cause 256 bytes
fix overhead. Still not top beautiful, but perhaps the less
intrusive.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to