com

Multithreading working perfectly until I hit the com object.

I'm using com interop to talk to some physical piece of hardware. When I need the current reading from the hardware I have a nice elaborate piece of threading code that keeps it off my UI thread so that I don't lock up the UI while I query the hardware since sometimes it can take as much as 1-2 minutes (although usually more like 1-5 se...

Adding .net COM wrapper to cache by value instead of by ref

In my code I'm instantiating a legacy Delphi object through a COM interface. This class needs to be instantiated many times, so in order to lower the overhead of instantiating it I cache it at a point where 70% of all the calls have the common resulting object. However, when I alter the object after it is cached, the changes are persi...

Configure a class to support Elevated Activation

I have a class which is COM, and a want to launch an elevated COM object. I'm using LaunchElevatedCOMObject() method from VistaBridgeLibrary but all I get is the error code 0x80080017, which is "The class is not configured to support Elevated activation". How could I configure my class to support Elevated Activation? ...

Embedding objects into Microsoft Word and OpenOffice Writer

I am looking for some references on how to implement the following feature: ability to embed objects (e.g. diagrams) into word processors and being able to edit them in their respective "mother" application For example, MS Word and Visio work like this together, allowing the user to easily edit/tweak the diagrams after adding them ...

Seeking COM-based Tree control with specific features

Hi All, For reasons I won't go into, I need a COM-based tree control with the following features: C# accessible Multi-node select Drag/drop nodes within the same (and possibly different) instances of the control within the same application 32 and 64-bit compatibility I had nearly settled on Bennet-Tec's "TList" control, but found th...

Why is the type library in my dll corrupt (registering returns TYPE_E_CANTLOADLIBRARY)?

We have a mature c++ COM codebase that has been building, registering and running for many years. This includes numerous developer machines and autobuild machines. The codebase builds several dlls and exes. Some of these are COM servers. The typical setup is Xp64 using both visual studio 2005 and 2008. We have both 32 bit and 64bit ...

Intermittent JVM Crash When Using JNI and COM

I'm trying to call a DLL compiled from VB6 source code that I do not have access to. The VB6 code simply retrieves data from a DB2 database using ADO and my client code grabs that data and marshals it to my Java code. I'm attempting to achieve this using JNI and COM (without a third-party bridge). It works 75% of the time, but the other ...

Why COM (Component Object Model) is language independent ?

I know that COM provides resuability at binary level across languages and applications. I came to know that all components build based on COM have standard memory layout inorder to be language indepedent. I am not getting what is the meaning of "standard memory layout"? And What makes it language independent ? Any input is welcomed......

Convert VB's Format() into PHP

In PHP, I'm trying to read an Excel file using COM(): $rrc_app = new COM("Excel.application"); $rrc_workbook = $rrc_app->Workbooks->Open($filename); $rrc_worksheet = $rrc_workbook->Worksheets('Top sheet'); $rrc_worksheet->activate; I tried to extract the value of a cell containing a "Time" value: $review_time = $rrc_worksheet->Range(...

iTunes SDK COM - Notification that iTunes has been started

I'm currently developing an application which uses the iTunes COM (Win32) to hook into the iTunes application. At the moment, I have managed to unhook the COM when iTunes closes through the use of the OnQuittingEvent which is great, iTunes doesn't display the application interface dialog so everything is good. My problem arises when I...

creating an .NET COM component

I need to create a class that can be accessible through the classic asp's Server.CreateObject method, and that exposes 3 properties (int Width, int Height, bool Loaded) and 3 methods (void Load(string locatoin), void Resize(int width, int height), void Save(string location)). All my attempts so far has been unsuccessful. Any help would ...

Distribution of Interop files

There are some bug fixes that have been done in a COM component. Each time I compile, a new interop file is generated along with the dll of the actual component (component.dll) where the fix has gone in. Is it necessary to release the interop file (interop.component.dll) along with the actual dll when releasing the fix to the customer. ...

Why is C# null translated as Empty in VB6, instead of Nothing

I have a C# application that reference a VB6 dll. When I pass null from C# into VB6 dll function, the null is translated as value Empty (value) in VB6, instead of Nothing (object). For example: // function in vb6 dll that referenced by c# app Public Sub TestFunc(ByVal oValue As Variant) { ... if oValue is Nothing then set ...

C# Com Interop with Windows Media Player Visualisation (With Sample Code)

I am attempting to create a Windows Media Player (WMP) Visualization plugin in C#. I am quite new to exposing C# to COM and may have missed something basic. I have persisted with this for 3 days (about 20 hours) and not got past the single issue I will describe below. For those who don't know, WMP visualizations are the pretty images th...

How to debug a COM dll in Delphi ?

Hi, I try to debug a COM dll (TAutoObject) in Delphi and my break point are not green. I put my option like this : host : c:\Program Files\Internet Explorer\iexplore.exe param : c:\software\test.html My test is well lanched but no breakpoint in Delphi what is the way to to this ? ...

com4j versus jacob to call COM methods from Java

I maintain a legacy Java application that uses Jacob, or Java-COM Bridge, to make calls via the COM interfaces of MS VBA and MS Word. I have been looking at com4j from Sun, and it looks promising. The reason it looks good to me is that it uses vtable binding to methods, instead of IDispatch. Assuming all the COM objects we manipulate pr...

Is it possible to troubleshoot C# COM Interface Implementations?

I have a C# implementation of a C++ COM Interface. I have ported the IDL (Interface) as accurately as I can. When the C++ app instantiates my object it successfully calls one of the methods. It then tries to call another of the methods but nothing happens. The second call's execution path never makes it to the C# side. I don't have ac...

CComModule UnregisterServer error?

I have a CComModule that is calling RegisterServer (TRUE) on DllRegisterServer and UnregisterServer (TRUE) on DllUnregisterServer. The UnregisterServer is getting a 0x8002801C (Error accessing the OLE registry.) error and leaving around registery keys. I am using a Windows Server 2k8 R2 machine with UAC enabled. The components are x86 an...

Simulating SideBySide for Out of Process ActiveX

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

How to better initialize a reference counter for a non-creatable COM object?

I have a COM interface with a method that returns an object: interface ICreatorInterface { HRESULT CreateObject( IObjectToCreate** ); }; The key is that calling ICreatorInterface::CreateObject() is the only way to retrieve an object implementing IObjectToCreate interface. In C++ I could do it this way: HRESULT CCreatorInterface...