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
0
votes
0 answers

DLL thread callback works fine but causes access violation when the callback calls InvokeHelper

I have created a DLL that starts up a thread which polls a usb device, when the DLL gets a message from the USB device it calls a callback function. Using this dll in code consists of creating an instance of the class from the DLL, then calling a…
0
votes
0 answers

c++ MFC SDI DLL call method of OLE Server using IDispatch

I have written a c++ MFC DLL that brings up an SDI Application which is a very legacy OLE Server. (I have no choice about using this OLE Server so I have to make it work.) I am accessing this c++ DLL from C#. I have everything "working". I can call…
user3739214
  • 81
  • 1
  • 6
0
votes
1 answer

How the Windows MessageBox with message "Member not found." is generated? Is it possible to intercept it?

I have an MFC-based Windows application with a GUI, it is written in C++ and has a lot of COM objects; let's call it "HelloWorld". A user sent me a bug report: sometimes, in response to a particular user action, a MessageBox shows up (in the…
Alessandro Jacopson
  • 18,047
  • 15
  • 98
  • 153
0
votes
1 answer

Why did it fail ,idispatch interface which get by AccessibleObjectFromEvent.call the idispatch's member

I get a ms-word's handle,then use AccessibleObjectFromEvent to get is's IDispatch(late bingding)。then I want call it's property or method,it's fail。 but it's ok use c#. How to use use late binding to get excel instance? the code like this. function…
chenybin
  • 1
  • 4
0
votes
1 answer

Enumerating all IDispatch implementing objects on a machine

I'd like to enumerate all IDispatch supporting objects on a machine. At the moment I need to know what the class id or prog id is but, for inspecting my machine, I'd like to know if I can just enumerate all the objects that implement IDispatch. Is…
Goz
  • 61,365
  • 24
  • 124
  • 204
0
votes
1 answer

how to add new object type to javascript?

as you know can use the follow code create a new Array Object. var a = new Array(); now i implement a IDispatch interface for IWebBrowser,i can pass a Object to javascript,but how to handler create a custom Object like follow code,the CustomObject…
tfzxyinhao
  • 334
  • 5
  • 19
0
votes
0 answers

Wrap a python class with IDispatch

I want to use python to handle events from a COM server component. This server has a register() method which receive an IDispatch object and invokes OnXXX methods on it when various events are generated. Can you achieve this with win32com.client or…
Uri Cohen
  • 3,488
  • 1
  • 29
  • 46
0
votes
1 answer

Passing an IDispatch parameter from C#

I'm writing a C# COM dll that will be used by both Managed C# as well as Delphi and C++ programs and javascript. The COM dll includes a monitor part where the application registers a function that is supposed to return a string value to the dll. I…
Farawin
  • 1,375
  • 2
  • 14
  • 19
0
votes
2 answers

IDispatch object that responds to all properties?

I want to create an IDispatch object that returns a value for every property. Ask it for "foo", it returns something. "bar" returns something. "faid1jhgi31jifj" as well. Any pointers?
JoeF
0
votes
2 answers

Does a "pure" IDispatch interface require a proxy/stub DLL?

..for an out-of-process-server, or can I call a dispatch interface without registering a proxy/stub? The interface in question is very high level, so performance is a non-issue, and I could make the whole thing registration-free, which is a big plus
peterchen
  • 40,917
  • 20
  • 104
  • 186
0
votes
1 answer

How to compare VARIANTARG types

I'm trying to build a function to assign VARIANTARG types to a DISPPARAMS structure, and I'm having some issues figuring out how to check the actual type of the arg. myFunc(int count, const BYTE* types, ...) { DISPPARAMS dParams; …
Matt McMinn
  • 15,983
  • 17
  • 62
  • 77
0
votes
1 answer

Can I get proper IDispatch from DISPPARAMS?

I want to get a proper IDispatch pointer then cast it to CMyDispatch pointer and have my way with it later. i.e. in javascript I want to do something like this: var x = external.obj.x; var y = external.obj.y; external.obj.x = y; where x and y are…
Dmitry Mukhin
  • 6,649
  • 3
  • 29
  • 31
0
votes
1 answer

Understanding COM/WSH Behavior - Late-bound IDispatch _Default and Item?

I'm trying to duplicate the behavior that I observe in JScript in C#. I am using IDispatch to enumerate members and call them on late-bound objects. I am a complete C++ noob and know just enough about COM to be very dangerous. Here are my…
aikeru
  • 3,773
  • 3
  • 33
  • 48
0
votes
2 answers

inheriting interface & IUnknown ,IDispatch methods definitions

i need to inherit an interface with abstract methods , in VB/c# we simply override methods from our interface while there is no need to code for IUnknown or IDispatch methods but in c++, after inheriting interface in class & overriding methods in…
user1176743
  • 5
  • 1
  • 4
-1
votes
1 answer

how to convert com instance to variant, to pass it in idispach invoke

i want to pass a com object instance as a variant parameter to another active x object function, for that i need to convert the idispatch pointer to a variant? i am not sure. hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); if…
Alok Saini
  • 321
  • 7
  • 18
1 2 3 4 5 6 7
8