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

CWnd as ActiveX control without .dll or .ocx file in C++?

Dear MFC/ActiveX/COM cracks, I have 'inherited' the source of an old MFC application (originally created with Visual Studio 6) which builds and runs so far in VS 2010, but has embedded some ActiveX controls as source code, apparently generated by…
juniper
  • 311
  • 5
  • 13
0
votes
1 answer

How to get all the interfaces which are supported by the Delphi instance which is accessible from IDispatch?

Motivation: I got IDispatch pointer as a result of my efforts that I have described in my previous question How to access workbooks from the ExcelApplication Delphi COM reference, currently there is no any? - trying to access all the open Excel…
TomR
  • 2,696
  • 6
  • 34
  • 87
0
votes
1 answer

Calling COM from C++ using CoCreateInstance and IDispatch, with numerous parameters in DISPPARAMS incl. SAFEARRAY

I have a COM object which exposes a function. I would like to pass parameters to this function and receive a return value. I'm using C++ with CoCreateInstance(). The error I receive is: hr = 0x8002000e : Invalid number of parameters. I'm reasonably…
Gary
  • 13
  • 1
  • 4
0
votes
0 answers

C# .Net Framework Class Library proj - Newtonsoft.Json gives "The system cannot find the file specified..." error

The project is a Class Library which I want to use it from a Visual Foxpro application. Visual Foxpro is 32bit. .Net project: Target framework .Net Framework 4.7.2 Target Platform x86. Using Newtonsoft.Json and RestSharp I registered the DLL…
0
votes
1 answer

C++ DispInvoke fails to find member

The scenario is this: I have a COM object to ask questions. Name it ICom. The COM object requires me to implement an IDispatch , descendant of , say, IComEvents, that notifies me for events. I implement an IDispatch and connect it to the COM…
Michael Chourdakis
  • 10,345
  • 3
  • 42
  • 78
0
votes
1 answer

.NET 6 IDispatch client implementation crash

.NET 6 has trouble calling its own IDispatch objects, if marshaled. To reproduce: if (Array.IndexOf(Environment.GetCommandLineArgs(), "/s")>=0) //Server { Thread t = new Thread(new ThreadStart(() => { Hello h = new Hello(); …
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
0
votes
0 answers

How to implement IDispatch in c++ COM with multiple interfaces

I have 3 interfaces: IGetInformation, IAccount, ICreateATM and they inherit IDispatch. Also i have class CoATM that inherits these 3 interfaces. How should I implement IDispatch for all my interfaces to work? I have this implementation and only…
Mental
  • 1
0
votes
0 answers

Asynchronous support is not available for IDispatch

Microsoft's documentation states that Asynchronous support is not available for IDispatch or for interfaces that inherit IDispatch ...but I want to do exactly that (to call Excel asynchronously from C++ as part of pywin32 if that's relevant). Where…
Nicholas White
  • 2,702
  • 3
  • 24
  • 28
0
votes
1 answer

(false) fires when updating "HTMLBody"

I have a C# COM Add-in which inserts custom HTML into the body of the email. Using OutlookSpy, I see the following events have fired: PropertyChange (To) PropertyChange (CC) PropertyChange (BCC) PropertyChange (To) PropertyChange (CC) PropertyChange…
ezG
  • 391
  • 1
  • 17
0
votes
2 answers

How to get the running version of Power Point using C++ unmanaged?

I am using C++ unmanaged with Power Point (2003 and 2007). How do I get the running version of Power Point (2003 or 2007) with IDispatch? Thanks, any help would be awesome.
Ubalo
  • 749
  • 3
  • 10
  • 17
0
votes
1 answer

Sage BOI - Error 200 when invoking NewObject on AR_Customer_bus. I'm aiming to create a new customer via the BOI using C#

This is a Sage cloud 2019 Business Object Interface question. I'm experiencing issues trying to new up an AR_Customer_bus object, my eventual aim is to be able to create a new customer using the BOI. The error I'm getting is a 200 error. Full…
HQ216493
  • 13
  • 1
  • 6
0
votes
2 answers

In C++, how do you initialize an array of pointers to wchar_t* (resulting in wchar_t**)?

I'm calling a COM function that requires a wchar_t** argument. What I would like to do is: wchar_t* arr[3] = {L"str1", L"str2", L"str3"}; What I get back is a const wchar_t**, which the compiler rejects. I also tried: wchar_t* arr[3]; wchar_t p1[]…
c2po
  • 13
  • 3
0
votes
1 answer

How to get the method signatures for DShellFolderViewEvents

I'm trying to sink DShellFolderViewEvents using the ATL, and the only method I've been able to successfully subscribe to is DISPID_SELECTIONCHANGED. There appear to be many other events listed in the header shdispid.h, but I can't get them to fire.…
user12381459
0
votes
1 answer

How to declare COM interface with properties in C++

I'm trying to call a registered COM interface (Inproc dll) in an Eclipse C++ environment (MinGW GCC toolchain). I therefore don't believe that I can simply import the dll typelib the way I typically would in Visual C++. I'm trying to define the…
forother
  • 39
  • 4
0
votes
0 answers

What is causing mscorlib recursive resource lookup bug

The error shown in the following screen shot occurs sporadically: The application itself is in unmanaged C++, using COM objects, and .NET objects (in C# and VB) via COM interop. Only two functions from the stack trace are in our…
Phil Jollans
  • 3,605
  • 2
  • 37
  • 50