Send MinGW-Notify mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."


Please do not reply to this notification; the sender address is unable to 
accept incoming e-mail.  If you wish to unsubscribe you can do so at 
https://lists.osdn.me/mailman/listinfo/mingw-notify.



Today's Topics:

   1. [mingw] #41567: Some new Win32 APIs are missing from w32api
      (MinGW Notification List)
   2. [mingw] #41567: Some new Win32 APIs are missing from w32api
      (MinGW Notification List)


----------------------------------------------------------------------

Message: 1
Date: Thu, 13 May 2021 12:00:39 +0300
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41567: Some new Win32 APIs are
        missing from w32api
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41567: Some new Win32 APIs are missing from w32api

  Open Date: 2021-02-12 16:20
Last Update: 2021-05-13 12:00

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41567
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41567

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-05-13 12:00 Updated by: eliz

Comment:

Reply To keith
Reply To eliz
I can suggest this: 
https://github.com/mozilla/positron/blob/master/security/sandbox/chromium-shim/base/win/sdkdecls.h
It is under the Mozilla license.

Yes, I stumbled upon that myself.  It all looks kind of back-to-front, to me; 
e.g., predicated on #if _WIN32_WINNT < 0x0602, (i.e. < _WIN32_WINNT_VISTA), it 
sets about defining features which are unsupported prior to Vista.
I think this is because they want to be able to compile the sources on versions 
of Windows older than Vista, and then detect the actual support at run time.
We don't need to copy the conditions, just the values, of course.
FWIW, within this golang code review, I see
{{{ code diffu
 const (
+       // attributes for ProcThreadAttributeList
+       PROC_THREAD_ATTRIBUTE_PARENT_PROCESS    = 0x00020000
+       PROC_THREAD_ATTRIBUTE_HANDLE_LIST       = 0x00020002
+       PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY    = 0x00030003
+       PROC_THREAD_ATTRIBUTE_PREFERRED_NODE    = 0x00020004
+       PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR   = 0x00030005
+       PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007
+       PROC_THREAD_ATTRIBUTE_UMS_THREAD        = 0x00030006
+       PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL  = 0x0002000b
+)
}}}
and can see no documented restrictions, which would prohibit us from using this 
as a reference source.
This doesn't include PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, though, which was the 
trigger for this ticket.  I guess you will take its value from other sources?


---------------------------------------------------------------------
Ticket Status:

      Reporter: eliz
         Owner: (None)
          Type: Feature Request
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

To compile programs that use the Pseudo Console feature introduced recently 
with Windows 10, there's a need in several additions to the MinGW w32api 
headers and import libraries.
First, we need a value for _WIN32_WINNT that specifies Windows 10, in 
sdkddkver.h:
#define _WIN32_WINNT_WIN10 0x0A00
Second, we need functions, data structures, and macros to create and update 
lists of attributes for process and thread creation.  These are:
InitializeProcThreadAttributeList function
UpdateProcThreadAttribute function
DeleteProcThreadAttributeList function
PROC_THREAD_ATTRIBUTE_LIST structure
STARTUPINFOEX structure
PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE macro
Other PROC_THREAD_ATTRIBUTE_* macros
These seem to be supported since Windows 7, with the exception of 
PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, which is only supported since Windows 10, 
and STARTUPINFOEX, which is supported since Vista.  I think the proper place 
for them is in the winbase.h header file.
We also need the EXTENDED_STARTUPINFO_PRESENT flag for the CreateProcess 
function (this flag is supported since Vista and should be in winbase.h).
And finally, we need the functions, data types, and macros to manipulate 
pseudo-consoles, available only since Windows 10:
CreatePseudoConsole function
ClosePseudoConsole function
ResizePseudoConsole function
HPCON data type
Thanks in advance for providing these.


-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41567
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41567


------------------------------

Message: 2
Date: Thu, 13 May 2021 11:16:08 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #41567: Some new Win32 APIs are
        missing from w32api
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#41567: Some new Win32 APIs are missing from w32api

  Open Date: 2021-02-12 14:20
Last Update: 2021-05-13 11:16

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41567
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41567

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-05-13 11:16 Updated by: keith

Comment:

Reply To eliz
Reply To keith
Reply To eliz
I can suggest this: 
https://github.com/mozilla/positron/blob/master/security/sandbox/chromium-shim/base/win/sdkdecls.h
It is under the Mozilla license.

Yes, I stumbled upon that myself.  It all looks kind of back-to-front, to me; 
e.g., predicated on #if _WIN32_WINNT < 0x0602, (i.e. < _WIN32_WINNT_VISTA), it 
sets about defining features which are unsupported prior to Vista.

I think this is because they want to be able to compile the sources on versions 
of Windows older than Vista, and then detect the actual support at run time.
That may be so, but it is a degenerate may of going about it.  The normal 
approach would be to #define _WIN32_WINNT, or #define NTDDI_VERSION, to expose 
the appropriate APIs, but still to perform checks, at runtime, for actual 
availability of those APIs.  (It is entirely at the developer's discretion, to 
define _WIN32_WINNT or NTDDI_VERSION appropriately; why would you choose a 
value which is not appropriate to the APIs you wish to employ?)
We don't need to copy the conditions, just the values, of course.
Sure.
FWIW, within this golang code review, I see
  const ( +       // attributes for ProcThreadAttributeList +       
PROC_THREAD_ATTRIBUTE_PARENT_PROCESS    = 0x00020000 +       
PROC_THREAD_ATTRIBUTE_HANDLE_LIST       = 0x00020002 +       
PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY    = 0x00030003 +       
PROC_THREAD_ATTRIBUTE_PREFERRED_NODE    = 0x00020004 +       
PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR   = 0x00030005 +       
PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007 +       
PROC_THREAD_ATTRIBUTE_UMS_THREAD        = 0x00030006 +       
PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL  = 0x0002000b +)  and can see no 
documented restrictions, which would prohibit us from using this as a reference 
source.

This doesn't include PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, though,
To be fair, neither does the reference you suggested.
which was the trigger for this ticket.  I guess you will take its value from 
other sources?
Yes.  I already have an MIT licensed reference for it, as noted in a prior 
comment.

---------------------------------------------------------------------
Ticket Status:

      Reporter: eliz
         Owner: (None)
          Type: Feature Request
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

To compile programs that use the Pseudo Console feature introduced recently 
with Windows 10, there's a need in several additions to the MinGW w32api 
headers and import libraries.
First, we need a value for _WIN32_WINNT that specifies Windows 10, in 
sdkddkver.h:
#define _WIN32_WINNT_WIN10 0x0A00
Second, we need functions, data structures, and macros to create and update 
lists of attributes for process and thread creation.  These are:
InitializeProcThreadAttributeList function
UpdateProcThreadAttribute function
DeleteProcThreadAttributeList function
PROC_THREAD_ATTRIBUTE_LIST structure
STARTUPINFOEX structure
PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE macro
Other PROC_THREAD_ATTRIBUTE_* macros
These seem to be supported since Windows 7, with the exception of 
PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, which is only supported since Windows 10, 
and STARTUPINFOEX, which is supported since Vista.  I think the proper place 
for them is in the winbase.h header file.
We also need the EXTENDED_STARTUPINFO_PRESENT flag for the CreateProcess 
function (this flag is supported since Vista and should be in winbase.h).
And finally, we need the functions, data types, and macros to manipulate 
pseudo-consoles, available only since Windows 10:
CreatePseudoConsole function
ClosePseudoConsole function
ResizePseudoConsole function
HPCON data type
Thanks in advance for providing these.


-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41567
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41567


------------------------------

Subject: Digest Footer

_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify


------------------------------

End of MinGW-Notify Digest, Vol 44, Issue 6
*******************************************

Reply via email to