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

11749 questions
53
votes
2 answers

Is COM broken in XE2, and how might I work around it?

Update: XE2 Update 2 fixes the bug described below. The program below, cutdown from the real program, fails with an exception in XE2. This is a regression from 2010. I don't have XE to test on but I'd expect that the program works fine on XE (thanks…
David Heffernan
  • 572,264
  • 40
  • 974
  • 1,389
52
votes
1 answer

Excel Automation with Haskell gives a seg fault

I can fire up Excel with the following script. But in ghci (7.4.1) I have a segmentation fault when I run it. I don't know where to search from now. I don't have this error if I remove the line workSheets <- workBook # propertyGet_0…
jinkou2 jinkou2
  • 1,096
  • 7
  • 12
51
votes
1 answer

COM+ object activation in a different partition

I had created a COM+ domain partition then mapped it to a Windows 2008 server machine and imported a COM+ application into it. I tried using the following C# code to activate an object from that specific partition on the server remotely: //partition…
Khaled Saleh
  • 513
  • 3
  • 7
49
votes
5 answers

Which version of MSXML should I use?

Seems like this would be a common question, though I could not find it on SO. Which version of MSXML should I use in my applications, and more importantly, how should I decide? There is MSXML3, 4, 5 and 6. I recently posted some code in…
Cheeso
  • 180,104
  • 92
  • 446
  • 681
49
votes
1 answer

COM object that has been separated from its underlying RCW cannot be used

I have some COM component which I call from some c# dll. I also have a winforms app that uses that .dll. When I close the app I get this exception: COM object that has been separated from its underlying RCW cannot be used. The stack trace…
Yaron Naveh
  • 21,660
  • 31
  • 97
  • 151
48
votes
3 answers

How do I create an COM visible class in C#?

I using Visual Studio 2010 (.NET 4). I need to create a COM object (in C#) and have no idea how to get started (what type of project to use,etc.)
Eyal
  • 1,191
  • 1
  • 9
  • 7
43
votes
6 answers

Windows 64-bit registry v.s. 32-bit registry

I heard on Windows x64 architecture, in order to support to run both x86 and x64 application, there is two separate/different sets of Windows registry -- one for x86 application to access and the other for x64 application to access? For example, if…
George2
  • 42,353
  • 103
  • 307
  • 447
43
votes
3 answers

COM(C++) programming tutorials?

Are there any good sites for learning C++/COM from the ground up? I'm looking for something like a crash course with perhaps two weeks' worth of content. The course can assume knowledge in standard C/C++, or at least not a complete dummy.
Deep-B
  • 1,342
  • 1
  • 13
  • 21
43
votes
1 answer

Use default authentication and separate cloaking/impersonation in DCOM call

I'm trying achieve two things with DCOM (Out of process) Set the process wide authentication using CoInitializeSecurity and its parameter pAuthList. Using cloaking to change the caller's identity in special situations (COM calls) My…
ChristianWimmer
  • 1,049
  • 7
  • 16
42
votes
6 answers

What does stdole.dll do?

We have a large C# (.net 2.0) app which uses our own C++ COM component and a 3rd party fingerprint scanner library also accessed via COM. We ran into an issue where in production some events from the fingerprint library do not get fired into the C#…
rc1
41
votes
3 answers

Is there an equivalent to COM on *nix systems ? If not, what was the *nix approach to re-usability?

I have an understanding of windows COM and the ideas behind it. I am trying to understand if *nix systems even have an equivalent or why they don't?
RyBolt
  • 1,674
  • 3
  • 21
  • 33
41
votes
4 answers

The #include exists, but I get an error: identifier "cout" is undefined. Why?

I learn C++ and COM through the books. In the IDE MS Visual Studio 2012 I have created new empty C++ project, and added some existing files to it. My CPP file contains #include row, but in editor I got such messages: Error: identifier…
Andrey Bushman
  • 10,107
  • 12
  • 64
  • 150
40
votes
1 answer

What is difference between RegAsm.exe and regsvr32? How to generate a tlb file using regsvr32?

Can any body tell me what is the difference between regsvr32 and RegAsm? My Dll is in C#, so how can I import the classes to c++?
Cute
  • 12,313
  • 34
  • 91
  • 111
39
votes
3 answers

Where can I find all of the COM objects that can be created in Powershell?

In Powershell I can create COM objects which can be used, for example, to control Microsoft Office applications: $excel = New-Object -com "Excel.Application" $excel.visible = $true How can I list all of the available COM objects that can be created…
John Channing
  • 6,303
  • 6
  • 39
  • 56
39
votes
3 answers

Is there any point in specifying a Guid when using ComVisible(false)?

When you create a new C# project in Visual Studio, the generated AssemblyInfo.cs file includes an attribute specifying an assembly GUID. The comment above the attribute states that it is used "if this project is exposed to COM". None of my…
user200783
  • 12,313
  • 10
  • 58
  • 110