Files
2024-02-19 00:25:23 -05:00

142 lines
5.5 KiB
HTML

Note that DPMI 0.9 hosts are <em>not</em> required to return a valid
error code in AX. You may only rely on the carry flag being set if an
error occurred. <p>
Nearly all Int 31H function calls can fail, either because of client
errors, unavailable resources, or internal host problems. Most
failures due to client errors and all failures due to unavailable
resources are reported to the client via error codes. Some client
errors, such as passing an invalid pointer in a function call, may
cause the host to fault; the client can detect these events by
installing an exception handler. <p>
Internal host errors are handled in a host-specific manner and
generally not reported to clients with an error code. The only
exception to this is the case when a host cannot allocate internal
resources. Any Int 31H function is capable of returning error code
8010H to indicate this condition.<p>
A DPMI 1.0 host signals an error by returning from a function with the
Carry flag set and an error code in AX. If the error code has bit 15
clear (0), the DPMI host is passing a DOS error code through to the
client; for a list of these error codes, consult a DOS technical
reference. If the error code has bit 15 set (1), it is generated
within the DPMI host, and is interpreted according to the list below.
All DPMI 1.0 hosts are required to check for the error conditions
listed in this specification, and must return the error codes that are
documented for each function.<p>
If Int 31H is invoked with an function number that is not defined in
this specification, the DPMI host will return the "Unsupported
Function" error code 8001H. The table lists all defined error codes
and their messages. Unused error codes are reserved for the later
versions of the DPMI spcifications.<p>
<table border=1 cellspacing=0 cellpadding=4>
<tr><th>Error Code</th>
<th>Name</th>
<th>Explanation</th></tr>
<tr><td>0007H</td>
<td align=left>Memory configuration blocks damaged</td>
<td align=left>The operating system has detected corruption in the real-mode memory arena.</td></tr>
<tr><td>0008H</td>
<td align=left>Insufficient memory</td>
<td align=left>There is not enough real-mode memory to satisfy the request.</td></tr>
<tr><td>0009H</td>
<td align=left>Incorrect memory segment specified</td>
<td align=left>The segment value specified was not one provided by the operating system</td></tr>
<tr><td>8001H</td>
<td align=left>Unsupported function</td>
<td align=left>Returned in response to any function call which is not implemented by this host, because the requested function is either undefined or optional.</td></tr>
<tr><td>8002H</td>
<td align=left>Invalid state</td>
<td align=left>Some object is in the wrong state for the requested operation.</td></tr>
<tr><td>8003H</td>
<td align=left>System integrity</td>
<td align=left>The requested operation would endanger system integrity, e.g., a request to map linear addresses onto system code or data.</td></tr>
<tr><td>8004H</td>
<td align=left>Deadlock</td>
<td align=left>Host detected a deadlock situation.</td></tr>
<tr><td>8005H</td>
<td align=left>Request cancelled</td>
<td align=left>A pending serialization request was cancelled.</td></tr>
<tr><td>8010H</td>
<td align=left>Resource Unavailable</td>
<td align=left>The DPMI host cannot allocate internal resources to complete an operation.</td></tr>
<tr><td>8011H</td>
<td align=left>Descriptor unavailable</td>
<td align=left>Host is unable to allocate a descriptor.</td></tr>
<tr><td>8012H</td>
<td align=left>Linear memory unavailable</td>
<td align=left>Host is unable to allocate the required linear memory.</td></tr>
<tr><td>8013H</td>
<td align=left>Physical memory unavailable</td>
<td align=left>Host is unable to allocate the required physical memory.</td></tr>
<tr><td>8014H</td>
<td align=left>Backing store unavailable</td>
<td align=left>Host is unable to allocate the required backing store.</td></tr>
<tr><td>8015H</td>
<td align=left>Callback unavailable</td>
<td align=left>Host is unable to allocate the required callback address.</td></tr>
<tr><td>8016H</td>
<td align=left>Handle unavailable</td>
<td align=left>Host is unable to allocate the required handle.</td></tr>
<tr><td>8017H</td>
<td align=left>Lock count exceeded</td>
<td align=left>A locking operation exceeds the maximum count maintained by the host.</td></tr>
<tr><td>8018H</td>
<td align=left>Resource owned exclusively</td>
<td align=left>A request for serialization of a shared memory block could not be satisfied because it is already serialized exclusively by another client.</td></tr>
<tr><td>8019H</td>
<td align=left>Resource owned shared</td>
<td align=left>A request for exclusive serialization of a shared memory block could not be satisfied because it is already serialized shared by another client.</td></tr>
<tr><td>8021H</td>
<td align=left>Invalid value</td>
<td align=left>A numeric or flag parameter has an invalid value.</td></tr>
<tr><td>8022H</td>
<td align=left>Invalid selector</td>
<td align=left>A selector does not correspond to a valid descriptor.</td></tr>
<tr><td>8023H</td>
<td align=left>Invalid handle</td>
<td align=left>A handle parameter is invalid.</td></tr>
<tr><td>8024H</td>
<td align=left>Invalid callback</td>
<td align=left>A callback parameter is invalid.</td></tr>
<tr><td>8025H</td>
<td align=left>Invalid linear address</td>
<td align=left>A linear address range (either supplied as a parameter or implied by the call) is invalid.</td></tr>
<tr><td>8026H</td>
<td align=left>Invalid request</td>
<td align=left>The request is not supported by the underlying hardware.</td></tr>
</table>