comvisible

Is it possible to implement a COM interface with a .NET generics class?

I have the following interface which I'm trying to make COM-visible. When I try to generate the type-library it doesn't like the fact that my implementation class derives from a generic-class. Is it possible to use a generic class as a COM implementation class? (I know I could write a non-generic wrapper and export that to COM, but th...

warning MSB3391: <DLL> does not contain any types that can be unregistered for COM Interop.

I've made a simple C# DLL (that's part of a much larger project) using VS2005. I need to use the DLL in Excel via VBA code so I am using COM Interop on the assembly. I am trying to make the build process automatically generate the necessary TLB file so that I don't need to go to the command line and use regasm after every build. My pr...

ComVisible in C++/CLI

Hi, i'm converting C++ to C++/CLI and would like to expose some managed classes as COM objects. In C# it was easy and setting [ComVisible] & inheriting from interface (also ComVisible) did the job. However C++ project build as C++/CLI does not export DllRegisterServer. Here is sample project (started from CLR Console Application proj...

How I can use an app.config file with a comvisible class library?

I'm working on this ComVisible class library that uses a third party component.This component needs some settings to be added to the config file.Since the application that uses my dll is a VB 6 application I don't know where should I put the config file? is there anyway that we can load a config file at runtime? ...

Exposing a .NET class (which has events) to COM.

I want to expose a .NET class to COM. That's fairly easy: I create an interface in where I define the members of that class that should be ComVisible I define the DispId's of those members myself I define that the interface should be ComVisible I assign a Guid to that interface I create a class which implements that interface No big ...

Calling .NET 2.0 assemblies in .NET 1.1

Recently I developed a internal framework in .NET 2.0 version, which is basically classes and helpers. The problem is I have some .NET 1.1 sites and applications and would like to use my framework from them. I know that I can't call .NET 2.0 in .NET 1.1, but I have an idea. If I create another 2.0 project with ComVisible and reference...

Com Visibility in referenced assemblies

If I have the follwing assemblies: MyComVisibleApi: a .Net assembly that is used by a VB app MyReferencedAssembly: a .Net assembly referenced by MyComVisibleApi Does MyReferencedAssembly need to be ComVisible if its functionality is never directly referenced by the VB App? Thanks! ...

AssemblyInfo.cs: Is there any point in specifying a Guid when using ComVisible(false)?

When you create a new C# project in Visual Studio, the generated AssemblyInfo.cs file includes an attribute specifying an assembly GUID. The comment above the attribute states that it is used "if this project is exposed to COM". None of my assemblies contain types which need to be visible to COM, so I have marked my assembly with [assem...

Making .NET assembly COM-visible and working for VB5

I have an assembly which I have managed to make visible to VB6 and it works, but having a problem accomplishing the same thing with VB5. For VB6, I have built the assembly, made it COM-visible, registered it as a COM object etc., and the assembly shows in VB6's References list, and allows me to use it successfully. The Object Browser...

Marshal.ReleaseComObject throws exception

Trying to use a COM visible .NET class via other .NET application and get exception: Message: The object's type must be __ComObject or derived from __ComObject. Parameter name: o Stack Trace: at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o) The class looks as follows: [ComVisible(true)] [Inte...

Debug com visible dll managed code

Hi, I have written a COM visible dll, which will be called from a native Win32 program. For debugging purposes I added a simple WinForms client to the solution containing the dll. Now when I set a breakpoint in the dll, that breakpoint is hit, but I can't step through the code: the debugger always jumps to the next breakpoint in the dl...

any possibility to call C# function with javascript ?

I wrote an office addin and with which there is a function : openFile(String path) and in the office addin I embed a browser object and with that I can embed a webpage on the office addin, and now I hope I can call the C# function "openFile" and pass in a path in the webpage with javascript, and let office open the designated file for me...