Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f296a8ca
Commit
f296a8ca
authored
Jan 07, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement I_RpcMapWin32Status.
Add a test for this function.
parent
1255eaf8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
121 additions
and
2 deletions
+121
-2
rpcrt4_main.c
dlls/rpcrt4/rpcrt4_main.c
+121
-2
rpc.c
dlls/rpcrt4/tests/rpc.c
+0
-0
No files found.
dlls/rpcrt4/rpcrt4_main.c
View file @
f296a8ca
...
...
@@ -35,6 +35,8 @@
#include <stdlib.h>
#include <string.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winerror.h"
#include "winbase.h"
...
...
@@ -810,11 +812,128 @@ void WINAPI I_RpcFree(void *Object)
/******************************************************************************
* I_RpcMapWin32Status (rpcrt4.@)
*
* Maps Win32 RPC error codes to NT statuses.
*
* PARAMS
* status [I] Win32 RPC error code.
*
* RETURNS
* Appropriate translation into an NT status code.
*/
LONG
WINAPI
I_RpcMapWin32Status
(
RPC_STATUS
status
)
{
FIXME
(
"(%ld): stub
\n
"
,
status
);
return
0
;
TRACE
(
"(%ld)
\n
"
,
status
);
switch
(
status
)
{
case
ERROR_ACCESS_DENIED
:
return
STATUS_ACCESS_DENIED
;
case
ERROR_INVALID_HANDLE
:
return
RPC_NT_SS_CONTEXT_MISMATCH
;
case
ERROR_OUTOFMEMORY
:
return
STATUS_NO_MEMORY
;
case
ERROR_INVALID_PARAMETER
:
return
STATUS_INVALID_PARAMETER
;
case
ERROR_INSUFFICIENT_BUFFER
:
return
STATUS_BUFFER_TOO_SMALL
;
case
ERROR_MAX_THRDS_REACHED
:
return
STATUS_NO_MEMORY
;
case
ERROR_NOACCESS
:
return
STATUS_ACCESS_VIOLATION
;
case
ERROR_NOT_ENOUGH_SERVER_MEMORY
:
return
STATUS_INSUFF_SERVER_RESOURCES
;
case
ERROR_WRONG_PASSWORD
:
return
STATUS_WRONG_PASSWORD
;
case
ERROR_INVALID_LOGON_HOURS
:
return
STATUS_INVALID_LOGON_HOURS
;
case
ERROR_PASSWORD_EXPIRED
:
return
STATUS_PASSWORD_EXPIRED
;
case
ERROR_ACCOUNT_DISABLED
:
return
STATUS_ACCOUNT_DISABLED
;
case
ERROR_INVALID_SECURITY_DESCR
:
return
STATUS_INVALID_SECURITY_DESCR
;
case
RPC_S_INVALID_STRING_BINDING
:
return
RPC_NT_INVALID_STRING_BINDING
;
case
RPC_S_WRONG_KIND_OF_BINDING
:
return
RPC_NT_WRONG_KIND_OF_BINDING
;
case
RPC_S_INVALID_BINDING
:
return
RPC_NT_INVALID_BINDING
;
case
RPC_S_PROTSEQ_NOT_SUPPORTED
:
return
RPC_NT_PROTSEQ_NOT_SUPPORTED
;
case
RPC_S_INVALID_RPC_PROTSEQ
:
return
RPC_NT_INVALID_RPC_PROTSEQ
;
case
RPC_S_INVALID_STRING_UUID
:
return
RPC_NT_INVALID_STRING_UUID
;
case
RPC_S_INVALID_ENDPOINT_FORMAT
:
return
RPC_NT_INVALID_ENDPOINT_FORMAT
;
case
RPC_S_INVALID_NET_ADDR
:
return
RPC_NT_INVALID_NET_ADDR
;
case
RPC_S_NO_ENDPOINT_FOUND
:
return
RPC_NT_NO_ENDPOINT_FOUND
;
case
RPC_S_INVALID_TIMEOUT
:
return
RPC_NT_INVALID_TIMEOUT
;
case
RPC_S_OBJECT_NOT_FOUND
:
return
RPC_NT_OBJECT_NOT_FOUND
;
case
RPC_S_ALREADY_REGISTERED
:
return
RPC_NT_ALREADY_REGISTERED
;
case
RPC_S_TYPE_ALREADY_REGISTERED
:
return
RPC_NT_TYPE_ALREADY_REGISTERED
;
case
RPC_S_ALREADY_LISTENING
:
return
RPC_NT_ALREADY_LISTENING
;
case
RPC_S_NO_PROTSEQS_REGISTERED
:
return
RPC_NT_NO_PROTSEQS_REGISTERED
;
case
RPC_S_NOT_LISTENING
:
return
RPC_NT_NOT_LISTENING
;
case
RPC_S_UNKNOWN_MGR_TYPE
:
return
RPC_NT_UNKNOWN_MGR_TYPE
;
case
RPC_S_UNKNOWN_IF
:
return
RPC_NT_UNKNOWN_IF
;
case
RPC_S_NO_BINDINGS
:
return
RPC_NT_NO_BINDINGS
;
case
RPC_S_NO_PROTSEQS
:
return
RPC_NT_NO_PROTSEQS
;
case
RPC_S_CANT_CREATE_ENDPOINT
:
return
RPC_NT_CANT_CREATE_ENDPOINT
;
case
RPC_S_OUT_OF_RESOURCES
:
return
RPC_NT_OUT_OF_RESOURCES
;
case
RPC_S_SERVER_UNAVAILABLE
:
return
RPC_NT_SERVER_UNAVAILABLE
;
case
RPC_S_SERVER_TOO_BUSY
:
return
RPC_NT_SERVER_TOO_BUSY
;
case
RPC_S_INVALID_NETWORK_OPTIONS
:
return
RPC_NT_INVALID_NETWORK_OPTIONS
;
case
RPC_S_NO_CALL_ACTIVE
:
return
RPC_NT_NO_CALL_ACTIVE
;
case
RPC_S_CALL_FAILED
:
return
RPC_NT_CALL_FAILED
;
case
RPC_S_CALL_FAILED_DNE
:
return
RPC_NT_CALL_FAILED_DNE
;
case
RPC_S_PROTOCOL_ERROR
:
return
RPC_NT_PROTOCOL_ERROR
;
case
RPC_S_UNSUPPORTED_TRANS_SYN
:
return
RPC_NT_UNSUPPORTED_TRANS_SYN
;
case
RPC_S_UNSUPPORTED_TYPE
:
return
RPC_NT_UNSUPPORTED_TYPE
;
case
RPC_S_INVALID_TAG
:
return
RPC_NT_INVALID_TAG
;
case
RPC_S_INVALID_BOUND
:
return
RPC_NT_INVALID_BOUND
;
case
RPC_S_NO_ENTRY_NAME
:
return
RPC_NT_NO_ENTRY_NAME
;
case
RPC_S_INVALID_NAME_SYNTAX
:
return
RPC_NT_INVALID_NAME_SYNTAX
;
case
RPC_S_UNSUPPORTED_NAME_SYNTAX
:
return
RPC_NT_UNSUPPORTED_NAME_SYNTAX
;
case
RPC_S_UUID_NO_ADDRESS
:
return
RPC_NT_UUID_NO_ADDRESS
;
case
RPC_S_DUPLICATE_ENDPOINT
:
return
RPC_NT_DUPLICATE_ENDPOINT
;
case
RPC_S_UNKNOWN_AUTHN_TYPE
:
return
RPC_NT_UNKNOWN_AUTHN_TYPE
;
case
RPC_S_MAX_CALLS_TOO_SMALL
:
return
RPC_NT_MAX_CALLS_TOO_SMALL
;
case
RPC_S_STRING_TOO_LONG
:
return
RPC_NT_STRING_TOO_LONG
;
case
RPC_S_PROTSEQ_NOT_FOUND
:
return
RPC_NT_PROTSEQ_NOT_FOUND
;
case
RPC_S_PROCNUM_OUT_OF_RANGE
:
return
RPC_NT_PROCNUM_OUT_OF_RANGE
;
case
RPC_S_BINDING_HAS_NO_AUTH
:
return
RPC_NT_BINDING_HAS_NO_AUTH
;
case
RPC_S_UNKNOWN_AUTHN_SERVICE
:
return
RPC_NT_UNKNOWN_AUTHN_SERVICE
;
case
RPC_S_UNKNOWN_AUTHN_LEVEL
:
return
RPC_NT_UNKNOWN_AUTHN_LEVEL
;
case
RPC_S_INVALID_AUTH_IDENTITY
:
return
RPC_NT_INVALID_AUTH_IDENTITY
;
case
RPC_S_UNKNOWN_AUTHZ_SERVICE
:
return
RPC_NT_UNKNOWN_AUTHZ_SERVICE
;
case
EPT_S_INVALID_ENTRY
:
return
EPT_NT_INVALID_ENTRY
;
case
EPT_S_CANT_PERFORM_OP
:
return
EPT_NT_CANT_PERFORM_OP
;
case
EPT_S_NOT_REGISTERED
:
return
EPT_NT_NOT_REGISTERED
;
case
EPT_S_CANT_CREATE
:
return
EPT_NT_CANT_CREATE
;
case
RPC_S_NOTHING_TO_EXPORT
:
return
RPC_NT_NOTHING_TO_EXPORT
;
case
RPC_S_INCOMPLETE_NAME
:
return
RPC_NT_INCOMPLETE_NAME
;
case
RPC_S_INVALID_VERS_OPTION
:
return
RPC_NT_INVALID_VERS_OPTION
;
case
RPC_S_NO_MORE_MEMBERS
:
return
RPC_NT_NO_MORE_MEMBERS
;
case
RPC_S_NOT_ALL_OBJS_UNEXPORTED
:
return
RPC_NT_NOT_ALL_OBJS_UNEXPORTED
;
case
RPC_S_INTERFACE_NOT_FOUND
:
return
RPC_NT_INTERFACE_NOT_FOUND
;
case
RPC_S_ENTRY_ALREADY_EXISTS
:
return
RPC_NT_ENTRY_ALREADY_EXISTS
;
case
RPC_S_ENTRY_NOT_FOUND
:
return
RPC_NT_ENTRY_NOT_FOUND
;
case
RPC_S_NAME_SERVICE_UNAVAILABLE
:
return
RPC_NT_NAME_SERVICE_UNAVAILABLE
;
case
RPC_S_INVALID_NAF_ID
:
return
RPC_NT_INVALID_NAF_ID
;
case
RPC_S_CANNOT_SUPPORT
:
return
RPC_NT_CANNOT_SUPPORT
;
case
RPC_S_NO_CONTEXT_AVAILABLE
:
return
RPC_NT_NO_CONTEXT_AVAILABLE
;
case
RPC_S_INTERNAL_ERROR
:
return
RPC_NT_INTERNAL_ERROR
;
case
RPC_S_ZERO_DIVIDE
:
return
RPC_NT_ZERO_DIVIDE
;
case
RPC_S_ADDRESS_ERROR
:
return
RPC_NT_ADDRESS_ERROR
;
case
RPC_S_FP_DIV_ZERO
:
return
RPC_NT_FP_DIV_ZERO
;
case
RPC_S_FP_UNDERFLOW
:
return
RPC_NT_FP_UNDERFLOW
;
case
RPC_S_FP_OVERFLOW
:
return
RPC_NT_FP_OVERFLOW
;
case
RPC_S_CALL_IN_PROGRESS
:
return
RPC_NT_CALL_IN_PROGRESS
;
case
RPC_S_NO_MORE_BINDINGS
:
return
RPC_NT_NO_MORE_BINDINGS
;
case
RPC_S_CALL_CANCELLED
:
return
RPC_NT_CALL_CANCELLED
;
case
RPC_S_INVALID_OBJECT
:
return
RPC_NT_INVALID_OBJECT
;
case
RPC_S_INVALID_ASYNC_HANDLE
:
return
RPC_NT_INVALID_ASYNC_HANDLE
;
case
RPC_S_INVALID_ASYNC_CALL
:
return
RPC_NT_INVALID_ASYNC_CALL
;
case
RPC_S_GROUP_MEMBER_NOT_FOUND
:
return
RPC_NT_GROUP_MEMBER_NOT_FOUND
;
case
RPC_X_NO_MORE_ENTRIES
:
return
RPC_NT_NO_MORE_ENTRIES
;
case
RPC_X_SS_CHAR_TRANS_OPEN_FAIL
:
return
RPC_NT_SS_CHAR_TRANS_OPEN_FAIL
;
case
RPC_X_SS_CHAR_TRANS_SHORT_FILE
:
return
RPC_NT_SS_CHAR_TRANS_SHORT_FILE
;
case
RPC_X_SS_IN_NULL_CONTEXT
:
return
RPC_NT_SS_IN_NULL_CONTEXT
;
case
RPC_X_SS_CONTEXT_DAMAGED
:
return
RPC_NT_SS_CONTEXT_DAMAGED
;
case
RPC_X_SS_HANDLES_MISMATCH
:
return
RPC_NT_SS_HANDLES_MISMATCH
;
case
RPC_X_SS_CANNOT_GET_CALL_HANDLE
:
return
RPC_NT_SS_CANNOT_GET_CALL_HANDLE
;
case
RPC_X_NULL_REF_POINTER
:
return
RPC_NT_NULL_REF_POINTER
;
case
RPC_X_ENUM_VALUE_OUT_OF_RANGE
:
return
RPC_NT_ENUM_VALUE_OUT_OF_RANGE
;
case
RPC_X_BYTE_COUNT_TOO_SMALL
:
return
RPC_NT_BYTE_COUNT_TOO_SMALL
;
case
RPC_X_BAD_STUB_DATA
:
return
RPC_NT_BAD_STUB_DATA
;
case
RPC_X_PIPE_CLOSED
:
return
RPC_NT_PIPE_CLOSED
;
case
RPC_X_PIPE_DISCIPLINE_ERROR
:
return
RPC_NT_PIPE_DISCIPLINE_ERROR
;
case
RPC_X_PIPE_EMPTY
:
return
RPC_NT_PIPE_EMPTY
;
case
ERROR_PASSWORD_MUST_CHANGE
:
return
STATUS_PASSWORD_MUST_CHANGE
;
case
ERROR_ACCOUNT_LOCKED_OUT
:
return
STATUS_ACCOUNT_LOCKED_OUT
;
default:
return
status
;
}
}
/******************************************************************************
...
...
dlls/rpcrt4/tests/rpc.c
View file @
f296a8ca
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment