Closed kennykerr closed 7 months ago
The RPC constants in Windows.Win32.Foundation are also incorrectly typed as int
while the RPC constants in Windows.Win32.System.Rpc use the RPC_STATUS
type. Can we get them all consolidated under the Windows.Win32.System.Rpc.RPC_STATUS
enum?
The enum is typed as int. Should that be uint?
The sign bit does not appear to be used for RPC_STATUS
so it behaves more like WIN32_ERROR
but it is defined as long
which is int
so I don't have a problem with leaving it as is.
In MSVC (default configuration) the following holds true:
Both
ERROR_ACCESS_DENIED
andRPC_S_ACCESS_DENIED
are 5 becauseRPC_S_ACCESS_DENIED
is defined asERROR_ACCESS_DENIED
inrpcnterr.h
(line 41).But the Win32 metadata seems to choose the definition from
rpcnterr.h
(line 540) whereRPC_S_ACCESS_DENIED
is defined asSTATUS_ACCESS_DENIED
. The difference is whether_KRPCENV_
is defined.