VirtualBox

Changeset 96495 in vbox for trunk/src/VBox/Runtime/r3/win


Ignore:
Timestamp:
Aug 25, 2022 3:17:52 PM (2 years ago)
Author:
vboxsync
Message:

IPRT: Switched pipe-win.cpp to use the nt-and-windows.h header and remove duplicate definitions. bugref:10261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/pipe-win.cpp

    r96475 r96495  
    3939*   Header Files                                                                                                                 *
    4040*********************************************************************************************************************************/
    41 #include <iprt/win/windows.h>
     41#include <iprt/nt/nt-and-windows.h>
    4242
    4343#include <iprt/pipe.h>
     
    111111
    112112
    113 /* from ntdef.h */
    114 typedef LONG NTSTATUS;
    115 
    116 /* from ntddk.h */
    117 typedef struct _IO_STATUS_BLOCK {
    118     union {
    119         NTSTATUS Status;
    120         PVOID Pointer;
    121     };
    122     ULONG_PTR Information;
    123 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
    124 
    125 typedef enum _FILE_INFORMATION_CLASS {
    126     FilePipeInformation = 23,
    127     FilePipeLocalInformation = 24,
    128     FilePipeRemoteInformation = 25,
    129 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
    130 
    131 /* from ntifs.h */
    132 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
    133      ULONG NamedPipeType;
    134      ULONG NamedPipeConfiguration;
    135      ULONG MaximumInstances;
    136      ULONG CurrentInstances;
    137      ULONG InboundQuota;
    138      ULONG ReadDataAvailable;
    139      ULONG OutboundQuota;
    140      ULONG WriteQuotaAvailable;
    141      ULONG NamedPipeState;
    142      ULONG NamedPipeEnd;
    143 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
    144 
    145 #define FILE_PIPE_DISCONNECTED_STATE    0x00000001U
    146 #define FILE_PIPE_LISTENING_STATE       0x00000002U
    147 #define FILE_PIPE_CONNECTED_STATE       0x00000003U
    148 #define FILE_PIPE_CLOSING_STATE         0x00000004U
    149 
    150 #define FILE_PIPE_INBOUND               0x00000000U
    151 #define FILE_PIPE_OUTBOUND              0x00000001U
    152 #define FILE_PIPE_FULL_DUPLEX           0x00000002U
    153 
    154 #define FILE_PIPE_CLIENT_END            0x00000000U
    155 #define FILE_PIPE_SERVER_END            0x00000001U
    156 
    157 extern "C" NTSYSAPI NTSTATUS WINAPI NtQueryInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, LONG, FILE_INFORMATION_CLASS);
    158 
    159113
    160114/**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette