[EXT] Loads the DLL LIBRARYNAME and calls the function DllRegisterServer.
+=item Win32::SetChildShowWindow(SHOWWINDOW)
+
+[CORE] Sets the I<ShowMode> of child processes started by system().
+By default system() will create a new console window for child
+processes if Perl itself is not running from a console. Calling
+SetChildShowWindow(0) will make these new console windows invisible.
+Calling SetChildShowWindow() without arguments reverts system() to the
+default behavior. The return value of SetChildShowWindow() is the
+previous setting or C<undef>.
+
+[EXT] The following symbolic constants for SHOWWINDOW are available
+(but not exported) from the Win32 module: SW_HIDE, SW_SHOWNORMAL,
+SW_SHOWMINIMIZED, SW_SHOWMAXIMIZED and SW_SHOWNOACTIVATE.
+
=item Win32::SetCwd(NEWDIRECTORY)
[CORE] Sets the current active drive and directory. This function does not
else {
create |= CREATE_NEW_CONSOLE;
}
+ if (w32_use_showwindow) {
+ StartupInfo.dwFlags |= STARTF_USESHOWWINDOW;
+ StartupInfo.wShowWindow = w32_showwindow;
+ }
DEBUG_p(PerlIO_printf(Perl_debug_log, "Spawning [%s] with [%s]\n",
cname,cmd));
*/
static
+XS(w32_SetChildShowWindow)
+{
+ dXSARGS;
+ BOOL use_showwindow = w32_use_showwindow;
+ /* use "unsigned short" because Perl has redefined "WORD" */
+ unsigned short showwindow = w32_showwindow;
+
+ if (items > 1)
+ Perl_croak(aTHX_ "usage: Win32::SetChildShowWindow($showwindow)");
+
+ if (items == 0 || !SvOK(ST(0)))
+ w32_use_showwindow = FALSE;
+ else {
+ w32_use_showwindow = TRUE;
+ w32_showwindow = (unsigned short)SvIV(ST(0));
+ }
+
+ EXTEND(SP, 1);
+ if (use_showwindow)
+ ST(0) = sv_2mortal(newSViv(showwindow));
+ else
+ ST(0) = &PL_sv_undef;
+ XSRETURN(1);
+}
+
+static
XS(w32_GetCwd)
{
dXSARGS;
newXS("Win32::GetLongPathName", w32_GetLongPathName, file);
newXS("Win32::CopyFile", w32_CopyFile, file);
newXS("Win32::Sleep", w32_Sleep, file);
+ newXS("Win32::SetChildShowWindow", w32_SetChildShowWindow, file);
/* XXX Bloat Alert! The following Activeware preloads really
* ought to be part of Win32::Sys::*, so they're not included
# ifdef USE_RTL_THREAD_API
void * retv; /* slot for thread return value */
# endif
+ BOOL Wuse_showwindow;
+ WORD Wshowwindow;
};
#ifdef USE_5005THREADS
# define w32_crypt_buffer (thr->i.Wcrypt_buffer)
# define w32_servent (thr->i.Wservent)
# define w32_init_socktype (thr->i.Winit_socktype)
+# define w32_use_showwindow (thr->i.Wuse_showwindow)
+# define w32_showwindow (thr->i.Wshowwindow)
#else
# define w32_strerror_buffer (PL_sys_intern.thr_intern.Wstrerror_buffer)
# define w32_getlogin_buffer (PL_sys_intern.thr_intern.Wgetlogin_buffer)
# define w32_crypt_buffer (PL_sys_intern.thr_intern.Wcrypt_buffer)
# define w32_servent (PL_sys_intern.thr_intern.Wservent)
# define w32_init_socktype (PL_sys_intern.thr_intern.Winit_socktype)
+# define w32_use_showwindow (PL_sys_intern.thr_intern.Wuse_showwindow)
+# define w32_showwindow (PL_sys_intern.thr_intern.Wshowwindow)
#endif /* USE_5005THREADS */
/* UNICODE<>ANSI translation helpers */