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.
I'd like to expose my Dictionary(int, obj) to COM so the VBA people can do for i = 1 to UnitKey.Count. I thought I could simply Public Function UnitKeys() As KeyCollection, but "KeyCollection isn't defined". What is the proper way to expose these?
I place my Vb6 app and all the 'dll' files in the folder like this "D:\TestVb6". Vb6 app will reference to 'dll' of .Net.
I have registered the 'dll' files by using 'Regasm.exe' and the Vb6 app working fine in Windows 7. But when i do that in Window…
I have a .NET WinForms application that I've converted into a COM dll using the Interop Forms Toolkit 2.1. Thet setup project for the application has both my tlb as well as the Microsoft.InteropFormTools.tlb file set to Register as vsdrpCOM. The…
We have a number of Dictionary(Of Integer, whatever) in our object model. We need to allow VBA (Excel specifically) users to loop over the values. In .net you simply return the.Values, can you use that from VBA? I'm never entirely sure what things I…
I am writing an application in C# that uses the Microsoft Office interop DLL to read a Word document. This is working fine.
I'd now like to also determine the formatting applied to the words I'm reading--for example, check if it's bold or italic or…
As far as I'm aware, in COM Interop if we cross the .NET/COM boundary we get an increment in the RCW internal counter.
So I created a VSTO Excel workbook (2013) app and ran the code:
private void RCWWorkbooks()
{
Excel.Workbooks wbs =…
I get this error when I want to change from AxMicrosoft.Office.Interop.Owc11 to Microsoft.Office.Interop.Excel , from AxSpreadsheet currentSpreadSheet = GetTestSheet to SpreadsheetGear IWorkbook =…
I have a C# program saving attachments from unread emails from Outlook mail box to a folder and the below line of code breaks(first line) for attachment types that are of OLE type with the error "Outlook cannot perform this action on this type of…
I have a ready generated MHTML as a byte array (from Aspose.Words) and would like to send it as an email. I'm trying to do this through CDOSYS, though am open to other suggestions. For now though I have the following:
CDO.Message oMsg = new…
I'm using COM Interop to access Excel from a Centura Team Developer program and the EXCEL.EXE process exits immediately after calling Create in my Application. All later calls throw exception because Excel is not open anymore.
What could be the…
Why would you need to run regasm and caspol on a .NET component more than once?
I have a COM client that uses a .NET component residing on another machine. Consequently I need to run regasm and caspol on this .NET component. What could cause there…
I'm implementing an object model based on the IShellItem/IShellItem2 COM interfaces in C# and am currently working on item enumeration. I want to avoid using BindToHandler as it is considered to have a notable impact on performance, this is why i…
So I have a c++ ATL COM component, which calls my C# component that exposes a COM visible interface.The ATL COM component passes an Interface pointer to my C# component so my c# code can call back into the ATL object. the ATL component is used in a…
Let me elaborate, before someone is thundering down on me with "Never reuse a COM interface!!!"
We implemented an COM interface on a program which is discontinued. We now actually buy a similar piece of software from a third party (so I can't…
I am trying to insert an external image into a MSFT Word Document. We do not need the image to appear quickly, but we need MSFT Word to allow the user to continue using Word without blocking the UI while it is loading the external image since some…