<div class="content" name="GetID_Line" uuid="f28ef6f7-6da5-4738-924b-80207877ef91"><p>The GetID 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 returns a device identifier for the specified device class
that is associated with the selected line, address, or call.</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">Req_Func</td>
 </tr>
 <tr>
  <td colspan="32">Reserved1</td>
 </tr>
 <tr>
  <td colspan="32">hLine</td>
 </tr>
 <tr>
  <td colspan="32">dwAddressID</td>
 </tr>
 <tr>
  <td colspan="32">hCall</td>
 </tr>
 <tr>
  <td colspan="32">dwSelect</td>
 </tr>
 <tr>
  <td colspan="32">lpDeviceID</td>
 </tr>
 <tr>
  <td colspan="32">lpszDeviceClass</td>
 </tr>
 <tr>
  <td colspan="32">Reserved2</td>
 </tr>
 <tr>
  <td colspan="32">Reserved3</td>
 </tr>
 <tr>
  <td colspan="32">Reserved4</td>
 </tr>
 <tr>
  <td colspan="32">Reserved5</td>
 </tr>
 <tr>
  <td colspan="32">Reserved6</td>
 </tr>
 <tr>
  <td colspan="32">Reserved7</td>
 </tr>
 <tr>
  <td colspan="32">Reserved8</td>
 </tr>
 <tr>
  <td colspan="32">VarData (variable)</td>
 </tr>
 <tr>
  <td colspan="32">...</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 37.</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 value of 0
indicates success, and a <a href="e0e8af90-24f1-4dbc-8d4e-01b8e4e7cb53" data-linktype="relative-path">LINEERR_Constants</a>
value indicates failure. The remote server MUST complete this call
synchronously.</p>
</dd>
<dd>
<p>MUST return zero if the function succeeds or an
error number if an error occurs. Common return values are as follows: </p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Name</p>
   </th>
   <th>
   <p>Value</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>LINEERR_INVALLINEHANDLE</td>
  <td>0x8000002B</td>
 </tr><tr>
  <td>LINEERR_NOMEM</td>
  <td>0x80000044</td>
 </tr><tr>
  <td>LINEERR_INVALADDRESSID</td>
  <td>0x80000011</td>
 </tr><tr>
  <td>LINEERR_OPERATIONUNAVAIL</td>
  <td>0x80000049</td>
 </tr><tr>
  <td>LINEERR_INVALCALLHANDLE</td>
  <td>0x80000018</td>
 </tr><tr>
  <td>LINEERR_OPERATIONFAILED</td>
  <td>0x80000048</td>
 </tr><tr>
  <td>LINEERR_NODEVICE</td>
  <td>0x80000042</td>
 </tr><tr>
  <td>LINEERR_RESOURCEUNAVAIL</td>
  <td>0x8000004B</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>hLine (4 bytes): </b>An <a href="9a80ee5c-cf55-4a86-bd67-173059d6ff3c" data-linktype="relative-path">HLINE</a>. The handle to an
open line device. This field MUST have been obtained by sending the <a href="2759c744-e040-4c5d-b4b5-215d391f0490" data-linktype="relative-path">Open</a> packet.</p><p><b>dwAddressID (4 bytes): </b>An unsigned 32-bit
integer. An address on the specified open line device. 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.  TAPI does not validate this parameter when this
function is called.</p><p><b>hCall (4 bytes): </b>An <a href="7f4089a0-7432-4ef0-8eeb-5aafe407c07e" data-linktype="relative-path">HCALL</a>. The handle to a
call. One way of obtaining a valid hCall is by sending the <a href="c9acdfde-22de-43ff-b491-23a9ed72fb31" data-linktype="relative-path">MakeCall</a> packet.</p><p><b>dwSelect (4 bytes): </b>An unsigned 32-bit
integer. Specifies whether the device identifier that is requested is
associated with the line, address, or a single call. The dwSelect parameter
MUST have only one of the <a href="204f1186-238f-4465-8c1c-db5e56a185ab" data-linktype="relative-path">LINECALLSELECT_Constants</a>.</p><p><b>lpDeviceID (4 bytes): </b>An unsigned 32-bit
integer. The size, in bytes, of a <a href="6f9a33e6-6c4c-4d2a-91ee-fb1bf1e7fc20" data-linktype="relative-path">VARSTRING</a> packet that
contains the device identifier upon successful completion of the request. </p><dl>
<dd>
<p>On successful completion, this field contains the
offset, in bytes, of the packet in the VarData field.</p>
</dd></dl><p><b>lpszDeviceClass (4 bytes): </b>An unsigned 32-bit
integer. The offset, in bytes, in the VarData field of a null-terminated string
that specifies the device class of the device whose identifier is requested.</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><p><b>Reserved7 (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>Reserved8 (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>VarData (variable): </b>Contains a null-terminated
Unicode string that is indicated by the lpszDeviceClass field in the original
request. On successful completion of the request, this field contains only a
VARSTRING packet that is indicated by the lpDeviceConfig field.</p><dl>
<dd>
<p>The contents of this field MUST be DWORD-aligned, as
specified in <a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>
section <a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">2.2.9</a>.</p>
</dd></dl></div>