LRN wrote:
> Either way, some things cannot be implemented in a clear and/or performant way
> without these. [ntdll]
Sure, I don't dispute this.
But when it's possible - like in this case with isatty() - I prefer to
rely only on the Windows API.
Bruno
On 15.03.2019 22:42, Bruno Haible wrote:
> Gisle Vanem asked:
>>> I prefer to avoid the ntdll.dll API when possible.
>>
>> Okay, what's wrong with that?
>
> 1) It's a violation of abstraction.
>
> 2) The code you pointed to uses the function NtQueryObject. However, the
>Microsoft documentatio
Gisle Vanem asked:
> > I prefer to avoid the ntdll.dll API when possible.
>
> Okay, what's wrong with that?
1) It's a violation of abstraction. Diagram:
Programs
|
Windows API (kernel32.dll etc.)
|
NT API (ntdll.dll)
|
NT kern
Bruno Haible wrote:
What if the .exe has another name?
What other names are in common use for this program?
No sure. I'll need to check the MinGW-w64 list and motive.
Some custom variation of it perhaps?
The purpose of your function looks similar to what Mihail Konev
did for the MinGW-w64
Hi Gisle,
> > + && strcmp (buf + strlen (buf) - 11, "\\mintty.exe") == 0)
>
> What if the .exe has another name?
What other names are in common use for this program?
> The purpose of your function looks similar to what Mihail Konev
> did for the MinGW-w64 project:
>
> https
Bruno Haible wrote:
+ if (QueryFullProcessImageNameFunc (processHandle, 0, buf, &bufsize))
+{
+ if (strlen (buf) >= 11
+ && strcmp (buf + strlen (buf) - 11, "\\mintty.exe") == 0)
What if the .exe has another name?
The purpose of your function