The Winamp Remote Control suite
a remote control client and plugin for Winamp 2.x, 5.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RPCErrors.cpp
Go to the documentation of this file.
1 /*
2 winamp remote control suite �Patrick Michael Martin 2000, 2001, 2002
3 
4 Copyright (C) 2000,2001,2002 Patrick M. Martin
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 Patrick M. Martin may be reached by email at patrickmmartin@gmail.com.
21 */
22 
23 #include <rpc.h>
24 #pragma hdrstop
25 
26 #include "RPCErrors.h"
27 
28 
29 char * RPCError(int RPCErr){
30 
31 switch (RPCErr){
32  case EPT_S_CANT_CREATE: return "The endpoint-map database cannot be created.";
33  case EPT_S_CANT_PERFORM_OP: return "The operation cannot be performed.";
34  case EPT_S_INVALID_ENTRY: return "The entry is invalid.";
35  case EPT_S_NOT_REGISTERED: return "There are no more endpoints available from the endpoint-map database.";
36  case RPC_S_ACCESS_DENIED: return "The user does not have sufficient privilege to complete the operation.";
37  case RPC_S_ADDRESS_ERROR: return "An addressing error has occurred on the server.";
38  case RPC_S_ALREADY_LISTENING: return "The server is already listening.";
39  case RPC_S_ALREADY_REGISTERED: return "The object UUID has already been registered.";
40  case RPC_S_BINDING_HAS_NO_AUTH: return "The binding does not contain any authentication information.";
41  case RPC_S_BINDING_INCOMPLETE: return "The binding handle is a required parameter.";
42  case RPC_S_BUFFER_TOO_SMALL: return "The buffer used to transmit data is too small.";
43  case RPC_S_CALL_CANCELLED: return "The remote procedure call exceeded the cancel timeout and was cancelled.";
44  case RPC_S_CALL_FAILED: return "The remote procedure call failed.";
45  case RPC_S_CALL_FAILED_DNE: return "The remote procedure call failed and did not execute.";
46  case RPC_S_CALL_IN_PROGRESS: return "A remote procedure call is already in progress for this thread.";
47  case RPC_S_CANNOT_SUPPORT: return "The requested operation is not supported.";
48  case RPC_S_CANT_CREATE_ENDPOINT: return "The endpoint cannot be created.";
49  case RPC_S_COMM_FAILURE: return "Unable to communicate with the server.";
50  case RPC_S_DUPLICATE_ENDPOINT: return "The endpoint is a duplicate.";
51  case RPC_S_ENTRY_ALREADY_EXISTS: return "The entry already exists.";
52  case RPC_S_ENTRY_NOT_FOUND: return "The entry is not found.";
53  case RPC_S_FP_DIV_ZERO: return "A floating-point operation at the server has caused a divide by zero.";
54  case RPC_S_FP_OVERFLOW: return "A floating-point overflow has occurred at the server.";
55  case RPC_S_FP_UNDERFLOW: return "A floating-point underflow occurred at the server.";
56  case RPC_S_GROUP_MEMBER_NOT_FOUND: return "The group member has not been found.";
57  case RPC_S_INCOMPLETE_NAME: return "The entry name is incomplete.";
58  case RPC_S_INTERFACE_NOT_FOUND: return "The interface has not been found.";
59  case RPC_S_INTERNAL_ERROR: return "An internal error has occurred in a remote procedure call.";
60  case RPC_S_INVALID_ARG: return "The specified argument is not valid.";
61  case RPC_S_INVALID_AUTH_IDENTITY: return "The security context is invalid.";
62  case RPC_S_INVALID_BINDING: return "The binding handle is invalid.";
63  case RPC_S_INVALID_BOUND: return "The array bounds are invalid.";
64  case RPC_S_INVALID_ENDPOINT_FORMAT: return "The endpoint format is invalid.";
65 // case RPC_S_INVALID_LEVEL: return "The level parameter is invalid.";
66  case RPC_S_INVALID_NAF_ID: return "The network-address family is invalid.";
67  case RPC_S_INVALID_NAME_SYNTAX: return "The name syntax is invalid.";
68  case RPC_S_INVALID_NET_ADDR: return "The network address is invalid.";
69  case RPC_S_INVALID_NETWORK_OPTIONS: return "The network options are invalid.";
70  case RPC_S_INVALID_OBJECT: return "The object is invalid.";
71  case RPC_S_INVALID_RPC_PROTSEQ: return "The RPC protocol sequence is invalid.";
72  case RPC_S_INVALID_SECURITY_DESC: return "The security descriptor is not in the valid format.";
73  case RPC_S_INVALID_STRING_BINDING: return "The string binding is invalid.";
74  case RPC_S_INVALID_STRING_UUID: return "The string UUID is invalid.";
75  case RPC_S_INVALID_TAG: return "The discriminant value does not match any of the case values.\nThere is no default case.";
76  case RPC_S_INVALID_TIMEOUT: return "The timeout value is invalid.";
77  case RPC_S_INVALID_VERS_OPTION: return "The version option is invalid.";
78  case RPC_S_MAX_CALLS_TOO_SMALL: return "The maximum number of calls is too small.";
79  case RPC_S_NAME_SERVICE_UNAVAILABLE: return "The name service is unavailable.";
80  case RPC_S_NO_BINDINGS: return "There are no bindings.";
81  case RPC_S_NO_CALL_ACTIVE: return "There is no remote procedure call active in this thread.";
82  case RPC_S_NO_CONTEXT_AVAILABLE: return "No security context is available to allow impersonation.";
83  case RPC_S_NO_ENDPOINT_FOUND: return "No endpoint has been found.";
84  case RPC_S_NO_ENTRY_NAME: return "The binding does not contain an entry name.";
85 // case RPC_S_NO_ENV_SETUP: return "No environment variable is set up.";
86  case RPC_S_NO_INTERFACES: return "No interfaces are registered.";
87 // case RPC_S_NO_INTERFACES_EXPORTED: return "No interfaces have been exported.";
88  case RPC_S_NO_MORE_BINDINGS: return "There are no more bindings.";
89 // case RPC_S_NO_MORE_ELEMENTS: return "There are no more elements.";
90  case RPC_S_NO_MORE_MEMBERS: return "There are no more members.";
91 // case RPC_S_NO_NS_PRIVILEGE: return "There is no privilege for a name-service operation.";
92  case RPC_S_NO_PRINC_NAME: return "No principal name is registered.";
93  case RPC_S_NO_PROTSEQS: return "There are no protocol sequences.";
94  case RPC_S_NO_PROTSEQS_REGISTERED: return "No protocol sequences have been registered.";
95  case RPC_S_NOT_ALL_OBJS_UNEXPORTED: return "Not all objects are unexported.";
96  case RPC_S_NOT_CANCELLED: return "The thread is not cancelled.";
97  case RPC_S_NOT_LISTENING: return "The server is not listening.";
98  case RPC_S_NOT_RPC_ERROR: return "The status code requested is not valid.";
99  case RPC_S_NOTHING_TO_EXPORT: return "There is nothing to export.";
100  case RPC_S_OBJECT_NOT_FOUND: return "The object UUID has not been found.";
101  case RPC_S_OK: return "The call has completed successfully.";
102  case RPC_S_OUT_OF_MEMORY: return "The needed memory is not available.";
103  case RPC_S_OUT_OF_RESOURCES: return "Not enough resources are available to complete this operation.";
104  case RPC_S_OUT_OF_THREADS: return "The RPC run-time library was not able to create another thread.";
105  case RPC_S_PROCNUM_OUT_OF_RANGE: return "The procedure number is out of range.";
106  case RPC_S_PROTOCOL_ERROR: return "An RPC protocol error has occurred.";
107  case RPC_S_PROTSEQ_NOT_FOUND: return "The RPC protocol sequence has not been found.";
108  case RPC_S_PROTSEQ_NOT_SUPPORTED: return "The RPC protocol sequence is not supported.";
109  case RPC_S_SEC_PKG_ERROR: return "There is an error with the security package.";
110 // case RPC_S_SERVER_NOT_LISTENING: return "The server is not listening for remote procedure calls.";
111  case RPC_S_SERVER_OUT_OF_MEMORY: return "The server has insufficient memory to complete this operation.";
112  case RPC_S_SERVER_TOO_BUSY: return "The server is too busy to complete this operation.";
113  case RPC_S_SERVER_UNAVAILABLE: return "The server is unavailable.";
114  case RPC_S_STRING_TOO_LONG: return "The string is too long.";
115  case RPC_S_TYPE_ALREADY_REGISTERED: return "The type UUID has already been registered.";
116  case RPC_S_UNKNOWN_AUTHN_LEVEL: return "The authentication level is unknown.";
117  case RPC_S_UNKNOWN_AUTHN_SERVICE: return "The authentication service is unknown.";
118  case RPC_S_UNKNOWN_AUTHN_TYPE: return "The authentication type is unknown.";
119  case RPC_S_UNKNOWN_AUTHZ_SERVICE: return "The authorization service is unknown.";
120  case RPC_S_UNKNOWN_IF: return "The interface is unknown.";
121  case RPC_S_UNKNOWN_MGR_TYPE: return "The manager type is unknown.";
122  case RPC_S_UNSUPPORTED_AUTHN_LEVEL: return "The authentication level is not supported.";
123  case RPC_S_UNSUPPORTED_NAME_SYNTAX: return "The name syntax is not supported.";
124  case RPC_S_UNSUPPORTED_TRANS_SYN: return "The transfer syntax is not supported by the server.";
125  case RPC_S_UNSUPPORTED_TYPE: return "The type UUID is not supported.";
126  case RPC_S_UUID_LOCAL_ONLY: return "The UUID that is only valid for this computer has been allocated.";
127  case RPC_S_UUID_NO_ADDRESS: return "No network address is available for constructing a UUID.";
128  case RPC_S_WRONG_KIND_OF_BINDING: return "The binding handle is not the correct type.";
129  case RPC_S_ZERO_DIVIDE: return "The server has attempted an integer divide by zero.";
130  case RPC_X_BAD_STUB_DATA: return "The stub has received bad data.";
131 // case RPC_X_BYTE_COUNT_TOO_SMAL: return "The byte count is too small.";
132  case RPC_X_ENUM_VALUE_OUT_OF_RANGE: return "The enumeration value is out of range.";
133 // case RPC_X_ENUM_VALUE_TOO_LARGE: return "The enumeration constant must be less than 65535.";
134 // case RPC_X_INVALID_BOUND: return "The specified bounds of an array are inconsistent.";
135 // case RPC_X_INVALID_TAG: return "The discriminant value does not match any of the case values. There is no default case.";
136 // case RPC_X_NO_MEMORY: return "Insufficient memory is available.";
137  case RPC_X_NO_MORE_ENTRIES: return "The list of servers available for the auto_handle binding has been exhausted.";
138  case RPC_X_NULL_REF_POINTER: return "A null reference pointer has been passed to the stub.";
139 // case RPC_X_SS_BAD_ES_VERSION: return "The operation for the serializing handle is not valid.";
140  case RPC_X_SS_CANNOT_GET_CALL_HANDLE: return "The stub is unable to get the call handle.";
141  case RPC_X_SS_CHAR_TRANS_OPEN_FAIL: return "The file designated by DCERPCCHARTRANS cannot be opened.";
142  case RPC_X_SS_CHAR_TRANS_SHORT_FILE: return "The file containing the character-translation table has fewer than 512 bytes.";
143  case RPC_X_SS_CONTEXT_DAMAGED: return "The context handle changed during a call.\nOnly raised on the client side.";
144  case RPC_X_SS_CONTEXT_MISMATCH: return "The context handle does not match any known context handles.";
145  case RPC_X_SS_HANDLES_MISMATCH: return "The binding handles passed to a remote procedure call do not match.";
146  case RPC_X_SS_IN_NULL_CONTEXT: return "A null context handle is passed in an in parameter position.";
147 // case RPC_X_SS_INVALID_BUFFER: return "The buffer is not valid for the operation.";
148 // case RPC_X_SS_WRONG_ES_VERSION: return "The software version is incorrect.";
149 // case RPC_X_SS_WRONG_STUB_VERSION: return "The stub version is incorrect.";
150  default:
151  return "unknown RPC error";
152  }
153 }
154