idispatch

How to get the method signatures for DShellFolderViewEvents

自闭症网瘾萝莉.ら 提交于 2021-01-29 21:56:09
问题 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. Not sure what I'm doing wrong (it might be ATL-related), but I thought perhaps I'm implementing event-handler functions with the wrong signatures (currently I'm just trying void functions with no arguments). The problem is that there doesn't

Find all properties of an ActiveX component

一世执手 提交于 2020-01-14 10:28:32
问题 I tried looking around but was not able to convince myself with an answer as the world of COM/ActiveX seems to be very confusing. Basically what I want to know is, given the GUID, is there a way to know all the interfaces, properties and methods exposed by an ActiveX control? I read somewhere that you just have to ask if a particular property is there or not. But how do I ask about a property before knowing what are there? I guess IDispatch does something similar, but I am not able to make

Retrieve javascript array object with C++ using DISPID_NEWENUM fails on IE9

ⅰ亾dé卋堺 提交于 2020-01-14 04:56:06
问题 following a similar question i answered some time ago, i found out that when trying to enumerate the object, using IDispatch::Invoke(DISPID_NEWENUM,...) fails with DISP_E_EXCEPTION on IE9. This happens with IDispatch and IDispatchEx , on any javascript array. needless to say that the code works great on IE6-IE8, and fails only on IE9. The same question also appears in the MSDN dev forums with no luck so far. Here's a code snippet to demonstrate what I tried to do. notice that pDispatch is the

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

人盡茶涼 提交于 2020-01-07 03:00:55
问题 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 <input type=file /> field which accepts files that are uploaded. Having done a lot of reading on the matter I understand there is a security issue doing this programmatically but also found someone making a suggestion that the files could be ‘dragged’ from the clipboard and

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

∥☆過路亽.° 提交于 2020-01-01 14:23:12
问题 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(); ie.Navigate2("about:blank"); OleVariant webDocument = ie.Document; webDocument.Write(szSourceHTML); webDocument.close; ie.Visible = True; } Now begins the tedious,

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

☆樱花仙子☆ 提交于 2019-12-30 11:08:39
问题 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? 回答1: Couple of options available for you here Use a mixed mode C++/CLI assembly as a bridge between the C++ and C# DLL Use the a COM bridge by exposing several of the key C# types as COM objects. This can then be accessed via the C++ code by normal COM semantics 回答2: This project

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

狂风中的少年 提交于 2019-12-30 11:07:07
问题 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? 回答1: Couple of options available for you here Use a mixed mode C++/CLI assembly as a bridge between the C++ and C# DLL Use the a COM bridge by exposing several of the key C# types as COM objects. This can then be accessed via the C++ code by normal COM semantics 回答2: This project

How to use IDispatch in plain C to call a COM object

左心房为你撑大大i 提交于 2019-12-28 08:40:11
问题 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 my question is how can I use IDispatch in C to create the COM object without having to depend on MFC, .NET, C#, WTL, or ATL. I believe that if I do so I will

How to use IDispatch in plain C to call a COM object

纵饮孤独 提交于 2019-12-28 08:40:09
问题 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 my question is how can I use IDispatch in C to create the COM object without having to depend on MFC, .NET, C#, WTL, or ATL. I believe that if I do so I will

C# COM object with a dynamic interface

*爱你&永不变心* 提交于 2019-12-23 21:47:10
问题 I'd like to build a COM visible C# class, say DynamicComponent , that would provide a dynamic interface through COM. Internally this class would maintain a dictionary of delegates: "GetTheAnswer" -> () => { return 42; } "Add" -> (int a, int b) => { return a + b; } ... The client code would be some VBA. Here is the workflow I naively imagine: from the Excel/VBA editor the user references the TLB the user instantiates a new DynamicComponent (well at least get a stub provided by Excel/VBA) Excel