pyscripter 689 Posted October 29, 2020 (edited) This is an old thread. However I have a question regarding Russell Libby's unit. Has anybody used/tested TPipeConsole? TPipeConsole uses standard pipes (OpenStdPipes calls CreatePipe), but then uses PeekNamedPipe on theses pipes in ProcessPipe. According to the documentation this is a blocking operation when used with anonymous pipes and the whole thing falls apart. Question: is this the case - does PeekNamedPipe blocks with anonymous pipes or this is only an issue when multiple threads try to access the same pipe? See also https://devblogs.microsoft.com/oldnewthing/20110707-00/?p=10223 by Raymond Chen Edited October 30, 2020 by pyscripter Share this post Link to post
Carsten Hölscher 0 Posted January 27, 2022 I Think I found two bugs in 64 bit mode: procedure TSyncManager.RemoveThread(ThreadSync : TThreadSync); var lpInfo : TSyncInfo; begin // Enter critical section EnterCriticalSection(FThreadLock); // Resource protection try // Find the info using the base thread id lpInfo := FindSyncInfo(ThreadSync.SyncBaseTID); // Check assignment if Assigned(lpInfo) then PostMessage(lpInfo.FThreadWindow, CM_DESTROYWINDOW, 0, // Longint(lpInfo)); // old version LPARAM(lpInfo)); // my version finally // Leave the critical section LeaveCriticalSection(FThreadLock); end; end; procedure TSyncManager.Synchronize(ThreadSync : TThreadSync); var lpInfo : TSyncInfo; begin // Find the info using the base thread id lpInfo := FindSyncInfo(ThreadSync.SyncBaseTID); // Check assignment, send message to thread window if Assigned(lpInfo) then // SendMessage(lpInfo.FThreadWindow, CM_EXECPROC, 0, Longint(ThreadSync)); // old version SendMessage(lpInfo.FThreadWindow, CM_EXECPROC, 0, LPARAM(ThreadSync)); // my version end; Carsten Share this post Link to post
kockasseggu 2 Posted December 16, 2022 I registered just to thank you for these 2 lines: thank you very much Carsten!! and of course the postcard will also go to Francois :) //the problem mainly occurs under Win11 1 1 Share this post Link to post