COM interop is the layer that allows .NET assemblies to communicate with standard COM objects and libraries.
COM interop is the layer that allows .NET assemblies to communicate with standard COM objects and libraries by exposing it's own objects or wrapping external COM objects.
So I've got an interface (IInterface1) exposed as ComVisible(true), ClassInterfaceType(ClassInterfaceType.None).
I have an object on that Interface, ala:
public interface IInterface1
{
Object1 object {get; set;}
}
Object one is also…
I am working on a legacy VB6 application that calls into a .net assembly using COM Interop. I am getting a "-2146232576 Automation Error". I am having problems troubleshooting the error.
The installer installs the .NET assembly into the GAC. I…
I am developing an asp.net mvc application and I want to utilize brother's SDK (Brother bPAC3 SDK) to create a label (.bmp image) for printout. Here is my code:
string templatePath = Server.MapPath("~/Content/Labels/nameplate1.lbx");
…
Long story short, trying to build a 'Smoke Tester' application. I'd like to be able to dynamically be given "Hey, this COM assembly (guid, progid) should exist" and attempt to create the COM object via ProgId or guid.
I know how to [ComImport]…
My Excel can download data from a data provider via an AddIn.
From the help pages of the provider, I found out (and tested) that it is possible to "Refresh" the data by calling the following command in…
I have a windows service which activates Interop powerpoint Application class.
It works fine using console but when I try to run it as a windows service on my server (Windows Server 2012) it throws COMException when i use app.open method
When I run…
I am currently poking around C# and COM interfaces. COM Documentation in C# is sparse because C# came after COM (perhaps we at SO can fix). I discovered the C# compiler can give informative error messages. One can read the C# syntax version of…
I have a function in a COM dll that returns a string and takes a string.
I tried this interface, while it compiles, when called it doesn't work. Not sure how to define it?
[return: MarshalAs(UnmanagedType.HString, SafeArraySubType =…
I am struggling to produce a Class Library to be consumed by VBA. I have gotten one class in the Project to work, but the second does not seem to be being registered. If I use VBS to test, CreateObject("Libname.Class2") works, but…
I need to use BITS COM https://msdn.microsoft.com/en-us/library/windows/desktop/aa362708(v=vs.85).aspx in our .NET project. I cannot use 3rd party libraries which wrap BITS interface but frankly speaking there is not a big choice anyway. So,…
I want to use the Lotus Notes COM Library to access NSF files from a .NET application.
I am not a Lotus Notes export. How can I differ between the various Lotus objects/items like
Memo, Appointments, Meeting Requests, Contacts, Distribution Lists,…
I have an issue that I'm having trouble debugging. I'm looking for suggestions on how to track this issue down. Here is my interop definition:
[DispId(1610743816)]
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType =…
I created a COM Interop object that includes visual studio windows forms for Microsoft Access to run. In other words, I am able to open my Windows Forms inside Microsoft Access, after registering my dll and then converting it into tlb.
Everything…
I have a system that uses an external COM component. There are two different versions of the COM object that are basically the same (The vendor changed the COM GUID without an interface change.) I use tlbimp.exe to make two interop DLL's that are…
I am trying to implement a COM interface in a C# service. The interface is from MS and documented here: https://msdn.microsoft.com/en-us/library/hh948551.aspx. All appears fine until I add this one method, DownloadContent. After adding that, the…