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

COM object lifetime is subject to Windows rundown policy (6 minute idle) #10777

Closed
jeffschwMSFT opened this issue Jul 26, 2018 · 2 comments
Closed

Comments

@jeffschwMSFT
Copy link
Member

Call CoMarshalInterface with MSHLFLAGS_TABLESTRONG (as opposed to MSHLFLAGS_NORMAL) to avoid COM rundown timeouts.

https://github.com/dotnet/coreclr/blob/8e48db2c113052ef18cdafb43e114a8633864ec0/src/vm/comcache.cpp#L178

The lifetime issue tends to hit very large applications. Viable workarounds are: 1) use the COM objects regularly, or 2) avoid the .NET COM cache and get the raw IntPtr then call GetUniqueObjectForIUnknown.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@AaronRobinsonMSFT
Copy link
Member

An alternative to this would be leverage the GIT or IAgileReference type - depending on platform support.

@AaronRobinsonMSFT
Copy link
Member

Changing the built-in COM support semantics is something we are attempting to avoid. A source generator with needed semantics could be create using the ComWrappers API if this is causing issues.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants