com

Accessing 32-bit DLLs from 64-bit code

此生再无相见时 提交于 2019-12-21 23:51:43
问题 I need to migrate a 32bit dll in order to use it in a 64bit C# (and also C++) applications. The dll is write in unmanaged delphi code. I can't recompile the dll and the only way is to use the interprocess communication (IPC). I search for a long time but i found not many information about. The best guide i found is in this link: Accessing 32-bit DLLs from 64-bit code. I followed this guide for achieve my goal because very often is quoted in this forum. So the guide explain I have to make

C# How do you get an instance of a COM interface

人盡茶涼 提交于 2019-12-21 21:54:33
问题 I've been doing quite a bit of googling trying to find the standard way to get an instance of a COM interface. Microsoft provides an example of this in their article COM Interop Part 1: Client Tutorial: // Create an instance of a COM coclass: FilgraphManager graphManager = new FilgraphManager(); // See if it supports the IMediaControl COM interface. // Note that this will throw a System.InvalidCastException if // the cast fails. This is equivalent to QueryInterface for // COM objects:

Simulating SideBySide for Out of Process ActiveX

风流意气都作罢 提交于 2019-12-21 20:42:23
问题 We are adapting our client side relatively complicated application (ActiveX / .net / Delphi / C++ / COM ) to use SxS to achieve non admin deployment and isolation from older versions of our product. We were able to achieve this goal for almost all our in proc components such as our .net ui, Delphi ui, and the COM servers we use in proc by composing a manifest file which described all the libraries used by our process, with no registration on the client of any of the components (almost). And

How can I register a COM-Object with Windows Installer XML

孤街醉人 提交于 2019-12-21 20:36:08
问题 I have got the following Problem: In my WiX Setup I need to register a COM Object. I have got a ".tlb" File and a ".dll" File (in my example: XYCommon.dll and a XYCommon.tlb) Now I want to make the Setup to Register the TLB. How Can I do this in Windows Installer XML ? My first try was to work with a CustomAction and Open "Regasm.exe" and Register it - but I dont know how I can bring the Regasm.exe to Register the XYCommon.tlb Any Help ? Thanks 回答1: Use the WiX harvester utility called Heat.

How to determine Threading Model of given COM library?

柔情痞子 提交于 2019-12-21 19:56:05
问题 I have a COM library I should use in my ASP.NET MVC application. However I am unsure about its thread apartment model. How can I determine it? 回答1: Determine the component's CLSID from the registry using this key: HKEY_CLASSES_ROOT\{component's progid}\CLSID Then lookup the ThreadingModel using this registry key HKEY_CLASSES_ROOT\CLSID\{component's clsid}\InprocServer32\ThreadingModel 回答2: The OLE/COM Object Viewer also shows the threading model for components. 来源: https://stackoverflow.com

Where do I need to switch the Activation Context?

假装没事ソ 提交于 2019-12-21 19:51:14
问题 The problem I'm facing is essentially described here, that is: I have a DLL that is using a 3rd party in-process COM component dll. I want to use registration free COM with that in-process component. I want to embed and use a manfest into this DLL (not into the main EXE) so that I can use the 3rd party component in a reg free way. The Interface I use from the component is activated through a call to CoCreateInstance . The 3rd party COM component hasn't got any further (COM) dependencies and

what is the equivalent of COM in Mac OS?

时光总嘲笑我的痴心妄想 提交于 2019-12-21 19:24:23
问题 I'm new to the world of Mac programming. Can someone please tell me what the equivalent of reusable COM components are in Mac and some links to a good resource to get started (in creating reusable COM-like components and referring those components from a calling app)? Thank you. Clarification: - I wish to know if there exist a similar technology, which is supported at OS level. - I asked the question because I want to port some of my apps (which make use of existing type libraries from

Windows Server 2008: COM error: 0x800706F7 - The stub received bad data

随声附和 提交于 2019-12-21 17:54:11
问题 I'm evaluating Server 2008. My C++ executable is getting this error. I've seen this error on MSDN that seems to have required a hot-fix for several previous OSes. Anyone else seen this? I get the same results for the 32 & 64 bit OS. Code snippet: HRESULT GroupStart([in] short iClientId, [in] VARIANT GroupDataArray, [out] short* pGroupInstance, [out] long* pCommandId); Where the GroupDataArray VARIANT argument wraps a single-dimension SAFEARRAY of VARIANTs wrapping a DCAPICOM_GroupData struct

COM interface wrappers in PowerShell?

☆樱花仙子☆ 提交于 2019-12-21 17:52:16
问题 I have the following code in C# which I try to port to PowerShell. But I don't know how to port this cast: ((_ISkypeEvents_Event)skype).CallStatus += CallStatusHandler; If I just type [Skype4COM.ISkypeEvents_Event] in my PowerShell console I get: Unable to find type [Skype4COM.ISkypeEvents_Event]: make sure that the assembly containing this type is loaded. However, I can get all the members of the $skype object: $skype = New-Object -ComObject Skype4COM.Skype The following line doesn't work:

Building a byte array in PHP with variants?

妖精的绣舞 提交于 2019-12-21 17:44:50
问题 I am trying to build a byte array in PHP using Variants. However, I can't seem to make it work. Here's a sample code: $ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $ie->Height = 500 ; $ie->Width = 700 ; $post = array (ord('p'),ord('='),ord('1')) ; $v = new VARIANT($post, VT_ARRAY|VT_UI1); $ie->Navigate2("http://host/web/echo_request.php",0,'',$v) ; The code produces an error: Fatal error: Uncaught exception 'com_exception' with message 'Variant type conversion failed: