I was just wondering if anyone has managed to create a C# object that is exposed as a COM object and successfully insert it into the Running Obhect Table (ROT). Just as important, once in the table have you been able to extract it and actually call a method on it. To test this, I have created two projects. The first one creates the C# object and inserts in into the ROT. It then waits until cancelled. The second one attempts to retrieve the object from the ROT. The second project contains a reference to the dll that contains the C# object created in the first project. I believe I can successfully insert the object into the Running Object Table. As I can see the object in the ROT if I dump the contents. When I try to access the entry, I seem to be able to pull it out of the table. But when I try to bind to the object iMoniker.BindToObject(ctx, iMoniker, ref IID_ICancelAutoplay, out o);
I get a "System.IO.FileNotFoundException" indicating "The specified module could not be found (Exception from HRESULT:0x8007007e)". Any thoughts, hints would be greatly apreciated. I'd even be willing to be spoon feed on this one. Thanks Tim
T
Tim Almdal
@Tim Almdal
Posts
-
Has anyone been able to insert a C# object in the Running Object Table? -
My application stays alive in the process list after closing T-TI've run into similiar circumstances. I have the forms running on seperate threads and I also have a thread running a formless message loop. When the form closed, the application didn't shutdown because the other thread was still running. Try calling Application.Exit() when the form closes. It's probably not that simple, but I'd thought I'd pass on my 2-cents worth.
-
Can you inline IL code in C# similiar to the C++ asm keyword?Or failing that can you DynamicMethod to replace an existing Property Set Method? Thanks in advance Tim