<div class="content"><p>The GetAgentCaps packet is transmitted from a TAPI <a href="489de77f-16d8-4c4f-939a-f795e8b42893#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a> to a TAPI <a href="489de77f-16d8-4c4f-939a-f795e8b42893#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a> in a <a href="489de77f-16d8-4c4f-939a-f795e8b42893#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">remote procedure call</a>.
Sending this packet obtains the agent-related capabilities that are supported
on the specified line device. If a specific agent is named, the capabilities
include a listing of ACD groups into which the agent is permitted to log in. </p><table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Req_Func</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved1</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwRequestID</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">lpContext</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">hLineApp</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwDeviceID</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwAddressID</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwAppAPIVersion</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">lpAgentCapsContext</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">lpAgentCapsSize</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved2</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved3</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved4</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved5</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved6</p>
  </td>
 </tr>
</tbody></table><p><b>Req_Func (4 bytes): </b>An unsigned 32-bit
integer. The identifier of the function that will be invoked on the remote
server. This value MUST be set to 25.</p><dl>
<dd>
<p><b>Return Values</b></p>
</dd>
<dd>
<p>On completion of <a href="c28c36d0-579b-4e20-a100-f4e71012d5f8" data-linktype="relative-path">ClientRequest</a>, this field
contains the result of the encapsulated telephony request. A nonzero request ID
value indicates that the request is in progress and will complete
asynchronously and a <a href="e0e8af90-24f1-4dbc-8d4e-01b8e4e7cb53" data-linktype="relative-path">LINEERR_Constants</a>
value indicates synchronous failure.</p>
</dd>
<dd>
<p>MUST return a positive request identifier if the
asynchronous operation starts; otherwise, this function MUST return one of
these negative error values:</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Name</p>
   </th>
   <th>
   <p>Value</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>LINEERR_BADDEVICEID</p>
  </td>
  <td>
  <p>0x80000002</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_INCOMPATIBLEAPIVERSION</p>
  </td>
  <td>
  <p>0x8000000C</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_INVALADDRESSID</p>
  </td>
  <td>
  <p>0x80000011</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_INVALAPPHANDLE</p>
  </td>
  <td>
  <p>0x80000014</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_INVALPOINTER</p>
  </td>
  <td>
  <p>0x80000035</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_NODEVICE</p>
  </td>
  <td>
  <p>0x80000042</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_NODRIVER</p>
  </td>
  <td>
  <p>0x80000043</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_NOMEM</p>
  </td>
  <td>
  <p>0x80000044</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_OPERATIONFAILED</p>
  </td>
  <td>
  <p>0x80000048</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_OPERATIONUNAVAIL</p>
  </td>
  <td>
  <p>0x80000049</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_RESOURCEUNAVAIL</p>
  </td>
  <td>
  <p>0x8000004B</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_STRUCTURETOOSMALL</p>
  </td>
  <td>
  <p>0x8000004D</p>
  </td>
 </tr><tr>
  <td>
  <p>LINEERR_UNINITIALIZED</p>
  </td>
  <td>
  <p>0x80000050</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Reserved1 (4 bytes): </b>An unsigned 32-bit
integer. MUST be set to zero when sent and MUST be ignored on receipt. </p><p><b>dwRequestID (4 bytes): </b>An unsigned 32-bit
integer. The identifier of the asynchronous request.</p><table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  </td>
  <td>
  <p>The server MUST generate a unique positive request ID
  to return as the Ack_ReturnValue.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000001 — 0x7FFFFFFF</p>
  </td>
  <td>
  <p>The server MUST use this value instead of generating a
  unique positive request ID.</p>
  </td>
 </tr></tbody></table><p><b>lpContext (4 bytes): </b>An unsigned 32-bit
integer. The opaque, client-specified value that is used by the client upon
request completion; MUST be returned by the server in the request completion
packet.</p><p><b>hLineApp (4 bytes): </b>An <a href="c12b4793-3220-4f9e-aa86-8edd3e7020d4" data-linktype="relative-path">HLINEAPP</a>. The handle to
the registration of the application with TAPI. This field MUST have been
obtained by sending the <a href="9d8eb7cd-3245-4e44-97e0-42f7b89c9424" data-linktype="relative-path">Initialize</a>
packet.</p><p><b>dwDeviceID (4 bytes): </b>An unsigned 32-bit
integer. The line device that contains the address to be queried.</p><p><b>dwAddressID (4 bytes): </b>An unsigned 32-bit
integer. The address on the specified line device whose capabilities are to be
queried. An address identifier is permanently associated with an address; the
identifier remains constant across operating system upgrades. A valid value of
dwAddressID is in the range 0 to dwNumAddresses – 1. The client obtains dwNumAddresses
from the <a href="f236ea7a-c8a2-4681-b87c-9f0e07a01dc6" data-linktype="relative-path">LINEDEVCAPS</a>
obtained by sending a <a href="ee317c21-100e-48a3-bcce-e9991efff889" data-linktype="relative-path">GetDevCaps</a>
packet to the remote server.</p><p><b>dwAppAPIVersion (4 bytes): </b>An unsigned 32-bit
integer. The highest TAPI version that is supported by the application. This
SHOULD not be the value that is negotiated by using NegotiateAPIVersion on the
device being queried.</p><p><b>lpAgentCapsContext (4 bytes): </b>An unsigned
32-bit integer. The opaque, client-specified value that is used by the client
upon request completion; MUST be returned by the server in the request
completion packet.</p><p><b>lpAgentCapsSize (4 bytes): </b>An unsigned 32-bit
integer. The maximum size, in bytes, of agent capabilities data that the client
accepts on successful completion of this request.</p><p><b>Reserved2 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved3 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved4 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved5 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p><p><b>Reserved6 (4 bytes): </b>An unsigned 32-bit
integer. This field is used for padding and MUST be ignored on receipt. It can
be any value.</p></div>