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

IGlobalInterfaceTable (Interfaces)
 
.
Summary
Access the Global Running Object Table.

C# Definition:

    [
        ComImport,
        InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
        Guid("00000146-0000-0000-C000-000000000046")
    ]
    interface IGlobalInterfaceTable
    {
        uint RegisterInterfaceInGlobal(
                [MarshalAs(UnmanagedType.IUnknown)] object pUnk,
                [In] ref Guid riid);

        void RevokeInterfaceFromGlobal(uint dwCookie);

        [return: MarshalAs(UnmanagedType.IUnknown)]
        object GetInterfaceFromGlobal(uint dwCookie, [In] ref Guid riid);
    }

    [
        ComImport,
        Guid("00000323-0000-0000-C000-000000000046")
    ]
    class StdGlobalInterfaceTable /* : IGlobalInterfaceTable */
    {
        static public IGlobalInterfaceTable GetRunningObjectTable()
        {
            return (IGlobalInterfaceTable) new StdGlobalInterfaceTable();
        }
    }

VB Definition:

<ComImport> _
<Guid("TODO")> _
'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch
Interface IGlobalInterfaceTable
   TODO
End Interface

User-Defined Types:

None.

Notes:

Create a new StdGlobalInterfaceTable object and cast it to the IGlobalInterfaceTable interface.

Example:

IGlobalInterfaceTable pGIT = (IGlobalInterfaceTable) new StdGlobalInterfaceTable();

Or take advantage of the static function that was added to the StdGlobalInterfaceTable import class wrapper.

Example:

IGlobalInterfaceTable pGIT = StdGlobalInterfaceTable.GetRunningObjectTable();

This are equivalent, but create different self-documenting code. The static function is a neat trick that encapsulates some functionality into the COM class wrapper.

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

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