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

Thread safety using OCXs from C# .NET

I haven't used OLE/COM for quite some time as a developer, but I currently have a need to use some 3rd party OCX code libraries from a C# program. The C# program uses threading (it's a TCP socket server). The OCXs are marked as Apartment threading…
JohnCC
  • 615
  • 7
  • 20
4
votes
4 answers

Redirect STDERR output from COM object wrapper in .NET

I'm trying to make use of the ImageMagick COM object (ImageMagickObject) in a .NET library. This library is intended to be called from IronRuby, but that isn't all that important. I want to take this approach because it will fit with my existing…
cgyDeveloper
  • 1,901
  • 3
  • 21
  • 34
4
votes
2 answers

Expose COM object to an application running in Wine/Linux

Only one Windows application is troubling me before I can fully move to Linux. It's a stock charting application (couldn't find any decent one native to Linux) that I'm running using Wine. This application has its own language and it allows the…
djahma
  • 281
  • 2
  • 6
4
votes
2 answers

Is it possible to use registration-free COM with HTA applications?

Since HTA applications are hosted within MSHTA.exe how does one provide a manifest? Plus I assume providing a MSHTA.exe.manifest could potentially break other HTA apps?
Matt Davison
  • 1,544
  • 10
  • 11
4
votes
1 answer

Visual Studio 2010 does not stop on breakpoint when debugging C# COMVisible class methods

I'm working on C# COM component. This component is called from application plugin and when I manually attach debugger to the application, it stops on breakpoints. But when I use Visual Studio debug command (F5 key) and specify "Start external…
Alex Netkachov
  • 13,172
  • 6
  • 53
  • 85
4
votes
0 answers

VS 2010 and atl attributes - deprecated or not?

are atl attributes deprecated for VS 2010 or not? it seems they have been for VS 2008, but then I've found a lot of examples for atl attributes on msdn for VS 2010. have they maybe been "fixed" for 2010?
Greg
  • 1,227
  • 5
  • 23
  • 52
4
votes
1 answer

VSTO Office Interop: Manipulating Office XML at Run-Time

Working with Office's XML files can sometimes be a convenient way of quickly manipulating a document. I.e. searching through the ZIP data of a PowerPoint file and changing the XML within the file. I wonder if there is a way to access and manipulate…
JDR
  • 1,094
  • 1
  • 11
  • 31
4
votes
1 answer

How to get installed application path for executable in COM

I am trying to get the installed location of all application using COM. I am able to get the display name of each application. But I am not able to get installed path of each application. MY Code: CComPtr
CrazyCoder
  • 772
  • 5
  • 11
  • 31
4
votes
3 answers

How to get window or process handle of a certain Excel process?

How can we get the application window handle or process handle of the excel process which belongs to the excel application instance that we have created? We are using Interop.Excel.dll Version 1.3.0.0. The application class seem to have no HWnd…
codymanix
  • 28,510
  • 21
  • 92
  • 151
4
votes
1 answer

Memory leak when using CoCreateInstance

I am using COM to initialize a C# .NET class through c++ unmanaged code, and I am detecting a memory leak even in a very basic program: int _tmain(int argc, _TCHAR* argv[]) { CoInitialize(NULL); ComClass::IClass1 *_comClass1; HRESULT hr =…
Oded
  • 2,239
  • 2
  • 18
  • 16
4
votes
2 answers

Using registration free com in a .NET app

I'm trying to use a 3rd party COM DLL (I don't believe its a .NET component) from a .NET service without registering the COM DLL but I'm having no luck so far. I've copied the manifest files from here…
cheesemp
  • 307
  • 1
  • 3
  • 10
4
votes
2 answers

combase error (CoInitialize has not been called)

onecore\com\combase\objact\objact.cxx(812)\combase.dll!00007FF8BD322169: (caller: 00007FF8BD320F78) ReturnHr(1) tid(b54) 800401F0 CoInitialize has not been called. I'm using Visual Studio 2015 and have started receiving the following error message.…
StinkyCoo
  • 83
  • 1
  • 5
4
votes
2 answers

DllImport vs ComImport

I'm trying to wrap my head around the concepts of Platform Invocation Services, Component Object Model etc, but I find it hard to understand what is what and where different responsibilities lie. I've been studying code which contains the…
user8056359
  • 437
  • 1
  • 7
  • 16
4
votes
5 answers

COM object accessing problem in C#

I am having a hard time figuring out what I'm doing wrong, so I thought I would ask this at SO. I am trying to automate a measurement task (Qualcomm QXDM), hence would like to access the COM interface exposed by a measurement tool. I wrote the…
Andy
  • 245
  • 5
  • 18
4
votes
0 answers

IShellItem2.GetString returning E_NOTFOUND for PKEY_Devices_Status1 on Windows 7

Problem IShellItem2.GetString returns E_NOTFOUND for PKEY_Devices_Status1 and PKEY_Devices_Status2 for all devices on Windows 7 (build 6.1.7601). This is unexpected because they were introduced in Windows 7 and they work in Windows 10. I’m showing a…
jnm2
  • 7,960
  • 5
  • 61
  • 99