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
1 answer

VB6 IDE Is Locking The Loaded Project's DLL

I'm responsible for maintaining legacy VB6 code, and have encountered an annoying problem with regard to the locking of a project's COM DLL. (We'll call it MyProject and MyProject.dll) When I load MyProject into the VB6 IDE, I am able to compile the…
James Wiseman
  • 29,946
  • 17
  • 95
  • 158
4
votes
2 answers

Passing optional arguments to a COM function in VC++

I have an MFC wrapper over a COM object. There is a function that takes a large number of options, which are mostly optional. How do I pass some arguments but not others? For what it's worth, the optional arguments are listed as VARIANT*. Below…
Adam Tegen
  • 25,378
  • 33
  • 125
  • 153
4
votes
2 answers

How do I resolve process hanging on CoUnitialize()?

I have a native Visual C++ NT service. When the service is started its thread calls CoInitialize() which attaches the thread to an STA - the service thread uses MSXML through COM interfaces. When the service receives SERVICE_CONTROL_STOP it posts a…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
4
votes
2 answers

Using a 32 Bit Com Object from a 64 Bit IFilter

I have an IFilter written in Delphi that I'm trying to get working under 64 bit Windows 7 Desktop Search. Due to it being developed in Delphi I can only compile this as a 32 Bit DLL. To work around this I am trying to write a 64bit IFilter Dll in…
Jamie
  • 3,150
  • 2
  • 26
  • 35
4
votes
2 answers

I need to access a 32bit dll from a 64bit exe

I know I read all about surrogate process, and I was able to create a surrogate COM but it either all works in 32bit or all works in 64bit. What would be the correct structure? 1) 32.dll <- 64.com <- 64.exe 2) 32.dll <- 32.com <- 64.exe I tried both…
4
votes
4 answers

How to specify custom COM enum as PowerShell method parameter

How can I create a reference for a enum declared inside a COM object to pass to a method that requires it? Specifically, there is a method SetHomeDir on a 3rd-party COM object that takes in an enum as the only parameter. The definition that…
Goyuix
  • 23,614
  • 14
  • 84
  • 128
4
votes
3 answers

Can someone explain the c++ FAILED function?

I've seen a lot of example c++ code that wraps function calls in a FAILED() function/method/macro. Could someone explain to me how this works? And if possible does anyone know a c# equivalent?
Adam Naylor
  • 6,172
  • 10
  • 49
  • 69
4
votes
2 answers

GC contains lots of pinned objects after a while

I have a strange phenomenon while continuously instantiating a com-wrapper and then letting the GC collect it (not forced). I'm testing this on .net cf on WinCE x86. Monitoring the performance with .net Compact framework remote monitor. Native…
Stormenet
  • 25,926
  • 9
  • 53
  • 65
4
votes
3 answers

Connecting to WMI: 0x800706ba errors on some machines (but not all)

When I try to connect to WMI from Powershell, ConfigMgr, or WMI explorer, I can talk to the majority of my computers, but some (maybe 30%?) return an 0x800706ba (RPC server is unavailable). If I turn the firewall off on the remote machine, the…
Doug Chase
  • 701
  • 3
  • 8
  • 15
4
votes
1 answer

Calling a Visual Basic DLL in C++, Part 2

This question is a follow up to a previous question (here). I have acquired a DLL that was created in Visual Basic from a third party vendor(Sensor DLL.dll). This DLL contains functions for talking to a sensor, and I need to call these functions…
John
  • 95
  • 1
  • 2
  • 5
4
votes
1 answer

Building a byte array in PHP with variants?

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…
Tower
  • 98,741
  • 129
  • 357
  • 507
4
votes
1 answer

Mixing Qt threads with COM threads

I'm working on a little project that uses DirectShow/COM for capture, and DShow makes callbacks using its own threads when my application gets imaging data. I'm also using Qt in my project, and I'm wanting to use Qt for synchronisation and…
Dai
  • 141,631
  • 28
  • 261
  • 374
4
votes
3 answers

Calling F# (.Net dll) code from php

I was wondering if it was possible to call some F# code from php. It seems like Phalanger does the trick. Is anybody using it ? For this solutions and others( if there are any?), what requirements does it have on the server to run the code ? Thank…
jlezard
  • 1,417
  • 2
  • 15
  • 32
4
votes
2 answers

Freeing JavaScript's ActiveXObject()?

I'm calling a C# COM component using javascript: keystore = new ActiveXObject("RBCrypto.KeyStore");. I've noticed this instance stays around until I exit the browser. Is there anyway to "release" that object when the user leaves the page? Currently…
Petey B
  • 11,439
  • 25
  • 81
  • 101
4
votes
1 answer

Why are COM event handlers always null?

Using this article, I've set up this COM-visible interface to define my events: [ComVisible(true)] [Guid("3D8EAA28-8983-44D5-83AF-2EEC4C363079")] [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface IParserStateEvents { void…
Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235