Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

GetRunningObjectTable (ole32)
 
.
Summary

C# Signature:

    /// <summary>
    /// Returns a pointer to the IRunningObjectTable
    /// interface on the local running object table (ROT).
    /// </summary>
    /// <param name="reserved">This parameter is reserved and must be 0.</param>
    /// <param name="prot">The address of an IRunningObjectTable* pointer variable
    /// that receives the interface pointer to the local ROT. When the function is
    /// successful, the caller is responsible for calling Release on the interface
    /// pointer. If an error occurs, *pprot is undefined.</param>
    /// <returns>This function can return the standard return values E_UNEXPECTED and S_OK.</returns>
    [DllImport("ole32.dll")]
    static extern int GetRunningObjectTable(uint reserved,
       out System.Runtime.InteropServices.ComTypes.IRunningObjectTable pprot);

User-Defined Types:

None.

Notes:

In .Net 2.0 use System.Runtime.InteropServices.ComTypes.IRunningObjectTabl as the second parameter. Frameworks 1.0 and 1.1 use a now deprecated type.

Please note that the Register method of the IRunningObjectTable interface actually returns the "cookie" value needed to Revoke the object from the ROT at a later point. The MSDN documentation is confusing; perhaps wrong.

Please note that the Register method of the IRunningObjectTable interface actually returns the "cookie" value needed to Revoke the object from the ROT at a later point. The documentation is confusing; perhaps wrong.

Tips & Tricks:

Please add some!

Sample Code:

     System.Runtime.InteropServices.ComTypes.IRunningObjectTable objTbl;
     Int32 hr = GetRunningObjectTable(0, out objTbl);
     if (hr == 0) // success
     {
     }
     else // failure
     {
     }

Alternative Managed API:

Do you know one? Please contribute it!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions