Mount/Dismount wim file image
<p>I am trying to mount and dismount <code>wim</code> image using c#. </p>

<p>At first run my utility is properly mounting the wim image and dismounting the same.</p>

<p>But at second run onwards it throwing exception of WInAPI error code <code>-1052638937</code>. Below is my utility API code blocks:</p>

<pre><code>[DllImport("wimgapi.dll", EntryPoint = "WIMMountImage", SetLastError = true)]
    public static extern bool WIMMountImage(
    [MarshalAs(UnmanagedType.LPWStr)] string lpszMountPath,
    [MarshalAs(UnmanagedType.LPWStr)]  string lpszWimFileName,
    Int32 dwImageIndex,
    [Optional] [MarshalAs(UnmanagedType.LPWStr)]  string lpszTempPath
    );

[DllImport("wimgapi.dll", EntryPoint = "WIMUnmountImage", SetLastError = true)]
    public static extern int WIMUnmountImage(
    [MarshalAs(UnmanagedType.LPWStr)]  string lpszMountPath,
    [MarshalAs(UnmanagedType.LPWStr)]  string lpszWimFileName,
    Int32 dwImageIndex,
    int bCommitChanges
    );
</code></pre>

<p>Please help me to resolve this exception.</p>
