blob: 266585608268b2d4220d1ce4cf67fa1a1ca01697 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
/*
Unix SMB/CIFS implementation.
test suite for spoolss rpc operations
Copyright (C) Guenther Deschner 2009
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "spoolss.h"
const char *errstr(DWORD error)
{
static char tmp[20];
switch (error) {
case ERROR_FILE_NOT_FOUND:
return "ERROR_FILE_NOT_FOUND";
case ERROR_ACCESS_DENIED:
return "ERROR_ACCESS_DENIED";
case ERROR_INVALID_PARAMETER:
return "ERROR_INVALID_PARAMETER";
case ERROR_INVALID_HANDLE:
return "ERROR_INVALID_HANDLE";
case ERROR_CALL_NOT_IMPLEMENTED:
return "ERROR_CALL_NOT_IMPLEMENTED";
case ERROR_INSUFFICIENT_BUFFER:
return "ERROR_INSUFFICIENT_BUFFER";
case ERROR_INVALID_NAME:
return "ERROR_INVALID_NAME";
case ERROR_INVALID_LEVEL:
return "ERROR_INVALID_LEVEL";
case ERROR_INVALID_DATA:
return "ERROR_INVALID_DATA";
case ERROR_MORE_DATA:
return "ERROR_MORE_DATA";
#ifdef ERROR_INVALID_DATATYPE
case ERROR_INVALID_DATATYPE:
return "ERROR_INVALID_DATATYPE";
#endif
case ERROR_INVALID_ENVIRONMENT:
return "ERROR_INVALID_ENVIRONMENT";
case ERROR_INVALID_PRINTER_COMMAND:
return "ERROR_INVALID_PRINTER_COMMAND";
case ERROR_PRINTER_ALREADY_EXISTS:
return "ERROR_PRINTER_ALREADY_EXISTS";
case ERROR_INVALID_PRINTER_NAME:
return "ERROR_INVALID_PRINTER_NAME";
case ERROR_INVALID_PRIORITY:
return "ERROR_INVALID_PRIORITY";
case ERROR_INVALID_SEPARATOR_FILE:
return "ERROR_INVALID_SEPARATOR_FILE";
case ERROR_UNKNOWN_PRINTPROCESSOR:
return "ERROR_UNKNOWN_PRINTPROCESSOR";
case ERROR_UNKNOWN_PRINTER_DRIVER:
return "ERROR_UNKNOWN_PRINTER_DRIVER";
case ERROR_UNKNOWN_PORT:
return "ERROR_UNKNOWN_PORT";
case ERROR_PRINTER_DRIVER_ALREADY_INSTALLED:
return "ERROR_PRINTER_DRIVER_ALREADY_INSTALLED";
case ERROR_UNKNOWN_PRINT_MONITOR:
return "ERROR_UNKNOWN_PRINT_MONITOR";
case ERROR_PRINTER_DRIVER_IN_USE:
return "ERROR_PRINTER_DRIVER_IN_USE";
case ERROR_SPOOL_FILE_NOT_FOUND:
return "ERROR_SPOOL_FILE_NOT_FOUND";
case ERROR_SPL_NO_STARTDOC:
return "ERROR_SPL_NO_STARTDOC";
case ERROR_SPL_NO_ADDJOB:
return "ERROR_SPL_NO_ADDJOB";
case ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED:
return "ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED";
case ERROR_PRINT_MONITOR_ALREADY_INSTALLED:
return "ERROR_PRINT_MONITOR_ALREADY_INSTALLED";
case ERROR_INVALID_PRINT_MONITOR:
return "ERROR_INVALID_PRINT_MONITOR";
case ERROR_PRINT_MONITOR_IN_USE:
return "ERROR_PRINT_MONITOR_IN_USE";
case ERROR_PRINTER_HAS_JOBS_QUEUED:
return "ERROR_PRINTER_HAS_JOBS_QUEUED";
case ERROR_PRINTER_NOT_FOUND:
return "ERROR_PRINTER_NOT_FOUND";
case ERROR_PRINTER_DRIVER_WARNED:
return "ERROR_PRINTER_DRIVER_WARNED";
case ERROR_PRINTER_DRIVER_BLOCKED:
return "ERROR_PRINTER_DRIVER_BLOCKED";
#ifdef ERROR_PRINTER_DRIVER_PACKAGE_IN_USE
case ERROR_PRINTER_DRIVER_PACKAGE_IN_USE:
return "ERROR_PRINTER_DRIVER_PACKAGE_IN_USE";
#endif
#ifdef ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND
case ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND:
return "ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND";
#endif
#ifdef ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED
case ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED:
return "ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED";
#endif
#ifdef ERROR_PRINT_JOB_RESTART_REQUIRED
case ERROR_PRINT_JOB_RESTART_REQUIRED:
return "ERROR_PRINT_JOB_RESTART_REQUIRED";
#endif
case ERROR_CANCELLED:
return "ERROR_CANCELLED";
case ERROR_NOACCESS:
return "ERROR_NOACCESS";
case RPC_S_PROCNUM_OUT_OF_RANGE:
return "RPC_S_PROCNUM_OUT_OF_RANGE";
case RPC_S_SERVER_UNAVAILABLE:
return "RPC_S_SERVER_UNAVAILABLE";
case RPC_S_INVALID_NET_ADDR:
return "RPC_S_INVALID_NET_ADDR";
case RPC_S_CALL_FAILED:
return "RPC_S_CALL_FAILED";
default:
break;
}
sprintf(tmp, "0x%08x", error);
return tmp;
}
|