Implement CreateNamedPipeA

This commit is contained in:
2025-10-22 23:47:33 -06:00
parent fa3541fe2d
commit 8e532ccf78
12 changed files with 561 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
#include "files.h"
#include "handles.h"
#include "internal.h"
#include "namedpipeapi.h"
#include "overlapped_util.h"
#include "strutil.h"
#include "timeutil.h"
@@ -895,6 +896,13 @@ HANDLE WIN_FUNC CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSh
return consoleHandle;
}
HANDLE pipeHandle = INVALID_HANDLE_VALUE;
if (kernel32::tryCreateFileNamedPipeA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes,
dwCreationDisposition, dwFlagsAndAttributes, pipeHandle)) {
DEBUG_LOG("CreateFileA(pipe=%s) -> %p (err=%u)\n", lpFileName, pipeHandle, wibo::lastError);
return pipeHandle;
}
std::filesystem::path hostPath = files::pathFromWindows(lpFileName);
std::string hostPathStr = hostPath.string();
DEBUG_LOG("CreateFileA(filename=%s (%s), desiredAccess=0x%x, shareMode=%u, securityAttributes=%p, "