Questions tagged [idispatch]

The IDispatch interface exposes objects, methods and properties to programming tools and other applications that support Automation.

IDispatch Interface

Exposes objects, methods and properties to programming tools and other applications that support Automation. COM components implement the IDispatch interface to enable access by Automation clients, such as Visual Basic.

The IDispatch interface was initially designed to support Automation. It provides a late-binding mechanism to access and retrieve information about an object's methods and properties. Previously, server developers had to implement both the IDispatch and IAccessible interfaces for their accessible objects; that is, they had to provide a dual interface. With Microsoft Active Accessibility 2.0, servers can return E_NOTIMPL from IDispatch methods and Microsoft Active Accessibility will implement the IAccessible interface for them.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms221608(v=vs.85).aspx

120 questions
28
votes
6 answers

Does C# .NET support IDispatch late binding?

The Question My question is: Does C# nativly support late-binding IDispatch? Pretend i'm trying to automate Office, while being compatible with whatever version the customer has installed. In the .NET world if you developed with Office 2000…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
17
votes
3 answers

How to use IDispatch in plain C to call a COM object

I need to compile some code of mine using the gcc compiler included in the R tools (R the statistical program for windows), the problem is that I need to use IDispatch in my code to create an access the methods of a COM object, and the gcc compiler…
Vic
  • 2,878
  • 4
  • 36
  • 55
11
votes
3 answers

COM / OLE / ActiveX / IDispatch confusion

I can't wrap my head around the differences among these terms. Are COM and ActiveX synonyms? Is ActiveX object just a COM object that exposes IDispatch? Lots of older MSDN pages mention IDispatch without any COM context. Does it have a separate…
Ofek Shilon
  • 14,734
  • 5
  • 67
  • 101
11
votes
2 answers

C# 4, COM interop and UPnP: A trying triumvirate

I'm trying to write a bit of code (just for home use) that uses UPnP for NAT traversal, using C# 4 and Microsoft's COM-based NAT traversal API (Hnetcfg.dll). Unfortunately (or perhaps fortunately) the last time I had to do COM interop in .NET was…
7
votes
3 answers

COM Dual Interfaces

A dual interface in COM is one that is able to be accessed via a DispInterface or via VTable methods. Now can someone tell me what is exactly what the difference is between the two methods? I thought that a VTable is a virtual table which holds the…
Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
6
votes
2 answers

Implementing IDispatch in c#

I'm writing some test code to emulate unmanaged code calling my c# implementation of a late binding COM object. I have an interface that is declared as an IDispatch type as below. [Guid("2D570F11-4BD8-40e7-BF14-38772063AAF0")] …
probably at the beach
  • 14,489
  • 16
  • 75
  • 116
6
votes
0 answers

information not available, No symbols loaded for .dll

I applied Invoke to use object of an application in C++ but an error occurred. error:information not available, No symbols loaded for GPNSAutomation.dll My codes is : ::CLSIDFromProgID(OLESTR("SGNSAutomation.SGNSApplication"), &clsid); IID iid; …
mahdi Lotfi
  • 316
  • 3
  • 13
5
votes
2 answers

How does CreateStdDispatch know what method to invoke?

i'm faced with implementing an IDispatch interface. There are four methods, and fortunately 3 of them are easy: function TIEEventsSink.GetTypeInfoCount(...): HResult; { Result := E_NOTIMPL; } function TIEEventsSink.GetTypeInfo(...): HResult; { …
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
5
votes
2 answers

warnings about mystery interfaces in C# projects

Every time I build my C# Solution, I get a handful of warnings about interfaces that I've never seen or written. I tried Googling for some of them, but get no hits. Could these possibly be buried in an assembly I'm referencing? If so, is there…
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
5
votes
1 answer

Difference between Dual interface and Dispatch only interface for C# COM automation

I am implementing a c# COM client against a C++ COM server. The COM client functions correctly when I mark the COM interface as "Dual" but it throws an InvalidCastException when I remove the "Dual" attribute. Therefore the easy fix for me is to mark…
Imelza
  • 51
  • 3
5
votes
3 answers

Find all properties of an ActiveX component

I tried looking around but was not able to convince myself with an answer as the world of COM/ActiveX seems to be very confusing. Basically what I want to know is, given the GUID, is there a way to know all the interfaces, properties and methods…
user1740173
  • 73
  • 1
  • 3
5
votes
2 answers

Pass an Interface to a different process

I use WM_COPYDATA to enable communication between my two processes A and B. There is no problem to exchange data with basic data types. Now I have a problem, in some case I want to pass an Interface (IDispatch) from my process A to my process B. Is…
stanleyxu2005
  • 8,081
  • 14
  • 59
  • 94
4
votes
1 answer

TEventObject and WebBrowser

I created a TEventObject to provide OnMouseDown and OnMouseMove events for TWebBrowser. The events work perfectly when moving the mouse and when clicking in the webbrowser, but when I scroll or click the webbrowser's vertical scrollbar a…
Bill
  • 2,993
  • 5
  • 37
  • 71