Questions tagged [running-object-table]

A central table listing all running com objects. Those will not be added automatically, every object has to this for its own.

A central table listing all running com objects. Those will not be added automatically, every object has to this for its own.

It's a mechanism to help programs to ensure only one instance of itself is running at the same time.

19 questions
21
votes
3 answers

Problems accessing the Running Object Table

In my program I use the Running Object Table (ROT) to ensure only one instance of my program is running. Since I "inherit" that code from a developer who unfortunately left the company, I am the poor guy to solve the problems. The code works fine,…
Fischermaen
  • 12,238
  • 2
  • 39
  • 56
5
votes
1 answer

Where can I get a Running Object Table Viewer like IROTVIEW?

Once upon a time Windows SDK (or it was Visual Studio) had a tool named IROTVIEW which enumerated the Running Object Table (ROT). Where can I get this tool now?
Mike
  • 1,274
  • 10
  • 24
3
votes
1 answer

How can I get IEnumMoniker.Next to return monikers when running as administrator?

This code has been running fine for years inside a utility program. We recently updated the program to enforce UAC but we find this code only works when NOT running as administrator; the code inside the while loop is never executed when run as admin…
sartoris
  • 816
  • 1
  • 7
  • 21
3
votes
1 answer

Add items to the ROT( Running Objects Table)

I know how to use *****.GetActiveObject(ProgId), however the problem is that several of the Applications I use this code line on are not added to the ROT, even if they are already open, I get an HRESULT Error. However If I click on another…
2
votes
0 answers

Why would a Windows service not be able to access the Running Object Table

I have a Windows service running in the background and I want at some point to tell him to get objects from the Running Object Table. The problem is that it seems impossible to achieve, whatever I try. It always fails at the GetObject method from…
Norgannon
  • 487
  • 4
  • 16
2
votes
1 answer

C# Running Active Automation Object - How to Source events?

I have a (long running) console application, written in C#, which I want to be able to manipulate through COM (so no InProc DLLs and regasm.exe). IDispatch is all I need - so a classic OLE Automation object. Here I'll present a minimal version of…
Cleric
  • 3,618
  • 1
  • 14
  • 13
2
votes
1 answer

Anyone got C# source for Running Object Table viewer?

Answering my own question here. The Running Object Table (ROT) is a Microsoft Component Object Model (COM) artefact where Excel and Word documents can register themselves to make them accessible to any other application on a machine. The ROT thus…
S Meaden
  • 8,050
  • 3
  • 34
  • 65
1
vote
1 answer

how to programmatically register Word instance in running object table?

This is a possible duplicate. Couldn't find the exact one, I remember going through one such long time back. The tool needs a capability to detect if any MS Word file is opened anywhere from the computer. So we use a process watcher, like…
nawfal
  • 70,104
  • 56
  • 326
  • 368
1
vote
0 answers

How can I get my Windows service to see objects in ROT?

EDIT: Though tangentially related, the tagged "duplicate" is not a true duplicate of this question, and more importantly does not answer this question (because the problem is different). I am working with a Window Service, not a standalone userspace…
Luke
  • 743
  • 6
  • 20
1
vote
2 answers

AllowAutoPlay Never Gets Called

I have a WinForms application. Just before creating the actual form in Program.cs, I instantiate an Autoplay class. Registration is successful, after the obligatory first return value of 65536, but I never get any calls to AllowAutoPlay(). Am I…
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
1
vote
1 answer

C# : Get COM object from the Running Object Table

I'm working a project that uses API from a third party COM Server. The COM Server is a local server (out of process exe) on which I have no control. I'm trying to access COM objects from the runnin object table to choose between the several…
nrdev
  • 49
  • 1
  • 4
1
vote
1 answer

How does Running Object Table implement weak references?

When you register a COM object in the Running Object Table with a zero flag (requesting a weak ref), the ROT increments the ref count by 1. The act of getting an object from the ROT increases the ref count by one more. Once that one is freed, the…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
1
vote
0 answers

casting an generic object to type of com class fails

I have a COM Class which is registered in to ROT, through an other application i am fetching the instance of my com class from ROT and casting it to its type giving following error. Unable to cast COM object of type 'System.__ComObject' to interface…
1
vote
0 answers

OLE registration database access with Iron Python

I am trying to extract an active object using comtypes module: import comtypes.client as cc table = cc.GetActiveObject() but its throwing an error saying that it needs at least one argument. I think its the OLE Registration database key but i am…
konrad
  • 3,544
  • 4
  • 36
  • 75
1
vote
0 answers

Creation of a strong reference to COM object in ROT with C#

I need to bind to a running COM instance (there can be many instances of what I am looking for, so I need to figure out which one is the right one by examinating the Running Object Table) Using CoClassCreate or the new operator with the class is no…
jdehaan
  • 19,700
  • 6
  • 57
  • 97
1
2