#12 Not able use with embedded perl

closed-fixed
None
5
2004-03-27
2002-10-23
Anonymous
No

I create an embedded perl interpreter, run a script, and
delete the embedded interpreter.
I couldn't use this module because the windows don't
get unregistered after running a script.
When I run a script the second time, registering the
windows fails.
Here is the change I used to make this work. However,
the best way to do this is probably to unregister the
windows at the end of the package.

File:
GUI.xs

Function:
void
RegisterClassEx(...)

Modified code from:
// Register the window class.
if(RegisterClassEx(&wcx)) {
XSRETURN_YES;
} else {
XSRETURN_NO;
}

to:
// Register the window class.
if(RegisterClassEx(&wcx)) {
XSRETURN_YES;
} else {
// Try to reregister the class.
if ( UnregisterClass( wcx.lpszClassName,
wcx.hInstance ) )
{
if( RegisterClassEx(&wcx) )
{
XSRETURN_YES;
}
}
XSRETURN_NO;
}

Discussion

  • Rocher Laurent
    Rocher Laurent
    2004-03-27

    Logged In: YES
    user_id=142891

    I commit this change to next release (> 0.0.671).

     
  • Rocher Laurent
    Rocher Laurent
    2004-03-27

    • assigned_to: nobody --> lrocher
    • status: open --> closed-fixed