• Re: MsgWaitForSingleObject and named pipe. Which event am I getting ?

    From R.Wieser@address@is.invalid to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Thu Mar 19 14:07:47 2026
    From Newsgroup: alt.windows7.general

    Richard, (others),

    HANDLE hConnectEvent = CreateEvent(NULL, TRUE, TRUE, NULL); // Manual
    reset
    HANDLE hReadEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

    Any idea why one is created set, and the other not ? As far as I can see
    both should be created reset.

    Also, any idea why they are (must be?) created as manually-reset events ?

    The MSDN docs says that the WaitFor functions change (reset) the event that causes it to return. Any idea to whats the reason for wanting to do it manually ?

    Regards,
    Rudy Wieser


    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From malxau@address@is.invalid to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Fri Mar 20 05:51:28 2026
    From Newsgroup: alt.windows7.general

    In comp.os.ms-windows.programmer.win32 R.Wieser <address@is.invalid> wrote:
    "Overlapped I/O" on Win32 just means asynchronous non-blocking I/O.

    And that, it being asynchronous, is exactly what I'm trying to evade.

    Why?

    It seems to me that you want async semantics in the sense that the
    program should process UI messages, and process pipe input, and not
    block on either. Using a nonblocking pipe without async support
    would mean an attempt to call ReadFile would fail when no data exists.

    Is the advantage of avoiding async that it avoids allocating a buffer
    and providing it to the named pipe driver to populate whenever it wants?
    But calling it in a polling way still requires allocating that
    buffer...?
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Fri Mar 20 09:57:56 2026
    From Newsgroup: alt.windows7.general

    malxau,

    And that, it being asynchronous, is exactly what I'm trying
    to evade.

    Why?

    It seems to me that you want async semantics in the sense that
    the program should process UI messages, and process pipe input,
    and not block on either.

    Putting stuff thru a message-pump synchronises them.

    Regards,
    Rudy Wieser


    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Fri Mar 20 13:28:05 2026
    From Newsgroup: alt.windows7.general

    Putting stuff thru a message-pump synchronises them.

    Perhaps better said : serializes them.

    Regards,
    Rudy Wieser


    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Sun Mar 22 16:01:11 2026
    From Newsgroup: alt.windows7.general

    HANDLE hConnectEvent = CreateEvent(NULL, TRUE, TRUE, NULL); // Manual
    reset
    HANDLE hReadEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

    Any idea why one is created set, and the other not ? As far as I can see both should be created reset.

    Also, any idea why they are (must be?) created as manually-reset events ?

    I came across this one today :

    https://www.globalnerdy.com/wp-content/uploads/2026/03/652575612_1355710716577270_799259824397935466_n.jpg

    I find it rather apropriate.

    By the way : My test code using non-manual resetting events, both created as not-set seems to work alright.

    Regards,
    Rudy Wieser


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From legalize+jeeves@legalize+jeeves@mail.xmission.com (Richard) to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Mon Mar 23 14:19:15 2026
    From Newsgroup: alt.windows7.general

    "R.Wieser" <address@is.invalid> spake the secret code <10pf318$629m$1@dont-email.me> thusly:

    :-) You can ask an AI for information, but to be able determine if what it >says makes sense smeans you till need to know your stuff (or you stand the >chance to repeat its "hallucinations" as facts).

    It's been decades since I studied the low-level objects in Win32, but
    a book I can recommend is "Advanced Windows" by Jeffrey Richter. I'm
    sure you can find a used copy for cheap.

    <https://amzn.to/4rSTGKK> has paperback copies listed for ~$7.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Mon Mar 23 21:44:11 2026
    From Newsgroup: alt.windows7.general

    Richard,

    It's been decades since I studied the low-level objects in Win32,
    but a book I can recommend is "Advanced Windows" by Jeffrey Richter.
    I'm sure you can find a used copy for cheap.

    A quick web-search shows there are PDF versions galore, with "last version" dates upto 2024 (none of them actually download though).

    But in my case its not a question of finding *a* method, but a *specific* method.

    In my case I assumed that I could catch events using the pipes "file"
    handle. I was wrong. Perhaps that was why my web-searches did not turn up anything about it. :-)

    Thanks for the book suggestion though.

    Regards,
    Rudy Wieser


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From legalize+jeeves@legalize+jeeves@mail.xmission.com (Richard) to comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general on Fri Mar 27 20:37:13 2026
    From Newsgroup: alt.windows7.general

    "R.Wieser" <address@is.invalid> spake the secret code <10ps8n2$fsu7$1@dont-email.me> thusly:

    Thanks for the book suggestion though.

    I like a good programming book that gives me the big picture and
    guides me on the details. The reference documentation for Win32 is
    great for describing the details of every API function, but somewhere
    along the way MSDN lost the "user guide" type of documentation that
    orients you on the big picture.

    It seems good programming books are going out of style now that
    stackoverflow and AI assistants are answering people's questions
    immediately, but these core synchronization/system objects in Win32
    haven't changed much over the decades so the old books still have
    useful content.

    I use the web and chatbots for lots of things but there's still a role
    for books IMO.
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
    --- Synchronet 3.21f-Linux NewsLink 1.2