<div class="content"><p>The Initialize 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 initializes the application&#39;s use of TAPI for the
subsequent use of the phone functions in the TAPI. It registers the
application&#39;s specified notification mechanism and returns the number of phone
devices that are available to the application.</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">hPhoneApp</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">hInstance</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">InitContext</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwFriendlyNameOffset</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwNumDevs</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwModuleNameOffset</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">dwAPIVersion</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>
 <tr>
  <td colspan="32">
  <p align="center">Reserved7</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">VarData
  (variable)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
</tbody></table><p><b>Req_Func (4 bytes): </b>The identifier of the
function that will be invoked on the remote server. This value MUST be set to
106.</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
MUST contain the result of the encapsulated telephony request. A value of 0
indicates success and a <a href="b1c6fae0-09ca-4f7b-85f6-1324376d231c" data-linktype="relative-path">PHONEERR_Constants</a>
value indicates failure. The remote server MUST complete this call
synchronously.</p>
</dd>
<dd>
<p>Returns zero if the request succeeds or a negative
error number if an error occurs. Common return values are:</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Name</p>
   </th>
   <th>
   <p>Value</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>PHONEERR_INVALAPPNAME</p>
  </td>
  <td>
  <p>0x00000008</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INIFILECORRUPT</p>
  </td>
  <td>
  <p>0x00000005</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INVALPOINTER</p>
  </td>
  <td>
  <p>0x00000015</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_NOMEM</p>
  </td>
  <td>
  <p>0x0000001A</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_OPERATIONFAILED</p>
  </td>
  <td>
  <p>0x0000001C</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_REINIT</p>
  </td>
  <td>
  <p>0x00000023</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_RESOURCEUNAVAIL</p>
  </td>
  <td>
  <p>0x0000001F</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_NODEVICE</p>
  </td>
  <td>
  <p>0x00000018</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_NODRIVER</p>
  </td>
  <td>
  <p>0x00000019</p>
  </td>
 </tr><tr>
  <td>
  <p>PHONEERR_INVALPARAM</p>
  </td>
  <td>
  <p>0x00000012</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>hPhoneApp (4 bytes): </b>An <a href="55b72ff6-9236-401b-846a-e8a78dfada1b" data-linktype="relative-path">HPHONEAPP</a>. Upon successful
completion of the request, this field contains the client usage handle for TAPI
phone requests. </p><p><b>hInstance (4 bytes): </b>An unsigned 32-bit
integer. Unused and MUST be ignored by the server.</p><p><b>InitContext (4 bytes): </b>An unsigned 32-bit
integer. The instance handle of the client application.</p><p><b>dwFriendlyNameOffset (4 bytes): </b>An unsigned
32-bit integer. The offset, in bytes, from the beginning of the variable data
area to a null-terminated Unicode string that contains the display name of the
client. For remote clients, this name is the remote computer name.</p><p><b>dwNumDevs (4 bytes): </b>An unsigned 32-bit
integer. Upon successful completion of the request, this field MUST contain the
number of phone devices that are available to the client. </p><p><b>dwModuleNameOffset (4 bytes): </b>An unsigned
32-bit integer. The offset, in bytes, from the beginning of the variable data
area to a null-terminated Unicode string that contains the display name of the
client. For remote clients, this name MUST be the remote computer name.</p><p><b>dwAPIVersion (4 bytes): </b>An unsigned 32-bit
integer. The highest TAPI version that is supported by the client. </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>VarData (variable): </b>Contains the
null-terminated Unicode strings that are indicated by the dwFriendlyNameOffset
and dwModuleNameOffset fields. </p><dl>
<dd>
<p>The contents of this field are DWORD-aligned.</p>
</dd></dl></div>