<div class="content"><p> </p><p>The AddAccessPath method adds an access <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_2cd71385-2d9c-4ab8-bf4a-7b258816d613" data-linktype="relative-path">path</a></span>
to the current <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_9a876829-33a1-4f0b-8b81-8552b7e5561c" data-linktype="relative-path">volume</a></span>.<a id="Appendix_A_Target_129"></a><a aria-label="Product behavior note 129" href="6b2552ee-ba27-409f-99a8-18841573327a#Appendix_A_129" data-linktype="relative-path">&lt;129&gt;</a></p><dl>
<dd>
<div><pre> HRESULT AddAccessPath(
   [in, max_is(MAX_PATH - 1), string] 
     WCHAR* pwszPath
 );
</pre></div>
</dd></dl><p><b>pwszPath: </b>A null-terminated Unicode string
that indicates the access path. A trailing backslash MUST be included if the
access path is a <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_1b153cd0-e3f3-4383-bc66-d5ad482c9766" data-linktype="relative-path">drive letter</a></span> (for
example, &#34;F:\&#34;).</p><p><b>Return Values: </b>The method MUST return zero or
a non-error <span><a href="8eef5d42-22d7-4302-aed9-12face91505a#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a></span> (as
specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>)
to indicate success, or return an implementation-specific nonzero error code to
indicate failure. For the HRESULT values predefined by the Virtual Disk Service
Remote Protocol, see section <span><a href="5102cc53-3143-4268-ba4c-6ea39e999ab4" data-linktype="relative-path">2.2.3</a></span>.</p><p>When the server receives this message, it MUST validate the
following parameter:</p><ul><li><p><span><span> 
</span></span>Verify that <b>pwszPath</b> is not NULL.</p>
</li></ul><p>The server MUST then perform the following in sequence:<a id="Appendix_A_Target_130"></a><a aria-label="Product behavior note 130" href="6b2552ee-ba27-409f-99a8-18841573327a#Appendix_A_130" data-linktype="relative-path">&lt;130&gt;</a></p><ul><li><p><span><span> 
</span></span>Add the access path to the volume.</p>
</li><li><p><span><span> 
</span></span>If the server determines that a mounted folder path name was
added to the volume, for each callback object that is registered in the list of
callback objects, the server MUST call the callback object&#39;s <span><a href="04a70bf6-208d-463a-b0a4-cc96e198ded1" data-linktype="relative-path">IVdsAdviseSink::OnNotify()</a></span>
method by using a <span><a href="4f29057f-ab32-4a3d-9fcb-00ba3457cb42" data-linktype="relative-path">VDS_NOTIFICATION</a></span>
structure that has the following attributes:</p>
<ul><li><p><span><span>  </span></span><b>objectType</b>
member is VDS_NTT_MOUNT_POINT.</p>
</li><li><p><span><span>  </span></span><b>MountPoint</b>
member is a <span><a href="f794c202-0975-48bd-b5e4-55a6c76579e1" data-linktype="relative-path">VDS_MOUNT_POINT_NOTIFICATION</a></span>
with the following attributes: </p>
<ul><li><p><span><span> 
</span></span><b>ulEvent</b> is VDS_NF_MOUNT_POINTS_CHANGE.</p>
</li><li><p><span><span> 
</span></span><b>volumeId</b> is the <span><a href="9186f1ce-04de-4df2-a8cf-3925a02fcd47" data-linktype="relative-path">VDS_OBJECT_ID</a></span> of
the volume object whose mount point was assigned.<a id="Appendix_A_Target_131"></a><a aria-label="Product behavior note 131" href="6b2552ee-ba27-409f-99a8-18841573327a#Appendix_A_131" data-linktype="relative-path">&lt;131&gt;</a></p>
</li></ul></li></ul></li><li><p><span><span> 
</span></span>If the server determines that a drive letter was added to the
volume, for each callback object that is registered in the list of callback
objects, the server MUST call the callback object&#39;s IVdsAdviseSink::OnNotify()
method by using a VDS_NOTIFICATION structure that has the following attributes:</p>
<ul><li><p><span><span>  </span></span><b>objectType</b>
member is VDS_NTT_DRIVE_LETTER.</p>
</li><li><p><span><span>  </span></span><b>Letter</b>
member is a <span><a href="c3e2078f-0a6d-4a58-97f4-3940bada14b3" data-linktype="relative-path">VDS_DRIVE_LETTER_NOTIFICATION</a></span>
that has the following attributes:</p>
<ul><li><p><span><span> 
</span></span><b>ulEvent</b> is VDS_NF_DRIVE_LETTER_ASSIGN.</p>
</li><li><p><span><span> 
</span></span><b>wcLetter</b> is the drive letter that was assigned to the
volume.</p>
</li><li><p><span><span> 
</span></span><b>volumeId</b> is the VDS_OBJECT_ID of the volume object whose
drive letter was assigned.</p>
</li></ul></li></ul></li><li><p><span><span> 
</span></span>Return an HRESULT indicating failure or success.</p>
</li></ul></div>