idispatch

How do I write 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 has you launching a separate instance of Excel apart from the one you're in. I've seen s...

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 IDispatch pointer. I want to set up a connection point container, and from there find a connec...

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 installed, every developer, and every customer, from now until the end of time, is require...

.NET2.0 C# Interop: How to call COM code from C#?

In my last development environment, I was able to easily interact with COM, calling methods on COM objects. Here is the original code, translated into C# style code (to mask the original language): public static void SpawnIEWithSource(String szSourceHTML) { OleVariant ie; //IWebBrowser2 OleVariant ie = new InternetExplorer(); ...

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

Hi Guys, 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. ...

Registration Free (Regfree) COM

We are using a COM Object automation model to make our application available to our customers. They are using for the most part python to access our applicaton interface. As we want to be able to install (not yet run, that's another issue) different versions of the application, we are changing our COM components to be regfree. But tha...

How to detect PowerPoint 2007 from a C++ addin?

I need to detect if my addin is in PowerPoint 2007 via my C++ addin. The PowerPoint object model exposes Application.Version, which should work, but I do not know enough about how to use this with IDispatch. How to detect PowerPoint 2007 from a C++ addin? ...

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 history, and was just introduced under the COM 'umbrella' later in its lifecycle? Wher...

MSHTML IWebBrowser2 problem - Sinking page events causes missed keystrokes??

Hi all, 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 events? The details: my application is a separate program written in C++ and MFC in V...

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 doesn't support much of the code that I'm using to do so, which is basically C++ code. So...

Communicating with ActiveX with a GCC compiler

How do I reference and communciate with an ActiveX library from within my gcc compiled application? ...

What are my options for C++ DLL to call a C# DLL?

I have a C++ DLL that needs to call a function (pass a value, return a value) in a C# class library. Is my only option to give the C# DLL a COM interface and call it from C++ with IDispatch? Is this the best method? ...

NonComVisibleBaseClass was detected; How do I fix this?

My class derives from System.Web.Security.MembershipUser I am getting this error when submitting the form. The popup form uses ASPPDFand the application did not have this problem before implementing the custom MembershipProvider goodies. Note this is a debugging error only. It seems to work when I am not debugging. Does anyone know how I...

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 instances of CMyDispatch. CMyDispatch is returned to javascript this way: STDMETHODIMP...

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 ...

How to find the IWebBrowser2 pointer for an IE8 window given a PID?

Hi, so far, I've successfully used the following function to retrieve the IWebBrowser2 pointer to a running Internet Explorer instance, given it's PID. static SHDocVw::IWebBrowser2Ptr findBrowserByPID( DWORD pid ) { SHDocVw::IShellWindowsPtr ptr; ptr.CreateInstance(__uuidof(SHDocVw::ShellWindows)); if ( ptr == NULL ) { ...

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? ...

Enumerating all IDispatch implementing objects on a machine.

Hi there, 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 this even possible? Any help would be much appreciated :) ...

Hook IDispatch v-table in C++

I'm trying to modify the behavior of an IDispatch interface already present in the system. To do this my plan was to hook into the objects v-table during runtime and modify the pointers so it points to a custom hook method instead. If I can get this to work I can add new methods and properties to already existing objects. Nice. First I...

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 pointers to the different functions when implementing a class hierarchy which has virtua...