Questions tagged [com]

Component Object Model (COM) is a component technology from Microsoft, featuring remoting, language independence and interface-based programming. For questions about the COM serial port, you should use the [serial-port] tag instead.

Component Object Model (COM) specifies an architecture, a binary standard, and a supporting infrastructure for building, using, and evolving component-based applications.

Some of the core features of COM are:

  • A remoting infrastructure
  • The use of interface-based programming
  • A threading model
  • The ability to write language independent components.

COM is the foundation of technologies such as OLE, ActiveX and COM+.

COM predates .NET and although .NET has replaced some of the features that developers use COM for it is still a crucial technology and the foundation of most inter application communication on Windows.

External links

12235 questions
4
votes
3 answers

C++ COM design. Composition vs multiple inheritance

I'm trying to embed a browser control in my application (IWebBrowser2). I need to implement IDispatch, IDocHostShowUI, IDocHostUIHandler etc to make this work. I am doing this in pure C++/Win32 api. I'm not using ATL, MFC or any other framework. I…
Tobbe
  • 3,282
  • 6
  • 41
  • 53
4
votes
0 answers

Using EdgeHTML instead of MSHTML

We have developed a Windows Desktop HTML/XSL editing application, written in C++ using MFC/ATL/COM technologies, relying heavily on MSHTML's IHTML* COM interfaces, like IHTMLElementPtr, IHTMLDocumentPtr, IWebBrowser2, and so on, making it easy for…
MrTo
  • 41
  • 4
4
votes
1 answer

Registration-Free COM Objects on Windows-7/64bit

I'm trying to get the Registration-Free Activation of COM Components: A Walkthrough sample from Microsoft to run on a windows 7 Professional / 64bit machine. I've downloaded the demo program MSDNRegFreeCOM.msi. I have it building and running…
photo_tom
  • 7,292
  • 14
  • 68
  • 116
4
votes
2 answers

What is IconnectionPoint and EventHandling

Trying to understand What is IConnectionPoint and how this is connected to IConnectionPointContainer,IEnumConnectionPoints,IEnumConnections and EventHandling. Read the artcicles from MSDN and CodeProject which is explaining a about other methods…
Simsons
  • 12,295
  • 42
  • 153
  • 269
4
votes
2 answers

How to hook up a COM event dispatcher?

The VBIDE API exposes the wonderfully cryptic _dispVBComponentsEvents interface (among others), which look like something that I could use to capture various interesting events in the VBE. So I implemented the interface in a class that intends to…
Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235
4
votes
1 answer

CoUninitialize error: Access violation reading location 0x00000008

The code below spawns a thread that waits for 5 seconds before iterating (recursively) over all the accessibles (widgets) in the foreground application. If (during the 5 second delay) I switch to a Windows 10 Metro app (like Calc or Edge) then the…
bwiwov
  • 51
  • 6
4
votes
3 answers

How to find interfaces of an ActiveX control?

Given an instance of an ActiveX control, how do I enumerate it's interfaces? (I'd like to get the names of the interfaces).
Tamás Szelei
  • 23,169
  • 18
  • 105
  • 180
4
votes
1 answer

Problems using SAPI with PHP through COM, on IIS

I am attempting to get Text To Speech and Speech Recognition to work in PHP using Microsoft's SAPI through COM objects. In the past, I already used this code to get TTS to work (Apache 2.1, PHP 5.5, on Windows 2003 Server) // Instantiate the…
resle
  • 2,254
  • 4
  • 19
  • 37
4
votes
1 answer

Problem with triggering Events in a .NET DLL via COM from Delphi

i have a problem with COM objects and triggering events. I have: a DLL written in C#.NET (3.5), which triggers events an application in Delphi5, which uses the DLL as a COM object. So far so good. Events go like this: - in the DLL there are 2…
hudson
  • 41
  • 2
4
votes
1 answer

Attaching an event handler to a Com event: InvalidOperationException (S7-PLCSIM)

I'm trying to attach an Event Handler to an Event of a COM Object. But I get an InvalidOperationException. using S7PROSIMLib; private S7ProSim ps = new…
c3ntry
  • 157
  • 1
  • 11
4
votes
0 answers

MF SinkWriter memory problems

I try to encode images of my desktop (1920x1080) to a video file using DXGI Desktop Duplication API and MF Sink Writer. My encoding thread looks like this: #define RETURN_ON_BAD_HR(expr) \ { \ HRESULT _hr_ = (expr); \ if (FAILED(_hr_)) { \ …
prazuber
  • 1,352
  • 10
  • 26
4
votes
2 answers

Is .NET replacement for COM?

I want to know purpose of .NET and COM , Is .NET has the same purpose as that of COM ? Because main purpose of COM is to allow language interoperability so as that of .NET ? If so Why many companies still using COM for their development projects…
Xinus
  • 29,617
  • 32
  • 119
  • 165
4
votes
4 answers

detecting memory leaks in C++ / windows

For debugging purposes, when I'm writing an app, the first thing I do is put the following into the stdafx.h: // -- leak detection ---------------------------------------------------------- #ifdef _DEBUG //…
user206705
4
votes
2 answers

How could HRESULT appear in an MIDL file?

I am developing some COM interfaces with IDL files. Some interface methods return HRESULT, but I have checked the MIDL language reference on MSDN, there's not a clue of HRESULT. So where could I find the official definition of this data…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
4
votes
1 answer

How to pump COM messages?

I want to wait for a WebBrowser control to finish navigation. So i create an Event, and then i want to wait for it to be set: procedure TContoso.NavigateToEmpty(WebBrowser: IWebBrowser2); begin FEvent.ResetEvent; …
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219