develooper Front page | perl.libwin32 | Postings from December 2021

[rt.cpan.org #140476] Call Win32::Process::Create with non-defaultSTARTUPINFO struct

From:
Luigi Iotti via RT
Date:
December 16, 2021 04:23
Subject:
[rt.cpan.org #140476] Call Win32::Process::Create with non-defaultSTARTUPINFO struct
Message ID:
rt-5.0.2-29800-1639495537-1507.140476-15-0@rt.cpan.org
Tue Dec 14 10:25:37 2021: Request 140476 was acted upon.
Transaction: Ticket created by LUX
       Queue: Win32-Process
     Subject: Call Win32::Process::Create with non-default STARTUPINFO struct
   Broken in: 0.17
    Severity: (no value)
       Owner: Nobody
  Requestors: LUX@cpan.org
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=140476 >


I'd like the ability to start a minimized win32 process. From what I inderstand this can be done win Win32 by calling CreateProcessA() with the STRTUPINFO structure (the second-last arg) set with some particolar flags.
Win32::Process::Create calls CreateProcessA() in Process.hpp, but unfortunately in the current implementation, the st parameter (the STARTUPINFO structure) is not customizable. 

For my problem I would need to be able to do something like the two following lines,but I think it would be nice to have some more general way to initialize st:
st.dwFlags = STARTF_USESHOWWINDOW;
st.wShowWindow = SW_MINIMIZE;

Thank you,
Luigi



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About