title: Using IPersistFile::Load multiple times with IPropertyStore
body: <p>I am iterating through a bunch of <code>.lnk</code> files and getting information on them.</p>
  
  <p>For each file I do this, this is js-ctypes but is a winapi question. I removed the error checking and simplified the code:</p>
  
  <pre><code>var hr_CoInitializeEx = ostypes.API('CoInitializeEx')(null, ostypes.CONST.COINIT_APARTMENTTHREADED);
  
  var shellLinkPtr = ostypes.TYPE.IShellLinkW.ptr();
  var hr_CoCreateInstance = ostypes.API('CoCreateInstance')(ostypes.CONST.CLSID_ShellLink.address(), null, ostypes.CONST.CLSCTX_INPROC_SERVER, ostypes.CONST.IID_IShellLink.address(), shellLinkPtr.address());
  shellLink = shellLinkPtr.contents.lpVtbl.contents;
  
  var persistFilePtr = ostypes.TYPE.IPersistFile.ptr();
  var hr_shellLinkQI = shellLink.QueryInterface(ostypes.CONST.IID_IPersistFile.address(), persistFilePtr.address());
  persistFile = persistFilePtr.contents.lpVtbl.contents;
  
  var propertyStorePtr = ostypes.TYPE.IPropertyStore.ptr();
  var hr_shellLinkQI2 = shellLink.QueryInterface(ostypes.CONST.IID_IPropertyStore.address(), propertyStorePtr.address());
  propertyStore = propertyStorePtr.contents.lpVtbl.contents;
  
  for (var i = 0; i &lt; arrOSPath.length; i++) {
      var hr_Load = persistFile.Load(persistFilePtr, arrOSPath[i], 0);
  
      var ppropvar = ostypes.TYPE.PROPVARIANT();
      var hr_GetValue = propertyStore.GetValue(ostypes.CONST.PKEY_AppUserModel_ID.address(), ppropvar.address());
      console.log(ppropvar.pwszVal); ////// &lt;&lt;&lt;&lt;&lt; this is fishy
  
      var rez_PropVariantClear = ostypes.API('PropVariantClear')(ppropvar.address());
  }
  
  // cleanup
  persistFile.Release(persistFilePtr);
  propertyStore.Release(propertyStorePtr);
  shellLink.Release(shellLinkPtr);
  ostypes.API('CoUninitialize')();
  </code></pre>
  
  <p>However <code>ppropvar.pwszVal</code> is coming out to be the SystemAppUserModelID of the first file I <code>IPersitFile::Load</code>ed, is this expected? Do I have to <code>CoUninitialize</code> and <code>CoInitialize</code> each loop or something to fix this?</p>
  
  <p>Thanks</p>