P
Peter Duniho
Simon said:[...]
although the factory gets instantiated fine, I get an unhandle COM
exception error when the factory tries to create the constructedObject.
(FYI, I do have unit tests proving that this is okay in a pure COM
environment)
Well, as before, until you post a concise-but-complete code example, it
will not be possible to provide specific advice on an error you get,
especially without any other information about the error (exact text, in
what thread it occurs, what program statement, etc...the kinds of things
someone debugging the problem first-hand would be looking at in a debugger).
My experiment proves to me that a plain STA COM object created in a STA
thread works fine, with .NET or COM automatically handling
marshaling/proxying from other threads once you've got the managed
object representing the COM object. If you are getting an exception,
you either have some important difference from that scenario in your own
code, or an altogether unrelated bug somewhere else in your code.
Either way, without a concise-but-complete code example, I don't see how
the problem can be diagnosed by anyone other than you.
Pete