interop

Where can i find a .net implementation of atof?

Is there an implementation for the c language's atof function in the .net world? float.Parse does not behave the same. Some behavioral differences. "50 Apple" will return 50. "50 Apple. 1" will return 50. "Apple" will return 0. ...

Windows app accessing xls data via Interop.Excel library issue

I have a .NET C# windows app that I need to read some excel data into. I have started by writing some unit tests .. one of the first just trys to instantiate a Workbook, and it is throwing this error ... System.Runtime.InteropServices.COMException: System.Runtime.InteropService.COMException: Retrieving the COM class factory for compone...

How can I wrap a COM object in a native .NET class?

I'm using an extensive existing COM API (could be Outlook, but it's not) in .NET (C#). I've done this by adding a "COM Reference" in Visual Studio so all the "magic" is done behind the scenes (i.e., I don't have to manually run tlbimp). While the COM API can now be "easily" used from .NET, it is not very .NET friendly. For example, th...

COM object that has been separated from its underlying RCW cannot be used.

I have some COM component which I call from some c# dll. I also have a winforms app that uses that .dll. When I close the app I get this exception: COM object that has been separated from its underlying RCW cannot be used. The stack trace shows this exception comes from a destructor in the .dll. I implemented this destructor ...

java through c sharp.

I would like to use a java applet which is on an html file as .. This java applet contains a textbox, and i want to access it as whenever I click a button in my c# app a certain txt appears there... I have already embedded it with the use of webBrowser.. Any sample code, or suggestion?!.. Note: development under visual studio 2008 an...

Interoperability of Axis2

I have created a simple webservice using the POJO class in eclipse. One of the web had a custom class as a parameter. The issue that I faced was when I created a C++ client using gSoap client. The Webservice was not able to receive the custom class object and it was null. The WSDL used by gSoap was auto-generated by giving ?wsdl to the ...

Svcutil generates duplicate fields for C# proxy class

Hi All, I have 2 simple classes on the web-service side (Java webservice): class A implements Serializable { protected int foo; public getFoo(){..}; public setFoo(){..} } public class B extends A implements Serializable {...} The point is that on client side SvcUtil generates a proxy C# class ProxyB inherited from ProxyA, it's OK...

Problem with "add reference" under Visual C# 2008 Express Edition after switching from XP to Windows 7

Hello everybody, I suddenly have a big problem I didn't have before. In my current project, I want to add a reference to "Microsoft.Office.Interop.OneNote". When I open the .NET tab of the "Add Reference" dialog, the "Microsoft.Office" assemblies aren't available like they used to be; on my machine, the next assembly after "Microsoft....

Data Binding in axis2

I want to create a simple webservice using Axis2 1.5.1. The expectations from the webservice is: 1. interoperability 2. interaction with custom objects Do i require to use any data binding (initially i thought of using ADB) or is deploying WS using POJO sufficient? Do we have enough documentation for the Data binding? Because Axis2 quick...

Running into a .NET COMException with MS Office Interop

I am trying to work with the Windows clipboard and Office Interop in an ASP.NET web application. Everything works well on my local machine running XP (i have created a Windows application first which ran perfectly well on local machine). Then I have executed it on a server running Windows Server 2003 and it worked there as well. Then I...

How are Win32 types represented in C# P/Invoke?

I am trying to call the PrintDlgW Win32 API from C# via P/Invoke. With the help of P/Invoke Interop Assistant 1.0 from Microsoft, I am able to declare necessary data structures and import functions from DLL. But how to use the HDC or HWND in C#? Thanks in advance. ...

What is the difference between AxInterop and Interop?

I've added an .ocx to the toolbox in VS. Two .dll's were created: Interop.NNN.dll, AxInterop.NNN.dll. What is each one? Are they both required? ...

using Windows Script Host

Hello, I am using windows script host for some kind of installer application and I'm creating shortcuts in start menu with it. This problem came up when I switched to x64 environment (win7 ultimate x64+vs2010) I added a reference to Windows Script Host Object Model (from c:\windows\syswow64\wshom.ocx), it generated Interop.IWshRuntimeLi...

How to read an .RTF file using .NET 4.0

I have seen samples using Word 9.0 object library. But I have Office 2010 Beta and .NET 4.0 in VS2010. Any tips on how to go with the new Word Dlls? So I just wanted to get the functionality of RTF to TEXT with .NET3.5 or later. ...

IronRuby: Cannot call method on a COM Object with one or more arguments.

When I try and call any method on a COM Object that takes one or more arguments, I get the following error on the last argument: Could not convert argument 0 for call to Open. (ArgumentError) Everything works fine when calling a method that takes no arguments, or getting/setting a property. Here is the code that gives me the error abo...

Open a Word template from resource with interop word

So, I have this word template as a resource in my application. I want to open it to create new documents, but have no idea how to do this. The following code doesn't work obviously, since the add method requires a filepath (and not the resource byte[] object... object tFalse = false; object missing = System.Reflection.Missing.Value; Wo...

Communicate between c++ applications and web applications

What are the various ways I can achieve communication (like function calls) from a web application to a c++ application? I've developed the c++ application to do image processing and want to display and transmit the result in real time to a web-page displayed on a browser. ...

How to extract bullet information from word document?

Hi, I want to extract information of bullets present in word document. I want something like this : Suppose the text below, is in word document : Steps to Start car : Open door Sit inside Close the door Insert key etc. Then I want my text file like below : Steps to Start car : <BULET> Open door </BULET> <BULET> Sit inside </BUL...

How to specify format for individual cells with Excel.Range.set_Value()

When I write a whole table into an excel worksheet, I know to work with a whole Range at once instead of writing to individual cells. However, is there a way to specify format as I'm populating the array I'm going to export to Excel? Here's what I do now: object MissingValue = System.Reflection.Missing.Value; Excel.Application excel =...

handle parent control events in a C# ActiveX control

Hi, I have written an ActiveX user control in C#. That ActiveX control is hosted inside a legacy application running in IE that is written in Delphi. Everything works, my only problem is that i need to subscripe on events of the control that is hosting me (for example - resize event). currently I am unable to do that, and when I resize...