Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComStream might threw NotImplementException when IStream is not a file #373

Closed
zhuxb711 opened this issue Jan 28, 2023 · 1 comment
Closed

Comments

@zhuxb711
Copy link

Describe the bug and how to reproduce

NotImplementException was threw in ComStream.Close() when IStream is not a file. Better to catch that exception and ignore it silently.

   At System.Runtime.InteropServices.ComTypes.IStream.Commit(Int32 grfCommitFlags)
   AT Vanara.InteropServices.ComStream.Close()

What code is involved

// In my case get IStream from clipboard format: "FileContents".
// I guess NotImplementException should also threw if IStream is not a file 
new ComStream(IStream).Dispose() //Although we should not dispose an object from clipboard 

Expected behavior
Do not threw any exception on dispose, catch all exceptions and ignore them.

dahall added a commit that referenced this issue Jan 29, 2023
@dahall
Copy link
Owner

dahall commented Jan 29, 2023

Please test with latest build and confirm resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants