interop

Writing a DLL in C/C++ for .Net interoperability

In my C# application, I would like to write a part of the code in C. I plan to write a DLL witch would be interoperable with .Net. How can I do that? ...

How do I use a C++ class in a C# application without regard to platform?

I have a native/unmanaged C++ library with a number of classes that I would like to use from C#. Most of the solutions I've read (like this one and this one) suggest that I should create a C++/CLI wrapper, and use the wrapper in my C# project. Most of these suggestions, however, ignore platform. As far as I am aware, if the unmanaged DLL...

How to cast System.Object[*] to System.Object[]

When I Tried to return a Array in VFP9 languaje COM/DLL to my .net c# project I received a System.Object[*] array and I can not cast to System.Object[] (Without asterisk). ...

Calling a dynamic function into an object error

I know the title sounds a bit strange, but this has been boggling my mind for a little bit. So Intel offers this TurboBoost sidebar gadget with calls using JavaScript, and I want to write a program from scratch in C# that does the same thing. The calls stem from what I believe is an ActiveX DLL which I easily imported. The problem is, wh...

How to use C# usercontrol in VC++ 6.0?

Hi, I have a legacy application written using VC++ MFC. For a latest feature, I have created a C# user control. I want to be able to use this control in the legacy VC application. How can I do it? ...

Excel activity is viewable

Hi! I'm using the following code to generate an Excel file using Microsoft.Interop.Excel. The problem is that I can actually see the workbook generation, when the code is executed, an excel document is open on the screen and the doc starts filling out with data. Can this be done somehow in the background? Thanks Microsoft.Office.Inter...

CSV export with interop

Hi! I'm using this code to generate an Excel file. It should be simple to change the export to CSV file, just by modifying a parameter in the saveAs call, but it doesn't work. Any ideea why ? Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); xlApp.Visible = false; ...

C# + COM, modify array in parameter

I have a COM object in C# and a Silverlight application(escalated privileges) which is a client to this COM object. COM object: [ComVisible(true)] public interface IProxy { void Test(int[] integers); } [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] public class Proxy : IProxy { [ComVisible(true)] public void ...

Interop Word - Delete Page from Document

Hi, What is the easiest and most efficient way to delete a specific page from a Document object using the Word Interop Libraries? I have noticed there is a Pages property that extends/implements IEnumerable. Can one simply remove the elements in the array and the pages will be removed from the Document? I have also seen the Ranges and...

Recompiling / Running Dynamic Shared Objects (DSO) on Windows

Hi, I don't have much in the way of Unix/Linux experience but are wondering if it is possible in any way to run DSOs on Windows? Can these be recompiled so they will execute? Thanks in advance for any pointers you can give me. Dave. ...

Is it possible to share code between a Silverlight web app and Windows Phone 7 app

I have a simple Silverlight app that I want to run on Windows Phone 7 almost exactly as is. I've created a new Windows Phone 7 project and when I reference the Silverlight app I get a warning that says "Adding a reference to a Silverlight project might not work properly. Do you want to continue?". If I continue and try to run anyway, th...

Is there any difference between Interop.AZROLESLib and Microsoft.Interop.Security.AzRoles?

Microsoft provide the Microsoft.Interop.Security.AzRoles interop library in Server 2003 for AzMan (Authorization Manager). It was built under .NET 1.0. Can anyone tell me if there's a difference between this and creating a reference to the "azroles 1.0 Types Library" (C:\Windows\system32\azroles.dll) which ends up as Interop.AZROLESLib...

I am in quest of a less trivial example of java / clojure interop.

Does anybody want to answer my question linked here how-to-pass-a-typed-collection-from-clojure-to-java , by providing a clear example, for the rest of us who are trying to sneak clojure in their existing java stack? ...

How to ensure interoperability with DataContractSerializer when talking to non-.NET app?

Say I have a non-.NET app which needs to write data to be deserialized by a .NET app via DataContractSerializer. Where's the specification describing the exact format necessary? Such a spec should describe a lot of stuff, including: Does the order of sibling elements matter? Should the xml namespace URIs always begin with http://schem...

Passing array of strings from JS to C# inside WebBrowser control

I'm using ObjectForScripting property to interact with web page inside WebBrowser control and everything works fine except I can't figure out how to pass array of strings back to C# HTML code <input type="submit" onclick="window.external.save(Array('test', 'test2'))" /> Form // Returns System.__ComObject public void Save(object para...

Calling COM wrapped c# dll from unmanaged c++: how to pass a 'string' and retrieve an updated value

I use COM interop to call functions in a c# dll from my VC6 MFC DLL, and this works fine. I want to call a function to retrieve string values. How do I declare a 'string' in my unmanaged C++? How should the 'string' appear in the c# code? Currently the c# function in the dll takes ref string arguments, and my c# test app works fine, but ...

Need C Sharp win32, PInvoke API

Hi All, Long time listener, first time caller. Does anyone know of a good interop library for the Win32API? I found pinvok.net which is OK. (FWIW I got the addin to work with MSVS 2010 by following the instructions here: http://www.red-gate.com/supportcenter/GeneralContent.aspx?c=knowledgebase\PInvoke\KB200711000198.htm and using 10.0...

adding a new component and what is Interop.dll file?

Hi.I add a component to my project and now in ..\bin\Debug folder this file is added:Interop.t1.dll. i want to make setup file for my project ,because of Interop file that is created in ..\bin\Debug ,i don't need be worry about registering the component(t1), is it true?if i should do more task for making setup ,please guide me.thanks a...

How to delete a Task (Row) with Interop.MSProject

Hi, I'm trying to use Interop.MSProject with C# to do something that conceptually, should be the simiplest thing in the world to do. However, I am having some trouble with it's cryptic api which has minimal documentation. All I wish to do is to find a row that contains a specific string in one of it's columns (cell) and remove that ro...

VB.NET web service client accessing Java web service - connection aborted

I had a problem getting a VB.NET web service client to receive the response object from a Java web service. In the process of posting this question someone from another department volunteered some code written for a similar situation. I couldn't find this anywhere on the net so I'm completing my question to help others out. Dim myServ...