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

Delphi - How to implement a custom timeout

I want to implement a custom timeout for my wrapper class. This code is working but without timeout :/ Let see what I've implemented: Definition: TComplusWrapper = class(TObject) private fComplus: OleVariant; public constructor Create; …
Exe
  • 1
  • 1
0
votes
2 answers

What are the files required for a COM client to connect a COM server (out-of-process scenario)?

I would like to understand the purposes of the files mentioned in this article and link the knowledge to my current COM server and COM client scenario, so that I can implement my COM server to use the COM server: this I am having a COM server which…
Nick Chang
  • 1
  • 1
  • 4
0
votes
0 answers

VariantClear releases VT_DISPATCH -vs- MSDN documentation

VS2015 C++ / Windows7 SP1 Considering the following code: CComPtr m_pFont; ::OleCreateFontIndirect(&fdesc,IID_IFontDisp,(void**)&m_pFont); VARIANT var = m_pFont; // PSEUDO CODE after this, var.vt = 9; //VT_DISPATCH var.DISPATCH =…
Zoli
  • 841
  • 8
  • 31
0
votes
1 answer

Does the `IDispatch::GetTypeInfo()` interface thow?

I'm trying to find information on if the IDispatch interface throws, specifically if IDispatch::GetTypeInfo() does. IIRC, IDispatch::Invoke() can, but I can't seem to find anything on the subject and the documentation here or here doesn't mention…
Adrian
  • 10,246
  • 4
  • 44
  • 110
0
votes
1 answer

How can you get a prototype member function (C++ -> Javascript)

Does anyone know how you can call a method of a prototype in Javascript from C++? I have an pointer to script IDispatch, and I can get the IDsOfNames for the prototype, but I can't find how to get the IDispatch of it's member function. Say…
Coder
  • 3,695
  • 7
  • 27
  • 42
0
votes
0 answers

How Define Disparams (component object model)

I want to call an method with invoke. My object input is a string that is address of a file in my computer and type of output is IDispatch. How I should define Disparams as an input of invoke. My code is…
mahdi Lotfi
  • 316
  • 3
  • 13
0
votes
2 answers

How to send an event callback parameter to a COM object with .net

I have a referenced a COM dll. Some methods expect a callback parameter. I checked the interop.MyComLib.dll in reflector: public virtual extern void Foo([In, MarshalAs(UnmanagedType.IDispatch)] object pDispProgressCallBack); How do I send this…
HuBeZa
  • 4,715
  • 3
  • 36
  • 58
0
votes
1 answer

How to get a LPDISPATCH pointer/interface and pass it to an activeX Control

I'm using MFC in Visual Studio 2015 on Windows 7 64Bit. In my application,there is an activeX control,I need to communicate between activeX control and my application. But activeX need my application to pass a LPDISPATCH pointer/interface to it. How…
Yao
  • 1
  • 3
0
votes
0 answers

COM IDispatch->Invoke fails with error DISP_E_EXCEPTION

I'm trying to invoke a IDispatch->Invoke call to get the name of the IDispatch object and the method fails with error DISP_E_EXCEPTION. The property I'm trying to get is "accName". Below is the code that tries to do this: HRESULT…
Andrei
  • 367
  • 5
  • 18
0
votes
2 answers

How do I do ConnectionPoint in Delphi?

I'm writing a DLL which talks to Excel via its IDispatch interface. From VBA I pass in a Variant containing Application.Caller from which I draw the IDispatch pointer via .pDispVal. What I'd like to know is how to query the interface via that…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
0
votes
3 answers

Writing a DLL for Excel in Delphi

I'm using Turbo Delphi 2006. The DLL will be called from within Excel as part of a VBA/DLL combination. The first part of the problem is trying to find out how to pass to the DLL a reference to the current Excel session. Most other code I've seen…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
0
votes
1 answer

Get User-Defined Methods from IDispatch for Dynamic Assembly

So the program I'm working on creates a dynamic .Net assembly from source code that the user enters into a text editor (using CodeDOM as a compiler). I need to get an IDispatch for this assembly that contains all of the user-defined methods. For…
0
votes
2 answers

IE attachEvent on object tag causes memory corruption

I've an ActiveX Control within an embedded IE7/8 HTML page that has the following event [id(1)] HRESULT MessageReceived([in] BSTR id, [in] BSTR json). On Windows the event is registered with OCX.attachEvent("MessageReceived",…
0
votes
0 answers

change interface from IUnknown to IDispatch

I have a COM class which is accessible only via vtable. It is already distributed to clients. I am planning to allow script access as well, by introducing IDispatch. In my local tests, it shows client code will not change, but they will require code…
Logan
  • 184
  • 10
0
votes
0 answers

"COM target does not implement IDispatch" exception

I am new to COM programming, Solution might be simple but I couldn't. My COM client code is working fine with early binding. Problem with late binding. Client Code : Using .net 4.0 framework System.Type objType =…
Pavan Kumar kota
  • 45
  • 1
  • 1
  • 9