This repository has been archived by the owner on Jun 1, 2020. It is now read-only.
forked from acdvorak/named-pipe-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af2fc08
commit 4d30b62
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace NamedPipeWrapper.Native | ||
{ | ||
internal sealed class Kernel32 | ||
{ | ||
/// <summary> | ||
/// Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection | ||
/// </summary> | ||
/// <param name="lpNamedPipeName">The name of the named pipe. The string must include the name of the computer on which the server process is executing.</param> | ||
/// <param name="nTimeOut">If no instances of the specified named pipe exist, the WaitNamedPipe function returns immediately, regardless of the time-out value.</param> | ||
/// <returns></returns> | ||
[return: MarshalAs(UnmanagedType.Bool)] | ||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | ||
internal static extern bool WaitNamedPipe(string lpNamedPipeName, uint nTimeOut); | ||
} | ||
} |