POV-Ray : Newsgroups : povray.programming : How to Build a GUI Extension to POV-Ray for Windows. : Re: Trouble persisting Enabled state. Need Help. Server Time
28 Jul 2024 08:29:55 EDT (-0400)
  Re: Trouble persisting Enabled state. Need Help.  
From: Chris Cason
Date: 5 Aug 2002 14:20:55
Message: <3d4ec207@news.povray.org>
"Andrew Wilcox" <awi### [at] unpuzzledcom> wrote in message
news:3d4e8265$1@news.povray.org...
> I cannot do an (*Instance->Request)(RequestGetVars, &ExternalVars) ; in the
> following method. I assume its because POV hasn't fully initialized Instance
> yet. I need to know the Instance.HomePath so that I can read my .ini file
> and initialize Instance.Enabled correctly.
>
> What do I do?
>
> Is there some place else I can set Enabled after POV has initialized the
> DLL?  Or do I just have to know the directory where POV is installed,
> without being able to ask POV itself?

You could ask windows for the path to your DLL. Or you could store the state in
the registry instead of an INI file (IMO this is the best choice, POV uses an
INI file because it predates Windows 9x ; you don't have to follow our example).

Alternatively you can look at HKCU\Software\POV-Ray\CurrentVersion\Windows\Home.
Note that v3.1 of POVWIN uses HKLM for this key. If both version are installed,
the HKLM one will point at v3.1, and the HKCU will point at v3.5. But there will
also be an entry in HKLM\Software\POV-Ray\v3.5\Windows\Home pointing at the v3.5
install (provided that the person who installed it had admin rights).

-- Chris


Post a reply to this message

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