Questions tagged [com]
The com tag has no usage guidance.
16
questions
3
votes
1
answer
211
views
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:
...
7
votes
2
answers
3k
views
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 ...
1
vote
2
answers
156
views
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 ...
3
votes
1
answer
191
views
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 ...
3
votes
1
answer
350
views
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 ...
3
votes
2
answers
127
views
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 ...
1
vote
0
answers
73
views
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 ...
2
votes
2
answers
844
views
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 ...
5
votes
1
answer
219
views
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 ...
9
votes
3
answers
2k
views
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 ...
1
vote
0
answers
407
views
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, ...
5
votes
1
answer
359
views
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-...
0
votes
3
answers
4k
views
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.
...
5
votes
2
answers
1k
views
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 ...
6
votes
2
answers
2k
views
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 ...
0
votes
1
answer
352
views
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-...