> For the complete documentation index, see [llms.txt](https://www.pinvoke.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pinvoke.dev/kernel32/createnamedpipea.md).

# CreateNamedPipeA

```csharp
[DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe HANDLE CreateNamedPipeA(
    PCSTR lpName,
    FILE_FLAGS_AND_ATTRIBUTES dwOpenMode,
    NAMED_PIPE_MODE dwPipeMode,
    uint nMaxInstances,
    uint nOutBufferSize,
    uint nInBufferSize,
    uint nDefaultTimeOut,
    [Optional] SECURITY_ATTRIBUTES* lpSecurityAttributes);
```

[FILE\_FLAGS\_AND\_ATTRIBUTES](/filesystem/file_flags_and_attributes.md)

[NAMED\_PIPE\_MODE](/pipes/named_pipe_mode.md)

[SECURITY\_ATTRIBUTES](/security/security_attributes.md)
