<div class="content" name="SetNtmsObjectInformationW" uuid="014c0f23-ec32-4b57-ba22-1d584d802486"><p>The SetNtmsObjectInformationW method changes the information
of an object, with strings encoded using Unicode.</p><dl>
<dd>
<div><pre> HRESULT SetNtmsObjectInformationW(
   [in] LPNTMS_GUID lpObjectId,
   [in] LPNTMS_OBJECTINFORMATIONW lpInfo
 );
</pre></div>
</dd></dl><p><b>lpObjectId: </b>A pointer to the identifier of the
object to change.</p><p><b>lpInfo: </b> A pointer to an <a href="7a583c21-ca5c-4de4-9b65-96f2e1261625" data-linktype="relative-path">NTMS_OBJECTINFORMATIONW (section 2.2.4.21)</a>
structure describing the properties of the object to change.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>0x80070005 ERROR_ACCESS_DENIED</td>
  <td>Access to an object is denied.</td>
 </tr><tr>
  <td>0x80070008 ERROR_NOT_ENOUGH_MEMORY</td>
  <td>An allocation failure occurred during processing.</td>
 </tr><tr>
  <td>0x80070057 ERROR_INVALID_PARAMETER</td>
  <td>A parameter is not valid.</td>
 </tr><tr>
  <td>0x800710D9 ERROR_DATABASE_FAILURE</td>
  <td>The database query or update failed.</td>
 </tr><tr>
  <td>0x800710DA ERROR_DATABASE_FULL</td>
  <td>The database is full.</td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST verify that
both <i>lpObjectId</i> and <i>lpInfo</i> are not NULL. If parameter validation
fails, the server MUST immediately fail the operation and return
ERROR_INVALID_PARAMETER (0x80070057).</p><p>If parameter validation succeeds, the server MUST verify
that the user has the required access rights. If the client does not have the
required access rights, the server MUST return ERROR_ACCESS_DENIED
(0x80070005).</p><p>All writable properties for the object (as specified in the
following table) MUST be read from the NTMS_OBJECTINFORMATIONW structure and
written to the database, regardless of any write operations that have occurred
between the time this application called the <a href="3f468d97-dd61-428f-b64d-54ccd58b1f9e" data-linktype="relative-path">GetNtmsServerObjectInformationW</a>
method and the SetNtmsObjectInformationW method. </p><p>The following objects have members that can be updated.</p><table><thead>
  <tr>
   <th>
   <p> Object </p>
   </th>
   <th>
   <p> Members </p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>NTMS_CHANGER</td>
  <td>szDescription MAY require NTMS_MODIFY_ACCESS to the library.&lt;49&gt;</td>
 </tr><tr>
  <td>NTMS_CHANGER_TYPE</td>
  <td>szDescription MAY require NTMS_MODIFY_ACCESS to the computer.&lt;50&gt;</td>
 </tr><tr>
  <td>NTMS_COMPUTER</td>
  <td>dwMediaPoolPolicy dwLibRequestFlags dwLibRequestPurgeTime dwOpRequestFlags dwOpRequestPurgeTime szDescription MAY require NTMS_MODIFY_ACCESS to the computer.&lt;51&gt;</td>
 </tr><tr>
  <td>NTMS_DRIVE</td>
  <td>dwDeferDismountDelay szDescription MAY require NTMS_MODIFY_ACCESS to the library.&lt;52&gt;</td>
 </tr><tr>
  <td>NTMS_DRIVE_TYPE</td>
  <td>szDescription MAY require NTMS_MODIFY_ACCESS to the computer.&lt;53&gt;</td>
 </tr><tr>
  <td>NTMS_IEDOOR</td>
  <td>MaxOpenSecs szDescription MAY require NTMS_MODIFY_ACCESS to the library.&lt;54&gt;</td>
 </tr><tr>
  <td>NTMS_IEPORT</td>
  <td>MaxExtendSecs szDescription MAY require NTMS_MODIFY_ACCESS to the library.&lt;55&gt;</td>
 </tr><tr>
  <td>NTMS_LIBRARY</td>
  <td>AutoRecovery dwCleanerUsesRemaining dwFlags InventoryMethod szDescription szName MAY require NTMS_CONTROL_ACCESS to the library.&lt;56&gt;</td>
 </tr><tr>
  <td>NTMS_LIBREQUEST</td>
  <td>szDescription MAY have NTMS_MODIFY_ACCESS to the library.&lt;57&gt;</td>
 </tr><tr>
  <td>NTMS_LOGICAL_MEDIA</td>
  <td>szDescription szName MAY require NTMS_MODIFY_ACCESS to the media pool of the logical media.&lt;58&gt;</td>
 </tr><tr>
  <td>NTMS_MEDIA_POOL</td>
  <td>AllocationPolicy DeallocationPolicy dwMaxAllocates MediaType szDescription szName MAY require NTMS_MODIFY_ACCESS to the media pool.&lt;59&gt;</td>
 </tr><tr>
  <td>NTMS_MEDIA_TYPE</td>
  <td>szDescription MAY require NTMS_MODIFY_ACCESS to the computer.&lt;60&gt;</td>
 </tr><tr>
  <td>NTMS_OPREQUEST</td>
  <td>szDescription MAY require NTMS_MODIFY_ACCESS to the computer.&lt;61&gt;</td>
 </tr><tr>
  <td>NTMS_PARTITION</td>
  <td>szName szDescription MAY require NTMS_MODIFY_ACCESS to the media pool of the side.&lt;62&gt;</td>
 </tr><tr>
  <td>NTMS_PHYSICAL_MEDIA</td>
  <td>szDescription szName MAY require NTMS_MODIFY_ACCESS to the media pool.&lt;63&gt;</td>
 </tr><tr>
  <td>NTMS_STORAGESLOT</td>
  <td>szDescription MAY require NTMS_MODIFY_ACCESS to the library.&lt;64&gt;</td>
 </tr></tbody></table><p>Strings sent to this method as parameters MUST be
Unicode-encoded.</p></div>