Windows Named Pipe and hbpipeio

101 views
Skip to first unread message

Lorenzo Fiorini

unread,
Sep 16, 2025, 9:39:26 AM (5 days ago) Sep 16
to harbou...@googlegroups.com
In Windows, I need to control a running program from an external client that can execute powershell commands like " [System.IO.File]::WriteAllText("\\.\pipe\myname", "command") ". I tried to use hbpipeio but as far as I understand it is not suitable for this scenario. So I am trying to use something like the code below in a thread. Do you know any other way to do it (btw using the Windows Service APIs is not an option).

regards,
Lorenzo
...
   hPipe = CreateNamedPipeA(
      pszPipeName,
      PIPE_ACCESS_INBOUND,
      PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
      1, 1024, 1024, 0, NULL );
...
      if( ConnectNamedPipe( hPipe, NULL ) )
      {
         if( ReadFile( hPipe, buffer, sizeof(buffer) - 1, &dwBytesRead, NULL ) )
         { ... }
      }
      DisconnectNamedPipe( hPipe );
...

lai...@paysoft.com.br

unread,
Sep 16, 2025, 12:42:26 PM (5 days ago) Sep 16
to Harbour Users
Hi Lorenzo,

Try this one:
https://github.com/lailton/harbour-pipe

Lorenzo Fiorini

unread,
Sep 17, 2025, 9:53:11 AM (4 days ago) Sep 17
to harbou...@googlegroups.com

Thank you for the info, but actually we are moving to an alternative method since we are experiencing several permissions issues using Named Pipes.

regards,
Lorenzo

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/481a101a-ac4a-48bf-b338-1af24255de51n%40googlegroups.com.
-- 
Il presente messaggio è indirizzato esclusivamente ai destinatari. Tutte le informazioni
contenute, compresi eventuali allegati, sono confidenziali ai sensi del Regolamento (UE)
2016/679 e del D. Lgs. 196/2003. Pertanto ne sono vietati l'inoltro, la divulgazione e la
messa a disposizione in qualunque forma o modo, in mancanza di preventiva autorizzazione
del mittente. Qualora il messaggio Le fosse pervenuto per errore, La invitiamo cortesemente
ad eliminarlo in modo definitivo dando immediato riscontro.

This message is exclusively addressed to the recipients. All the information contained in this
message, including any attachments, is confidential in compliance with Regulation (UE)
2016/679 and Legislative Decree 196/2003. Therefore, forwarding, disclosing and making
the above-mentioned information available without prior authorization from the sender is
forbidden in any form or manner. If you have received this message in error, we kindly invite
you to delete it permanently and to notify the sender.
--
Reply all
Reply to author
Forward
0 new messages