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

ICallFactory with 32-bit and 64-bit type libraries side by side

I have a in-proc COM server for which I want to build 32-bit and 64-bit versions. I can do this with no problem. However, I am encountering some issues when both versions are registered. I am not using ATL. In my DllRegisterServer function, I am…
Michael Gunter
  • 12,528
  • 1
  • 24
  • 58
4
votes
2 answers

Is there a way to watch all COM activity on a computer?

I'm trying to deal with a piece of specialized hardware, that presents it's interface as a COM object, using win32com in Python. However, the documentation for how to actually set up the hardware through the COM object is sparse (it requires a…
Fake Name
  • 5,556
  • 5
  • 44
  • 66
4
votes
2 answers

Wrapping a 32-bit COM shell extension within a "thin" 64-bit DLL wrapper

The premise: I have an old, 32-bit COM shell extension (written in C++). After years of incompatibility with newer, 64-bit systems, we are now updating it to work in a 64-bit Windows environment. The trick: The 32-bit COM DLL contains dependencies…
BTownTKD
  • 7,911
  • 2
  • 31
  • 47
4
votes
1 answer

Retrieving session ID from COM method

I have a method named GoLogon in a COM object named BS.Logon which requires 5 parameters: Username Password ApplicationID XMLRoot IPAddress This method logins to the web server with the username, password, and other details, and returns the…
Basavaraju B K
  • 71
  • 2
  • 11
4
votes
2 answers

Why I can call StringFromCLSID even without the calling of CoInitializeEx before?

I am learning COM through C++. From MSDN: Applications are required to use CoInitializeEx before they make any other COM library calls except for memory allocation functions. The memory allocation functions is CoTaskMemAlloc and CoTaskMemFree in…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
4
votes
3 answers

Defining STA: "single thread affinity" or "single threaded apartment"; and how they relate

I'm working with WPF and am reading through materials on STA. Two questions: 1) STA is defined as standing for both "single thread affinity" and "single threaded apartment" by different articles. This says the…
user603563
  • 374
  • 3
  • 15
4
votes
2 answers

Replacing a C++ ActiveX component with a .NET implementation?

I have existing managed and unmanaged software using an ActiveX component supplied by a third party to perform some communications, but it is now required that this communication be routed through my application. Ideally I'd be able to install a…
Leon Breedt
  • 1,196
  • 8
  • 13
4
votes
1 answer

Does Scheme work with Microsoft COM?

I'm new to Scheme and I like it a lot for its first-class/higher-order functions. However, my data comes from a COM source with an object-oriented API. I know Scheme and COM belong to different programming paradigms, but I'm wondering if there is…
Martin08
  • 20,990
  • 22
  • 84
  • 93
4
votes
1 answer

No binary compatibility although a declaration is kept identical

I'm stuck on trying generating a new version of a COM DLL with binary compatibility. I don't understand why I get this message : 'init' in the 'Logger' class module has arguments and/or a return type that is incompatible with a similar declaration…
Amessihel
  • 5,891
  • 3
  • 16
  • 40
4
votes
1 answer

How do I invoke the MIDL compiler to generate a .TLB file (type library) from an .IDL file?

I am struggling with something seemingly super-simple: I'd like to use the MIDL compiler to generate a type library (.tlb file) from a .idl file. However, I just can't get MIDL to generate a .tlb file. This is my Foo.idl: import…
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
4
votes
3 answers

Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)

Using .Net 4.0 / WPF Application / C# I have the following piece of code in my application, which opens a FileDialog when the Select button is clicked. OpenFileDialog fdgSelectFile; bool? dialogResult; try { fdgSelectFile = new OpenFileDialog…
Saagar Elias Jacky
  • 2,684
  • 2
  • 14
  • 28
4
votes
5 answers

Custom API requirement

We are currently working on an API for an existing system. It basically wraps some web-requests as an easy-to-use library that 3rd party companies should be able to use with our product. As part of the API, there is an event mechanism where the…
jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182
4
votes
1 answer

.NET COM Callback

I'm trying to write some C# code that uses the DIA (Debug Interface Access) SDK to query a PDB file. I used the batch file described in this question to create a wrapper assembly around the DIA type library. Now I was able to create instances of the…
Michael Bikovitsky
  • 903
  • 2
  • 10
  • 20
4
votes
1 answer

Using an array of derived objects as an array of base objects when the sizes are the same (CComVariant/VARIANT)

I'm using code that treats an array of derived objects as an array of base objects. The size of both objects is the same. I'm wondering: Is this safe in practice, bearing in mind that the code will only ever be compiled on Microsoft…
JoeG
  • 12,994
  • 1
  • 38
  • 63
4
votes
2 answers

Where are COM method calls executed

Let's say, I am executing an exe written in c#(just my choice of language). It has the following piece of code: var comObj=new ComClass(); comObj.DoSomething(); Now, I would like to know in which process is the DoSomething method executed. Is it…
Victor Mukherjee
  • 10,487
  • 16
  • 54
  • 97
1 2 3
99
100