-
Notifications
You must be signed in to change notification settings - Fork 13
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
Question about proxy stubs #14
Comments
I though that .Net classes just have to be decorated with [STAThread] and [MTAThread] attributes and then COM interop automagically bakes the marshaling support in the executable. Not sure you have to do anything more explicit in the assembly manifest that On the client side (main VB6 exe) you just "reference" the .Net assembly with |
Actually the STA/MTA thread attributes only work on a .net application's Main function. In this case there is no main function because the application begins in VB6. .Net should have a way to invoke methods on the main thread using the dispatcher but I am hitting a little trouble with it and am testing using proxy stubs to see if that helps marshal to the correct thread. I know it has helped resolve errors for me before, but I had to manually add them to the manifest after running |
@bzuillsmith This is an old SO thread I don't remember taking part in but it says so (at least |
I'm not super knowledgeable on VB6 interop stuff, but my understanding is that if I make a .NET dll and want to expose it to COM in a way that marshals to the main thread automatically, I need some proxy stub elements in my .NET assembly's manifest, correct? It doesn't seem like mt.exe supports this? Is there an alternative to make this happen automatically using UMMM? Or do I have to write a separate script that inserts any needed proxy stubs?
I tried the Interface option but it puts the proxy stub in the .exe's manifest (a VB6 exe) instead of the .NET assembly's exe. I don't think that's right, but maybe I'm wrong...
The text was updated successfully, but these errors were encountered: