microsoft / microsoft/Windows-classic-samples

The IEnhancedStorageSilo.GetAction and GetPortableDevice methods always throw ERROR_INVALID_DATA

Open
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
5.7k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/microsoft/Windows-classic-samples/blob/27ffb0811ca761741502feaefdb591aebf592193/Samples/Win7Samples/winbase/storage/EhStorManaged/microsoft.storage.EhStorage.dll/EhStorAPIInterop.cs#L108

When using this code to enumerate silos, the GetAction and GetPortableDevice methods consistently fail

public void EnumStorage()
{
   StorageACTEnumerator stores = new StorageACTEnumerator();
   for (int i = 0; i < stores.ACTCount; i++)
   {
      var store = stores.GetACT(i);
      foreach (var silo in store.silos)
      {
         foreach (var action in silo.siloActions) // <<== Exception thrown at GetActions
         {
         }
      }
   }
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open EhStorAPIInterop.cs at line 108 and reproduce the EnumStorage example, focusing on the siloActions enumeration where GetAction fails. Trace both GetAction and GetPortableDevice through the interop declarations and verify the behavior against the EhStorManaged sample; done means these methods no longer consistently return ERROR_INVALID_DATA during silo enumeration.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.