interop

Spell Check window using MSWord interop opening in back of my application in Vista

I'm using MSWord interop to check grammar/spell in my application. I'm using these steps to do this: 1) Create a new Single Thread Apartment to not lock my application's form 2) Disable the input of my application 3) Using reflection (to be MSOffice version independent), I'm using this code to open Word: objWord = System.Activator.Cre...

Microsoft Office Interop Assembly references.

I have an application developed in Visual Studio 2005 which I am deploying using ClickOnce. My solution contains two projects - a user interface layer coded in VB, and a class library coded in C#. My C# class library has some code that uses the Outlook and Excel Interop Assemblies (Microsoft.Office.Interop.Outlook and Microsoft.Office.I...

ClickOnce Deployment problem with Microsoft.Vbe.Interop.dll

We recently had a ClickOnce deployment problem (minor disaster) with an application that requires Office Interop. After installing the update, some users received a dialog box informing them that the application couldn't run. Clicking the details button brought up a log file that included the error message “Value does not fall within the...

Unable to return struct from C++ back to C#

I have a C# program that is calling into a native C++ dll. The C# has a the following struct: [StructLayout(LayoutKind.Sequential)] public struct Phenomenon { [MarshalAs(UnmanagedType.U1)] public char Type; [MarshalAs(UnmanagedType.R8)] public double Jd; [MarshalAs(UnmanagedType.R8)] public double Loc_jd; [MarshalAs(Un...

Is it possible to build a .NET assembly callable from a native assembly writing in C# alone without using COM?

Is it possible to build a .NET assembly callable from a native assembly writing in C# alone without using COM? ...

VB 6 COM+ <-> .NET Enterprise Services, 'Multiple-Step operation generated errors.'

I have a legacy VB 6 client app, which uses a VB ActiveX control, which then communicates via DCOM to a VB component registered in the COM+ Catalog. The VB COM+ component communicates with a .NET component, also registered in the COM+ Catalog. I have an issue when our COM+ application Activation is set to Server, which is required to m...

How do I pass a struct from an unmanaged C++ program to a C# program?

This is my second post. Here is what I am trying to do: Call an unmanaged c++ program from c#, passing in a array of structs from the c# program and return a updated version of the array of structs from the c++ program. Here is the calling c# program: using System; using System.Runtime.InteropServices; namespace TestCallingC { c...

Use Excel for calculations in web app

Hi I've inherited a large Excel spreadsheet that does some financial calculation magic using any number of simulation tables, and have been asked to write a web application as a front end. Now I could spend endless hours trying to figure out the sheet, or I could call the excel sheet from my web app. I seem to need the Office Primary In...

Create IDispatch .NET COM class where content is available only at runtime.

I'm currently in the process of moving some code from native C++ to managed C++ (pure). The code involves interacting with Windows Active Scripting. Currently our native code provides a class called 'ObjectDispatch' which implements 'IDispatch' (using ATL). This class implementation queries our own native class 'Object' at runtime to det...

How to check whether Primary Interop Assemblies are installed or not?

Hi, I am "using" Microsoft.Office.Interop.Excel in my C# code. I want to use the code related to Microsoft.Office.Interop.Excel only if PIA for Excel is installed on that machine. But, I get exception when I call that function (which uses Excel Interoperability) Why am I getting exception even if that code actually isnt getting calle...

VB6 application won't shutdown when .net form open. Instead it displays message "Cannot Quit".

I have a VB6 application that uses several components written in .net. The application must shutdown gracefully when windows is shut down. The problem is that if the .net part of the code is displaying a window, the application displays the message "Cannot Quit" and fails to exit. (It is then terminated by the OS) I've managed to reprod...

How to pass a C# Reference to COM Object to a C++ DLL

I am writing a Visual Studio add-in to process C++ code, and think that COM interop is slowing me down to much. I therefore want to pass a C# reference to a COM object to a small C++ DLL, have the DLL perform the necessary calculations and return back a string. I would be passing a CodeFunction2 object to the DLL and getting an XML str...

How to get my .net dll to be referenced in vba/com?

hi guys, i have a .net dll which is written in c sharp, which uses linq to read data and return it to another calling vba app. i didn't plan for this so the initial project was written for it to be accessible by another .net app. so now i just found out that there's a lot of stuff about .net com interoperability and what not. so i've le...

How to use tlbimp.exe's /keycontainer switch?

Anybody have an example of how to use tlbimp.exe's /keycontainer command line switch? The googles...they don't help. It's always /publickey, or /keyfile. No example of using /keycontainer. ...

Is it possible to expose a C# Enum to COM Interop callers, and if so, how?

I have a managed assembly that gets called via COM Interop. Like a VBScript client, a Perl client, and so on. The classes are decorated with [ClassInterface(ClassInterfaceType.AutoDual)] [GuidAttribute("ebc25cf6-9120-4283-b972-0e5520d0000E")] [ComVisible(true)] Then of course I do the regasm thing, and all the methods work just fi...

Catch F11 pressed when the flash app is not in focus

hi i have a website which has a video playing. what i want is when my browser going into a full screen mode i want to only show my video. when i press F11 by click on the address bar / click on the browser window and press F11 my browser goes into the full screenmode.But i dont understand that F11 is played. Is there a event from my ...

Java and C++ Cryptography interoperability

I have a message coming from an external company which has been encrypted with our public key using Java. Specifically the java code performing the encryption is - //get instance of cipher using BouncyCastle cryptography provider Cipher cipher = Cipher.getInstance( "RSA/ECB/PKCS1Padding", "BC"); //initialize the cipher with th...

Overloads in COM interop (CCW) - IDispatch names include suffix (_2, _3, etc)

I have a managed assembly containing a few classes, and those classes have overloaded methods. I expose the assembly to COM/IDispatch callers via [ComVisible(true)] ..and also setting the proper Guid, on the assembly itself. I do not define an explicit interface for the COM interop. It's all done dynamically. I run regasm.exe /codeb...

COM Interop Using Generic Types

It appears you can not use generic types directly with COM: see Interoperating Using Generic Types on MSDN. Can anyone give an example of how this could be achieved? ...

How would I pass a C# delegate function to a Managed C++ .Dll?

I have this delegate in C#. public delegate string ACSharpDelegate(string message); How would I go about creating a Managed C++ .dll that will accept this delegate as a parameter so the C++ .dll can call it? ...