I am trying to implement the ReadConsoleInputEx(A|W) functions in kernelbase(It is needed for Microsoft's edit.exe. See bug #58252). I figured I could do that by defining a new CTL_CODE in include/wine/condrv.h. However, after a long time spent in exploring the source code, I don't get where the handler for the codes, such IOCTL_CONDRV_READ_INPUT are defined. Would appreciate some direction on this. Thanks in advance.
Le 23/05/2026 à 13:04, Barath Rk via Wine-Devel a écrit :
I am trying to implement the ReadConsoleInputEx(A|W) functions in kernelbase(It is needed for Microsoft's edit.exe. See bug #58252). I figured I could do that by defining a new CTL_CODE in include/wine/condrv.h.
However, after a long time spent in exploring the source code, I don't get where the handler for the codes, such IOCTL_CONDRV_READ_INPUT are defined.
Would appreciate some direction on this. Thanks in advance.
Console ioctl are received by server/console.c and either handled directly inside Wine server, or forwarded to attached conhost (if any) (programs/conhost/conhost.c) Given the nature of ReadConsoleInputEx (being either blocking and non blocking) depending on the passed flags, I strongly suggest staring by writing some tests (dlls/kernel32/tests/console.c) to cover the various aspects of the API HTH -Eric
On Saturday, 23 May 2026 06:34:39 CDT Eric Pouech via Wine-Devel wrote:
Le 23/05/2026 à 13:04, Barath Rk via Wine-Devel a écrit :
I am trying to implement the ReadConsoleInputEx(A|W) functions in kernelbase(It is needed for Microsoft's edit.exe. See bug #58252). I figured I could do that by defining a new CTL_CODE in include/wine/condrv.h.
However, after a long time spent in exploring the source code, I don't get where the handler for the codes, such IOCTL_CONDRV_READ_INPUT are defined.
Would appreciate some direction on this. Thanks in advance.
Console ioctl are received by server/console.c and either handled directly inside Wine server, or forwarded to attached conhost (if any) (programs/conhost/conhost.c)
Given the nature of ReadConsoleInputEx (being either blocking and non blocking) depending on the passed flags, I strongly suggest staring by writing some tests (dlls/kernel32/tests/console.c) to cover the various aspects of the API
Implementation wise, I suspect you do not want to define a new code, but rather extend the existing one. ReadConsoleInput() should probably call ReadConsoleInputEx().
participants (3)
-
Barath Rk -
Elizabeth Figura -
Eric Pouech