49 {
"ERRbadfunc",1,
"Invalid function."},
50 {
"ERRbadfile",2,
"File not found."},
51 {
"ERRbadpath",3,
"Directory invalid."},
52 {
"ERRnofids",4,
"No file descriptors available"},
53 {
"ERRnoaccess",5,
"Access denied."},
54 {
"ERRbadfid",6,
"Invalid file handle."},
55 {
"ERRbadmcb",7,
"Memory control blocks destroyed."},
56 {
"ERRnomem",8,
"Insufficient server memory to perform the requested function."}
58 {
"ERRbadmem",9,
"Invalid memory block address."},
59 {
"ERRbadenv",10,
"Invalid environment."},
60 {
"ERRbadformat",11,
"Invalid format."},
61 {
"ERRbadaccess",12,
"Invalid open mode."},
62 {
"ERRbaddata",13,
"Invalid data."},
63 {
"ERR",14,
"reserved."},
64 {
"ERRbaddrive",15,
"Invalid drive specified."},
65 {
"ERRremcd",16,
"A Delete Directory request attempted to remove the server's current directory."},
66 {
"ERRdiffdevice",17,
"Not same device."},
67 {
"ERRnofiles",18,
"A File Search command can find no more files matching the specified criteria."},
68 {
"ERRbadshare",32,
"The sharing mode specified for an Open conflicts with existing FIDs on the file."},
69 {
"ERRlock",33,
"A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."},
70 {
"ERRbaddevtyp",66,
"The device type is incorrect for a tree connect."},
71 {
"ERRbadnetnam",67,
"The network name is incorrect or inappropriate."},
72 {
"ERRfilexists",80,
"The file named in a Create Directory, Make New File or Link request already exists."},
73 {
"ERRbadpipe",230,
"Pipe invalid."},
74 {
"ERRpipebusy",231,
"All instances of the requested pipe are busy."},
75 {
"ERRpipeclosing",232,
"Pipe close in progress."},
76 {
"ERRnotconnected",233,
"No process on other end of pipe."},
77 {
"ERRmoredata",234,
"There is more data to be returned."},
78 {
"ERRinvapi", 2142,
"The API is invalid."},
84 {
"ERRerror",1,
"Non-specific error code."},
85 {
"ERRbadpw",2,
"Bad password - name/password pair in a Tree Connect or Session Setup are invalid."},
86 {
"ERRbadtype",3,
"reserved."},
87 {
"ERRaccess",4,
"Network access denied. The requester does not have the necessary access rights within the specified context for the requested function. The context is defined by the TID or the UID."},
88 {
"ERRinvnid",5,
"The tree ID (TID) specified in a command was invalid."},
89 {
"ERRinvnetname",6,
"Invalid network name in tree connect."},
90 {
"ERRinvdevice",7,
"Invalid device - printer request made to non-printer connection or non-printer request made to printer connection."},
91 {
"ERRqfull",49,
"Print queue full (files) -- returned by open print file."},
92 {
"ERRqtoobig",50,
"Print queue full -- no space."},
93 {
"ERRqeof",51,
"EOF on print queue dump."},
94 {
"ERRinvpfid",52,
"Invalid print file FID."},
95 {
"ERRsmbcmd",64,
"The server did not recognize the command received."},
96 {
"ERRsrverror",65,
"The server encountered an internal error, e.g., system file unavailable."},
97 {
"ERRfilespecs",67,
"The file handle (FID) and pathname parameters contained an invalid combination of values."},
98 {
"ERRreserved",68,
"reserved."},
99 {
"ERRbadpermits",69,
"The access permissions specified for a file or directory are not a valid combination. The server cannot set the requested attribute."},
100 {
"ERRreserved",70,
"reserved."},
101 {
"ERRsetattrmode",71,
"The attribute mode in the Set File Attribute request is invalid."},
102 {
"ERRpaused",81,
"Server is paused."},
103 {
"ERRmsgoff",82,
"Not receiving messages."},
104 {
"ERRnoroom",83,
"No room to buffer message."},
105 {
"ERRrmuns",87,
"Too many remote user names."},
106 {
"ERRtimeout",88,
"Operation timed out."},
107 {
"ERRnoresource",89,
"No resources currently available for request."},
108 {
"ERRtoomanyuids",90,
"Too many UIDs active on this session."},
109 {
"ERRbaduid",91,
"The UID is not known as a valid ID on this session."},
110 {
"ERRusempx",250,
"Temp unable to support Raw, use MPX mode."},
111 {
"ERRusestd",251,
"Temp unable to support Raw, use standard read/write."},
112 {
"ERRcontmpx",252,
"Continue in MPX mode."},
113 {
"ERRreserved",253,
"reserved."},
114 {
"ERRreserved",254,
"reserved."},
115 {
"ERRpwdexp",2242,
"Password has expired."},
116 {
"ERRnosupport",0xFFFF,
"Function not supported."},
122 {
"ERRnowrite",19,
"Attempt to write on write-protected diskette."},
123 {
"ERRbadunit",20,
"Unknown unit."},
124 {
"ERRnotready",21,
"Drive not ready."},
125 {
"ERRbadcmd",22,
"Unknown command."},
126 {
"ERRdata",23,
"Data error (CRC)."},
127 {
"ERRbadreq",24,
"Bad request structure length."},
128 {
"ERRseek",25,
"Seek error."},
129 {
"ERRbadmedia",26,
"Unknown media type."},
130 {
"ERRbadsector",27,
"Sector not found."},
131 {
"ERRnopaper",28,
"Printer out of paper."},
132 {
"ERRwrite",29,
"Write fault."},
133 {
"ERRread",30,
"Read fault."},
134 {
"ERRgeneral",31,
"General failure."},
135 {
"ERRbadshare",32,
"A open conflicts with an existing open."},
136 {
"ERRlock",33,
"A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."},
137 {
"ERRwrongdisk",34,
"The wrong disk was found in a drive."},
138 {
"ERRFCBUnavail",35,
"No FCBs are available to process request."},
139 {
"ERRsharebufexc",36,
"A sharing buffer has been exceeded."},
140 {
"ERRdiskfull",39,
"The disk is full."},
153 {0x04,
"ERRXOS",
NULL},
154 {0xE1,
"ERRRMX1",
NULL},
155 {0xE2,
"ERRRMX2",
NULL},
156 {0xE3,
"ERRRMX3",
NULL},
157 {0xFF,
"ERRCMD",
NULL},
167 char internal_buf[80];
177 for (j=0; err[j].
name; j++)
179 if (err_code == err[j].
code) {
184 strncat(msg_buf,
" - ", len - strlen(msg_buf));
185 strncat(msg_buf, err[j].name, len - strlen(msg_buf));
186 strncat(msg_buf,
" (", len - strlen(msg_buf));
187 strncat(msg_buf, err[j].message, len - strlen(msg_buf));
188 strncat(msg_buf,
").", len - strlen(msg_buf));
190 return(strlen(msg_buf));
197 strncat(msg_buf,
" - ", len - strlen(msg_buf));
198 snprintf(internal_buf,
sizeof(internal_buf)-1,
"%d", err_code);
199 strncat(msg_buf, internal_buf, len - strlen(msg_buf));
200 strncat(msg_buf,
" (Unknown error code).", len - strlen(msg_buf));
202 return(strlen(msg_buf));
207 strncat(msg_buf,
" - ", len - strlen(msg_buf));
208 snprintf(internal_buf,
sizeof(internal_buf)-1,
"%d", err_code);
209 strncat(msg_buf, internal_buf, len - strlen(msg_buf));
211 return(strlen(msg_buf));
219 snprintf(internal_buf,
sizeof(internal_buf)-1,
"%d", err_class);
220 strncat(msg_buf, internal_buf, len - strlen(msg_buf));
221 strncat(msg_buf,
" (Unknown Error Class) - ", len - strlen(msg_buf));
222 snprintf(internal_buf,
sizeof(internal_buf)-1,
"%d", err_code);
223 strncat(msg_buf, internal_buf, len - strlen(msg_buf));
224 strncat(msg_buf,
"(error code).", len - strlen(msg_buf));
226 return(strlen(msg_buf));
err_code_struct * err_msgs
err_code_struct hard_msgs[]
err_code_struct server_msgs[]
int SMB_Get_SMB_Error_Msg(int err_class, int err_code, char *msg_buf, int len)
err_code_struct dos_msgs[]