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...
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...
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...
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?
...
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...
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...
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...
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...
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...
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...
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...
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...
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.
...
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...
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 ...
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...
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...
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?
...
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?
...