Questions tagged [com-interop]

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.

Resources:

1845 questions
0
votes
1 answer

How do I access a complex object's properties via COM Interop?

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…
John
  • 921
  • 1
  • 9
  • 24
0
votes
0 answers

COM Interop (vb6 --> .NET) on Windows Server 2012 R2 Automation Error

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…
0
votes
1 answer

How to use Brother bPac3 SDK in asp.net mvc

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"); …
0
votes
1 answer

Is it possible to create a COM object programatically . NET?

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]…
John
  • 921
  • 1
  • 9
  • 24
0
votes
1 answer

Call Method of Excel COM Addin from C#

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…
stratar
  • 119
  • 7
0
votes
1 answer

Using inropservices.powerpoint in windows service

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…
0
votes
1 answer

How to declare Classic COM Interface IBindCtx in C#?

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…
S Meaden
  • 8,050
  • 3
  • 34
  • 65
0
votes
0 answers

C# to COM define interface

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 =…
Ivan
  • 7,448
  • 14
  • 69
  • 134
0
votes
1 answer

Why would some classes in an assembly be exposed to to COM but not others?

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…
mbza
  • 25
  • 4
0
votes
1 answer

Need a better way to create COM interop

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,…
Alex
  • 655
  • 1
  • 8
  • 16
0
votes
1 answer

Differ between memos, appointments, tasks,... with C# and Lotus Notes

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,…
Elmex
  • 3,331
  • 7
  • 40
  • 64
0
votes
0 answers

Debugging calling COM interop in C#

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 =…
Dweeberly
  • 4,668
  • 2
  • 22
  • 41
0
votes
1 answer

C# Windows Form Com Interop Object in Access - tab or enter button not working

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…
0014
  • 893
  • 4
  • 13
  • 40
0
votes
1 answer

MSBuild Build same DLL with two different projects

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…
John Dyer
  • 2,316
  • 1
  • 21
  • 27
0
votes
0 answers

C# Trying to implement COM Interface

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…
1 2 3
99
100