Questions tagged [com]
The com tag has no usage guidance.
Distributing library which internally using COM library
I would like to create a dll library that will be loading in runtime. The library'll be using internally COM objects with MTA flag. The library will be created in main thread. So I have question: ...
C++ : What is the order of function pointers inside vtable?
In this answer to "In C++ why and how are virtual functions slower?", the author mentions below point: "Get the right function address from the vtable into a register (the index where the correct ...
Do you need elevated privileges at runtime if application uses COM?
I am not familiar with the various options you have when dealing with COM components. A legacy system in our company has published a COM API with a mixed mode dll to allow .NET components to interact ...
What's a good strategy to go about registering 2-step hotkeys?
User32.dll exposes a RegisterHotKey function, to register, well, hotkeys: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ...
Eliminating thread affinity requirements when converting an STA COM object into an MTA COM object
Suppose I need to convert an STA COM object into an MTA object. Single threaded apartments guarantee not just that only one thread will call the object at a time, but that it's always the same thread ...
COM - with great power comes great responsibility, but at what cost? (looking for advice on coding practices when working with COM)
What is best (or commonly accepted) practice for where to declare COM object variables (scope) and how to handle cleaning them up when using structured error handling? I just spend a whole load of ...
JavaBeans vs. ActiveX: Strategic analysis
JavaBeans and ActiveX both serve the same basic function: to facilitate communication among software components within framework "containers." These containers include Web browsers and other document ...
When to turn off Option Strict? Or how to deal with inheritance of COM using Option Strict?
I'm trying develop an add-in for an application using it's API and I have Option Strict turned on. Trying to work with these COM objects is causing multiple compile issues saying Option Strict On ...
Peculiar architecture interfacing .NET to AutoCAD out-of-process
I have written a set of classes to interact with AutoCAD from an out-of-process .NET assembly, but it seems like my class architecture and interactions are unusual. I am struggling to find a better ...
Better to write your .NET library with COM limitations in mind, or separate your .NET library from Interop?
I came across this interesting article: How I Came to Love COM Interoperability on CodeProject, which got me thinking... The author argues that they do not want any COM-ities in their .NET library ...
Mono: C call into managed with COM Interop
I am trying to design a managed library to implement -what appear to be- unmanaged VST3 plugins. The VST3 plugin interface is a C/C++ interface-based API that is compatible with COM (ref-counting, ...
Is there a way to use RAII techniques in COM?
I am caught between two conceptual models of how to construct objects, and am having trouble working out what standard I want to adopt. I prefer to program in .NET and often try to use RAII and read-...
Best Way to Access Hardware per COM Serial Port over USB Adapter
We are starting a total new Branch at our firm. I am usually developing database interfaces or internal server/client applications/tools for our company, but I never had to do something with hardware. ...
COM INTEROP Support - which is better? C# or VB
I keep hearing that c# is "better" than vb... but as far as I can see, aside from syntactical differences, both compile down to the same IL. I've found some good articles by googling that explain what ...
Create Primary Interop Assemblies or generate them?
I've never seen this question answered definitively: If you are maintaining a COM DLL that can be used by a .NET program, is it best to: Import the COM DLL into each project, which generates an ...
Are COM objects a form of IPC?
In Pro C# 2008 it is stated Using constructs such as AppIDs, stubs, proxies, and the COM runtime environment, programmers can avoid the need to work with raw sockets, RPC calls, and other low-...