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
0 answers

COM asynchronous call doesn't respect the message filter

I have an STA COM object that implements a custom interface. My custom interface has a custom proxy stub that was built from the code generated by the MIDL-compiler. I would like to be able to asynchronously make calls to the interface from other…
Michael Gunter
  • 12,528
  • 1
  • 24
  • 58
4
votes
1 answer

Reading sms from android device using ADB shell commands

i am working on a project to read the sms of my android mobile,but on internet didn't find much about it. in my search i found following points You can access android mobile phone through ADB shell commands ,but only certain limited features. ADB…
pranjal khanduri
  • 351
  • 1
  • 3
  • 16
4
votes
1 answer

C# COM Server to C# COM Client using CoCreateInstance

I need to create a C# COM server, and a C# COM Client, and communicate between the two using CoCreateInstance. This is so that the client can be 64 bit, and the server 32 bit, using the 'DllSurrogate' method described in Hosting a .NET DLL as an…
Ant Waters
  • 510
  • 1
  • 5
  • 22
4
votes
1 answer

Connect 64bit Java with 32bit COM dll using Com4j or Jacob

I have the following configuration: 1) Windows 10 64-bit 2) An application that has only a 32-bit version and is available through COM. I access the .dll file of the 32-bit application using the tlbimb.jar to generate the interfaces needed and I…
Thanos
  • 3,627
  • 3
  • 24
  • 35
4
votes
1 answer

simple callback in visual c++

I'm a Linux programmer and new to COM programming and I've inherited a program which I'm now trying to modify. I've got an IDL file with the following dispinterface and I'm trying to set up a callback in C++. I've been searching the web and I've…
Jayen
  • 5,653
  • 2
  • 44
  • 65
4
votes
1 answer

msbuild fails creating COM wrapper for "Windows Script Host Object Model"

The situation I just reinstalled windows 10 and my dev tools, while keeping my data I am using VS2015 update 3. I have a solution with several projects. The solution is under version control (git) and I am the only one in my team experiencing this…
ChrisM
  • 1,148
  • 8
  • 22
4
votes
1 answer

tlbinf32.dll in a 64bits .Net application

It seems there is no 64 bits version of tlbinf32.dll, this (old) COM DLL is used to extract informations of COM components. (see this SO answer ) I need to access it from a 64 bits C# application. I did not manage to host it into a separate…
Malick
  • 6,252
  • 2
  • 46
  • 59
4
votes
1 answer

SHCreateStreamOnFileEx on files larger than 2**32 bytes

I'm getting an IStream for a file using SHCreateStreamOnFileEx, but its Read() method appears to misbehave on extremely large files when the new position of the seek pointer is 2 ** 32 bytes or further into the file. ISequentialStream::Read's…
wjt
  • 970
  • 7
  • 16
4
votes
2 answers

Pointer to COM object when application does not return it

I am using a third-party application, and making a call to create an instance of my COM object. This call is succeeding, however the function on the third-party application does not return a pointer to the created object (I have no idea why). Is…
GuyBehindtheGuy
  • 1,368
  • 2
  • 17
  • 36
4
votes
2 answers

Is DI possible without a managed heap?

With dependency injection, a class' dependency is instantiated by the caller and passed in, often as a constructor argument. This works well in languages with a managed heap, since there is no need to worry about the end of the dependency's…
John Wu
  • 50,556
  • 8
  • 44
  • 80
4
votes
1 answer

How to debug a COM C++ Out of Process Server ? (client: Excel vba)

I don't know how to debug a COM ATL C++ out of process exe server with Visual Studio 2015. For a COM ATL DLL there is no problem, the breakpoints are automatically triggered when I call the COM dll. However when I try to debug an EXE server, the…
Malick
  • 6,252
  • 2
  • 46
  • 59
4
votes
1 answer

How to deal with COM (un)initialization from a library perspective?

From reading several answers on this site, I learned that CoInitialize(Ex) should be called by the creator of a thread. Then, any code running in that thread can use COM. If that code happens to call CoInitialize(Ex) by itself, that would be…
Thijs van Dien
  • 6,516
  • 1
  • 29
  • 48
4
votes
1 answer

Using PHP's COM object with Office 2010 (Excel.Application)

I recently coded a script in PHP using the COM object to strip data out of cells in an Excel 2007 spreadsheet into an array. This was all done locally on an XP system with Office 2007. Once I'd enabled the Apache server to interact with the desktop…
Storsey
  • 301
  • 1
  • 3
  • 14
4
votes
2 answers

Trying to render web browser control using IViewObject::Draw() into HDC fails with IE8 but succeeds with IE11

I have an MFC dialog window where I added a WebBrowser control (that encapsulates the Internet Explorer engine.) The goal of the following code is to render the contents of the said web browser control into a device context that I can later use for…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
4
votes
1 answer

Cross-process singleton object

This is a variation on another Q of mine. I have two applications, X and Y. They have to share a single COM object between them. X will be sending data to this object and Y will respond on events sent from this application. At any moment, X or Y…
Wim ten Brink
  • 25,901
  • 20
  • 83
  • 149