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
1
vote
1 answer

Need to duplicate an IDispatch* with .NET backing; don't know class name

I'm hosting a .NET library in my C++ program using the following methods, though not an exhaustive list: CorBindToRuntimeEx() GetDefaultDomain() CreateInstance() Invoke() I have C++ classes which correspond to .NET classes. Each class instance…
David
  • 1,023
  • 1
  • 8
  • 16
1
vote
1 answer

How to manually marshal a .NET object as a dual COM interface?

I have written some C# code which returns a .NET object to unmanaged code as an IDispatch pointer using Marshal.GetIDispatchForObject, however, this object also implements other (non .NET defined) COM interfaces. In the unmanaged world…
Marcus
  • 5,987
  • 3
  • 27
  • 40
1
vote
4 answers

Providing an IDispatch implementation for a connection point client

I've written a simple COM DLL inproc server with a single simple COM object. The COM object implements a connection point. I know how to create an ATL client that derives from IDispEventImpl, and uses a sink map to simplify this process. But, for…
user206705
1
vote
1 answer

Delphi: Simulating a drag and drop from the clipboard to EmbeddedWB’s IHTMLElement

I have a Delphi XE2 application with a TEmbeddedWB that I use to simulate user actions. The application navigates to a URL, populates the relevant form fields with data and submits the data. The problem is that there is an field…
JorgeJ
  • 11
  • 4
1
vote
2 answers

How does a server that expose COM functions via IDispatch can distinct between different clients that Invoke functions without passing any ID param?

I have a Windows Service that is exposing some COM functions to be invoked via IDispatch Invoke. There are different clients (Windows applications) that at any moment can Invoke any of these functions. I need to introduce a change in the Windows…
IMR
  • 56
  • 7
1
vote
0 answers

How to create and pass a COM IDispatch pointer as callback from a C++ Console Client to a C++ WinService successfully?

In advance sorry for the TOO Long post, but given that there are many parts involved, and I am not sure where I can be making a mistake, hence, I need to post all the parts involved. Please do not assume anything, I can be making any type of error…
IMR
  • 56
  • 7
1
vote
2 answers

How to invoke an OleAutomation Object method for BSTR*?

Here is the IDispatch interface I got from the type library: interface IMYPhoneCmd : IDispatch { [id(0x00000001), helpstring("method CallSet")] HRESULT CallSet( [in] BSTR* name, [in, optional,…
Anarkie
  • 657
  • 3
  • 19
  • 46
1
vote
1 answer

Retrieve DISPID of outgoing dispinterface member

I'm stuck on this one. Given three variables: an IDispatch* to a connectable object the IID (DIID) of an outgoing dispinterface on that object the name of a member defined by the dispinterface How can resolve the name to a…
Michael Gunter
  • 12,528
  • 1
  • 24
  • 58
1
vote
1 answer

Does COM support multiple dual interfaces?

I have made a COM object with multiple dual interfaces. It worked in an earlier version of compiler, but not in the current version. My question: Does the COM spec say this should work (and therefore I should report a compiler bug), or is not meant…
M.M
  • 138,810
  • 21
  • 208
  • 365
1
vote
1 answer

Use of VARIANT* parameter in ActiveX method in Free Pascal

I would like to use an ActiveX-Object in a Free Pascal project, from the documentation I know that one method is declared as long Fetch(VARIANT* vValue) where vVariant will contain a result (integer or floating point value) after calling. The…
LeRookie
  • 311
  • 3
  • 12
1
vote
1 answer

"public" vs. "internal" C# class implementing IDispatch

I am writing a class that will serve as an IE WebBrowser container, and which is also going to be implementing the IDispatch interface, so some of its methods have DispID attributes: public class IEContainer : IOleClientSite, …
O.T.Vinta
  • 217
  • 1
  • 4
1
vote
1 answer

How to create an object in C# which inherits from IDispatch that can be incorporated into older programs that use ActiveX

first time on SO though I've used the site a lot, I will get straight to the point. My actual end goal is to create an object which inherits from the IDispatch interface in C# which can be used in Canvases inside of Oracle Forms Builder (Oracle…
Aelphaeis
  • 2,593
  • 3
  • 24
  • 42
1
vote
2 answers

python IDispatch client without type library

I'm trying to use with Python a COM server which expose only the IDispatch interface and have neither IDL file nor type library for it. I do have documentation for the different methods and how to use them. Trying to use the win32com package fails…
Uri Cohen
  • 3,488
  • 1
  • 29
  • 46
0
votes
2 answers

MSHTML IWebBrowser2 - Sinking page events causes missed keystrokes?

I've got a bit of a problem with my application using MSHTML. I have everything working except for the odd keystroke missing behavior when typing fast as mentioned in the subject line. I think it may have to do with the method I use to sink the…
0
votes
2 answers

OLE automation with C++: receiving empty variant from Invoke() instead of valid result

In C++, I'm trying to call an OLE method which looks like this: HRESULT GetFirstMono( [out] BSTR* name, [out, retval] BSTR* monoID); I use the following code to call it (adapted from…
xqrp
  • 137
  • 13