-#else
-/*
- * @implemented
- */
-BOOL
-WINAPI
-WaitNamedPipeW(LPCWSTR lpNamedPipeName,
- DWORD nTimeOut)
-{
- UNICODE_STRING NamedPipeName;
- NTSTATUS Status;
- OBJECT_ATTRIBUTES ObjectAttributes;
- FILE_PIPE_WAIT_FOR_BUFFER WaitPipe;
- HANDLE FileHandle;
- IO_STATUS_BLOCK Iosb;
-
- if (RtlDosPathNameToNtPathName_U(lpNamedPipeName,
- &NamedPipeName,
- NULL,
- NULL) == FALSE)
- {
- return FALSE;
- }
-
- InitializeObjectAttributes(&ObjectAttributes,
- &NamedPipeName,
- OBJ_CASE_INSENSITIVE,
- NULL,
- NULL);
- Status = NtOpenFile(&FileHandle,
- FILE_READ_ATTRIBUTES | SYNCHRONIZE,
- &ObjectAttributes,
- &Iosb,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS(Status))
- {
- SetLastErrorByStatus(Status);
- RtlFreeUnicodeString(&NamedPipeName);
- return FALSE;
- }
-
- /* Check what timeout we got */
- if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT)
- {
- /* Don't use a timeout */
- WaitPipe.TimeoutSpecified = FALSE;
- }
- else
- {
- /* Check if we should wait forever */
- if (nTimeOut == NMPWAIT_WAIT_FOREVER)
- {
- /* Set the max */
- WaitPipe.Timeout.LowPart = 0;
- WaitPipe.Timeout.HighPart = 0x80000000;
- }
- else
- {
- /* Convert to NT format */
- WaitPipe.Timeout.QuadPart = UInt32x32To64(-10000, nTimeOut);
- }
-
- /* In both cases, we do have a timeout */
- WaitPipe.TimeoutSpecified = TRUE;
- }
-
- Status = NtFsControlFile(FileHandle,
- NULL,
- NULL,
- NULL,
- &Iosb,
- FSCTL_PIPE_WAIT,
- &WaitPipe,
- sizeof(WaitPipe),
- NULL,
- 0);
- NtClose(FileHandle);
- if (!NT_SUCCESS(Status))
- {
- SetLastErrorByStatus(Status);
- RtlFreeUnicodeString(&NamedPipeName);
- return FALSE;
- }
-
- RtlFreeUnicodeString(&NamedPipeName);
- return TRUE;
-}
-#endif