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:

1756 questions
0
votes
0 answers

Exposing KeyCollection to COM?

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?
Maury Markowitz
  • 8,303
  • 8
  • 36
  • 79
0
votes
1 answer

Using dll of .Net by VB6 app in Windows 8

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…
Thinh
  • 15
  • 3
0
votes
2 answers

Interop Forms Toolkit DLL and "Class does not support Automation or does not support expected interface" error

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…
Jason N. Gaylord
  • 6,820
  • 13
  • 52
  • 92
0
votes
0 answers

Returning the Values from a Dictionary to COM/VBA

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…
Maury Markowitz
  • 8,303
  • 8
  • 36
  • 79
0
votes
1 answer

Determine the formatting of a word from in a Word document

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…
kabir
  • 532
  • 3
  • 9
  • 27
0
votes
2 answers

COM Interop RCW Reference Count for an Excel Range Object

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 =…
PaulG
  • 937
  • 5
  • 9
0
votes
1 answer

Microsoft.Office.Interop.Excel.SpreadsheetGear does not contain a definition for Active cell and no extension method for active cell

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 =…
emma
  • 11
  • 3
0
votes
2 answers

Microsoft Interop OutLook C#- Cannot save attachments of type OLE

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…
appootan
  • 19
  • 1
  • 11
0
votes
2 answers

Send already generated MHTML using CDOSYS through C#?

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

EXCEL.EXE process closes immeditately when using COM Interop

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…
0
votes
2 answers

Why would you need to run regasm and caspol on a .net component more than once?

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…
CJ7
  • 20,640
  • 59
  • 173
  • 305
0
votes
1 answer

Proper way of implementing IParentAndItem COM Interface

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…
atomicode
  • 561
  • 4
  • 10
0
votes
0 answers

Call C++ COM IDispatch interface from a background thread in C#

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…
dgorti
  • 880
  • 1
  • 10
  • 20
0
votes
0 answers

Reusing a COM interface

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…
Frank Kaaijk
  • 283
  • 1
  • 3
  • 11
0
votes
1 answer

How do I overcome MSFT Word blocking UI while loading embedded external image?

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…
Ethan T
  • 143
  • 6
1 2 3
99
100