-
Notifications
You must be signed in to change notification settings - Fork 199
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
Additional hint for the summary of IPortableDeviceContent::CreateObjectWithPropertiesAndData #483
Comments
For both methods, the XML comments exactly match those in the links you provided. Was there more you think is needed? |
I didn't find this text in VS 2022:
|
Right. The .NET framework, when marshaling strings, will internally call The
|
I'm using Marshal.ReleaseComObject(stream): If I don't call it, I can't use both mentioned methods again. While trying it, I get a message, that a resource is busy. (Sorry, at this moment I can't provide the correct error code or message.) |
Good. You're doing exactly what the documentation requires, but in .NET fashion. |
... and I believe, this hint inside your description would be helpful for other people. Because of this, I opened this issue. |
Added that note to those methods. |
Your changes are exactly, what I hope other developer helps. Thank you! |
In your description of IPortableDeviceContent::CreateObjectWithPropertiesAndData I would like to have a hint, that the stream must be released and how I should do that.
https://learn.microsoft.com/en-us/windows/win32/api/portabledeviceapi/nf-portabledeviceapi-iportabledevicecontent-createobjectwithpropertiesanddata
Same for IPortableDeviceResources::GetStream:
https://learn.microsoft.com/en-us/windows/win32/api/portabledeviceapi/nf-portabledeviceapi-iportabledeviceresources-getstream
PS I use a Marshal method for releasing and that works fine for me. But I mention this after I spend 30 to find this out (call me "stupid" if you want 🤫).
The text was updated successfully, but these errors were encountered: