POV-Ray : Newsgroups : povray.beta-test : Win POV mixed versions single instancing : Win POV mixed versions single instancing Server Time
29 Jul 2024 10:22:01 EDT (-0400)
  Win POV mixed versions single instancing  
From: Gelu Stoicescu
Date: 9 Jun 2002 16:39:37
Message: <3d03bd09@news.povray.org>
Win POV
3.5.beta.RC5.icl.win32
3.1g.watcom.win32 [Pentium IIoptimized]
OS Win98 SE, hardware not an issue
(nothing improved since my last post, sigh...)

Problem:
When either one of versions 3.1 or 3.5 (RC5 for that matter) is
"running" and the "other version" is set to run single instance, when
launching the "other version" it inadvertedly recognizes the "running"
instance as its own and brings focus on the existing window instead of
launching itself. This happens no matter how that "other version" is
launched (menu, shortcut, double-clicking the .exe and so on).

Cause:
I briefly investigated this with Spy++ (tool part of MS VS) and found
that both versions have very similar id infos (same class name for the
main window "PovMainWinClass" and same caption). The .exe launched is
correct but the instance recognition fails because some elements OS
relies when identifying instances are identical.

Suggested (working) fix:
Have the version number mangled somewhere in the main window class name,
as to make a difference for each version.
As Win specific code is not yet available for any of the versions, and
I'm such a sore excuse hacker that I don't even have a decent hex-editor
on my disks, I fell down to good old DOS days edit.com, still available
in Windows/Command; has binary open option, is long filenames awared and
features lovely color customization :) With this wonderful tool I was
able to modify the only occurence of the main window class name in .exe
to PovMaimWinClass (to preserve length and because "maim" is what I done
after all) and to perform a saving which, to my surprise, resulted in an
.exe of the same lenght and functionality. And the offending behaviour
was corrected too.
In a separate experiment I even managed to replace the windows caption
(with a search and replace which, as a side effect,  messed up the whole
logo messages) but seems like OS instance recognition doesn't care about
that one.
Of course this problem is tranzient, when 3.5 is final we'll all know
what version to choose :) Then again, the issue may arise again when POV
4 beta will be around.


Gelu


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.