Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [com]

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

Filter by
Sorted by
Tagged with
12
votes
1answer
120 views

Not so Excellent Knight's Tour

Note: This is part of a set of demo applications I'm writing for colleagues to show we're not limited to VBA when dealing with Excel. Considering our IT challenges (no admin on-site & no local-...
2
votes
0answers
114 views

(COM Callable) Python class to decompile *.chm file with Microsoft HTML Help Executable

Windows only. So I am writing code to decompile a Windows compiled html help file (*.chm) and then tidy the files found within. Whilst, I have blogged some simple Python examples I now want to ...
2
votes
0answers
52 views

Updating Excel sheet with information from a DataTable

Basically, I'm trying to update an excel sheet using a DataTable (The columns structure between the two are not the same) with respect to the following rules: ...
3
votes
1answer
414 views

SAFEARRAY export from a C++ DLL to VBA

My code is not very elegant, but I'm a total newbie in c++ and I consider it already a major achievement that I managed to write something that actually works. As background, I'm defining in VBA the ...
1
vote
0answers
92 views

Compact a file of 'Compound binary file format'

I am working on a modelling application written in C++ and MFC. The generated model is saved as a compound file. For various reasons, I need to compact the compound file therefore I decided to write a ...
10
votes
1answer
1k views

Automating the download of a GitHub repo

This script is designed to locate and download the first repository in your sidebar on the GitHub repository page. It downloads the .zip file for that repo and saves it to the default location. I ...
11
votes
1answer
171 views

Properly destroying the VBE

The disposable wrappers worked exactly as intended... and that turned out being a huge mistake: That's because the .net runtime creates a Runtime Callable Wrapper per-type, not per-instance*; it took ...
7
votes
2answers
387 views

A generic IEnumerator to enumerate COM collections

As I wrapped the VBIDE API, I encountered a number of "collection types" (Windows, CodePanes, ...
8
votes
3answers
891 views

Wrapping COM objects with IDisposable

One of the things believed to contribute to destabilizing Rubberduck 2.x, is the fact that a lot of COM object references are stored in many places, and ...
4
votes
1answer
205 views

IDTExtensibility2 implementation for Rubberduck's entry point

Here is the new & improved Rubberduck 2.x entry point class, based on MZ-Tools 8.0's Connect.VBA implementation of the ...
12
votes
1answer
319 views

Shared VB6 *and* VBA extensibility add-in with OnConnect and OnDisconnect handling

Rubberduck works well enough when the VBE is of the VBA variety, but it currently only works when the Rubberduck is configured to load at VBA start-up, and it has a tendency to crash the host ...
10
votes
1answer
4k views

Find installed and available Windows Updates

I have a function that uses Windows Update Agent (WUA) API through COM using the win32com.client module, part of pywin32 package for retrieving the installed and the available (not yet installed) ...
8
votes
1answer
287 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 ...
4
votes
1answer
152 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 ...
1
vote
0answers
51 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
376 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 ...
15
votes
5answers
258 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 ...
23
votes
2answers
5k 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
627 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
65 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 ...
2
votes
1answer
506 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
261 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
1k 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
185 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 add-...
15
votes
2answers
2k 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
6k 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
2k 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
2k 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
876 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
286 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
11k 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
623 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
96 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? ...