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
400
votes
7 answers

Could you explain STA and MTA?

Can you explain STA and MTA in your own words? Also, what are apartment threads and do they pertain only to COM? If so, why?
John
  • 5,283
  • 4
  • 28
  • 26
197
votes
5 answers

How to handle AccessViolationException

I am using a COM object (MODI) from within my .net application. The method I am calling throws a System.AccessViolationException, which is intercepted by Visual Studio. The odd thing is that I have wrapped my call in a try catch, which has…
Jeremy
  • 40,978
  • 63
  • 191
  • 304
168
votes
4 answers

How does the C# compiler detect COM types?

EDIT: I've written the results up as a blog post. The C# compiler treats COM types somewhat magically. For instance, this statement looks normal... Word.Application app = new Word.Application(); ... until you realise that Application is an…
Jon Skeet
  • 1,261,211
  • 792
  • 8,724
  • 8,929
154
votes
5 answers

How can I generate UUID in C#

I am creating an .idl file programmatically. How do I create UUIDs for the interfaces and Methods Programmatically. Can I generate the UUID programmatically?
Uma Shankar Subramani
  • 1,637
  • 2
  • 11
  • 12
97
votes
13 answers

Microsoft.Office.Core Reference Missing

Using the example provided in codeproject I am struggling to work out where I can find the reference to the library Microsoft.Office.Core. I am getting the error "The referenced component 'Microsoft.Office.Core' could not be found." I only have…
Maxim Gershkovich
  • 42,124
  • 39
  • 134
  • 227
90
votes
2 answers

What is COM (Component Object Model) in a nutshell?

It seems COM objects are general use objects which are governed by the OS. The objects follow a strict interface and allow you to query the objects to determine information. Is this what COM objects are?
RBehelit
87
votes
5 answers

Generate manifest files for registration-free COM

I have some applications (some native, some .NET) which use manifest files so that they can be deployed in complete isolation, without requiring any global COM registration. For example, the dependency on the dbgrid32.ocx com server is declared as…
Wim Coenen
  • 63,995
  • 12
  • 149
  • 237
79
votes
5 answers

Excel interop: _Worksheet or Worksheet?

I'm currently writing about dynamic typing, and I'm giving an example of Excel interop. I've hardly done any Office interop before, and it shows. The MSDN Office Interop tutorial for C# 4 uses the _Worksheet interface, but there's also a Worksheet…
Jon Skeet
  • 1,261,211
  • 792
  • 8,724
  • 8,929
75
votes
4 answers

Turn a simple C# DLL into a COM interop component

How do I make a C# DLL into a COM interop DLL that can be consumed by a VB6 application?
Elena Lawrence
  • 913
  • 1
  • 7
  • 6
73
votes
4 answers

BSTR to std::string (std::wstring) and vice versa

While working with COM in C++ the strings are usually of BSTR data type. Someone can use BSTR wrapper like CComBSTR or MS's CString. But because I can't use ATL or MFC in MinGW compiler, is there standard code snippet to convert BSTR to std::string…
ezpresso
  • 7,110
  • 11
  • 54
  • 90
73
votes
9 answers

Is there an embeddable Webkit component for Windows / C# development?

I've seen a few COM controls which wrap the Gecko rendering engine (GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll). Is there a wrapper for Webkit that can be included in a .NET Winform application?
Jon Galloway
  • 50,160
  • 24
  • 120
  • 192
65
votes
3 answers

What does registering a DLL do?

I know how to register dlls but I've never really been sure why I'm doing it or under what conditions a dll must be registered. Could somebody explain or point me to some documentation?
stimms
  • 39,499
  • 27
  • 88
  • 144
60
votes
10 answers

Starting and stopping IIS Express programmatically

I am trying to build a small application in C# which should start/stop an IIS Express worker process. For this purpose I want to use the official "IIS Express API" which is documented on MSDN: http://msdn.microsoft.com/en-us/library/gg418415.aspx As…
Mike
  • 1,916
  • 4
  • 28
  • 39
54
votes
3 answers

What is the difference between COM and OLE?

What is the difference between COM and OLE, if any?
TASNEEMUDDIN
54
votes
2 answers

Allowing connection to .NET COM server with mismatching integrity level

I'm having an issue with a COM based client-server setup. The COM server is written in C# (.NET 4.0) and runs as a (registered) local server. Depending on which application connects to the server, other clients will receive a Server execution failed…
Thorarin
  • 43,849
  • 11
  • 70
  • 108
1
2 3
99 100