Component Object Model (COM) is a component technology from Microsoft, featuring remoting, language independence and interface-based programming.

learn more… | top users | synonyms

8
votes
0answers
86 views

A status bar for the VBE

One of the most annoying things about the VBE (VBA's IDE), is that it doesn't have a status bar. Rubberduck 2.0 works around this by introducing the ...
3
votes
1answer
26 views

A class (actually a structure) to help decode an HRESULT

HRESULTs are the common way for Microsoft technologies like COM and Win32 to return either an error code or messages that mean a specific type of success. They are usually returned as the result of a ...
0
votes
0answers
13 views

IDataConvert::Release() does not return 0

In order to convert a database type DB_NUMERIC to real, I noticed that a call to IDataConvert::Release() does not return ...
7
votes
1answer
100 views

Milking a COM type library: “fun” with COM reflection

Once upon a time, there was a duck that wanted to know where and how user code was calling into the VBA standard library and Excel object model. To match the rest of its API, the poor little duck had ...
14
votes
5answers
150 views

Step by Step, ooh HotKey

Still hooked on Windows, I refactored the hook into a number of interfaces, and I wanted to support 2-step hotkeys, so I started with defining an IHook that can be ...
17
votes
2answers
3k views

Hooked on Windows

The code that was just added to Rubberduck will allow us to set up hotkeys for our features, so that next release, Ctrl+Shift+R brings up the refactor/rename dialog, for example. The requirements ...
1
vote
0answers
71 views

Using COM objects in plain C

In this code, I am creating a COM object to programatically access internet explorer. In order to access this object's properties and methods, I am writing wrapper functions like ...
4
votes
3answers
60 views

COMpatible+ Google+ Integrations+ Scoping+

So I have part of a library which deals with scopes in Google+ integration, and I'm curious on the overall view of it. Yes, things are stringly typed in one of the methods, that is because this has ...
1
vote
1answer
254 views

Hook COM Object and get data from SIEMENS Step 7 software to control PLC through events in their code modified at runtime

I'm a first traveler coding in WinApi, Hooks, COM objects. Then, I made a dll to inject (EasyHook) this in the target SIEMENS Step7 process and modify the software code at runtime: Maybe I want some ...
12
votes
1answer
242 views

Inspector Rubberduck

Our Rubberduck open-source VBE add-in project is coming along nicely. One of the main features we're going to be implementing in the next release, is code inspections. I started by defining an ...
7
votes
2answers
512 views

Tuning Excel calculation engine which uses MS Excel interop

I am currently building an Excel calculation engine. Its purpose is basically to wrap the calculation logic of an Excel workbook in order to use the logic from a C# library. ...
7
votes
1answer
86 views

Integrating Unit Testing functionality into an old COM-based IDE

My UnitTesting add-in works nicely, but it has dependencies on a Reflection and a System ...
14
votes
2answers
842 views

Passing a 1D array (single column of a Range object) to .NET to manipulate it without loops and returning it back to VBA

Background Kind of a follow up - slightly related to my other SO question. I thought that if somehow I find a way in VBA to pass a single column to .NET and convert it to a native .NET type then I ...
6
votes
2answers
2k views

C++ application calling C# Dll marshalling strings

The code appears to work fine. The values are returned as expected from the DLL and the values are added correctly to the DLL. Will the way I am passing the string to C# cause a memory leak? Also, ...
6
votes
1answer
846 views

C++ Wrapper for SAFEARRAY

Here is a C++ wrapper for SAFEARRAY, including the ability to expose it as a VARIANT, and to create one out of VARIANT. I am aware of CComSafeArray, however i don't use VC++ so I do not have ...
1
vote
1answer
621 views

Conversion between QString and BSTR

I'm currently working on a Qt project writing Excel files through a third party DLL. As the third party DLL has a COM interface, I have to do lots of conversions between QString and BSTR... I wrote ...
2
votes
1answer
435 views

Find password to a word document

I am using Java and COM4j to communicate with Word. The approach I used here is brute force. I have a password protected .doc, and I forgot its password. ...
2
votes
1answer
166 views

VARIANT structure deserialization code organization

In my project i work with COM object via System.Reflection. COM object returns pointer on structure VARIANT, that i cast as ...
4
votes
1answer
4k views

Proper way of using IXMLDOMDocument

I am trying to use IXMLDOMDocument for XML reading/writing. I am not good COM, and I am not aware that I am doing things right or wrong. I am very unsure that there could be some problems with COM ...
4
votes
1answer
307 views

Is brute force the accepted best practice for handling Excel COM 'busy' exceptions?

Following on from a question about handling-com-exceptions-busy-codes I would like to know if the following model is the accepted best practice of handling Excel COM busy messages when accessing the ...
2
votes
0answers
78 views

D3D COM Object Pooling

I'm using the following pattern to pool D3D objects globally in my application. Is it a good idea (alternatives)? Is it thread-safe? ...