I have some VB6 code that can't be modified easily that looks like this:
Dim cCount as Long
Dim rCount as Long
Dim result()
Set mx = CreateObject("Component.Class")
Dim rtn = mx.GetList(rCount,cCount,result)
The method it calls is currently a VB6 component that we've migrated to .NET with one issue. We're not sure what type the resul...
As far as I know, there're 3 ways to do this:
The first way is using COM Interop to create a Excel file, then iterate over all cells to read and write data. The created file appears to be valid (true .XLS file), but it seems that Excel must installed to use this way
The second way is writing a file header (CSS style), and then iterate ...
C/C++ would be good option to write some of the performance critical aspects of a Ruby Application. I know this is possible.
I would like to know how to add C/C++ code into Ruby code; any other language for that matter.
Are there any practical applications of this which you noticed in open source projects or else?
...
I have an interface, written in C#, defined as this :
public interface IWidget
{
object Evaluate();
event EventHandler Invalidated;
}
When I try to implement this interface in F#, I look at what F# thinks the IWidget interface is (by hovering my mouse over it), and I see
type IWidget =
interface
member Evaluate :...
Hello,
I want to read the contents of Excel file from local disk using Silverlight and want to pass the data to WCF service. The service will then select the data from the worksheet and put it into database.
I want to know which data type shall i use to pass the Excel object to WCF Service?
Thanks in advance.
...
I searched these SO results and couldn't find anything related to my question. I doubt this could be a duplicate.
I'm currently writing a Microsoft.Office.Interop.Excel PIA wrapper in .NET C# 3.5 and was wondering about what is best to use while calling methods like opening a given workbook.
System.Type.Missing or Missing.Value?
I hav...
Hi,
I am a C/C++ programmer, but I was asked to update a program that was written in C# to communicate with a device. My knowledge of C# is very basic.
The previous version was totally written in C#, but now the API that in fact access the device was changed to C. I found out that I can import the C function APIs by using:
[DllImport(...
I'm trying to run an executable directly from a byte[] representation of this executable as a resource in C#.
So basically i want to run a byte[] of an PE directly without touching the harddisk.
The code I'm using for this used to work but it doesn't anymore.
The code creates a process with a frozen main thread, changes the whole proc...
I am playing around with the interop between C# and IronRuby. I have noticed that if I define a property in Ruby using attr_accessor, it is presented to C# as a property. If, on the other hand, I create the exact same code manually, it comes back as a method.
For example, take this code:
var engine = IronRuby.Ruby.CreateEngine();
str...
I'm trying to inject some Scala code into my existing Java app. (So, being said, I want some more fun).
I create a singleton stuff in Scala
ScalaPower.scala
package org.fun
class ScalaPower
object ScalaPower{
def showMyPower(time:Int) = {
(0 to time-1).mkString(", ")
}
}
Now, inside OldJava.java
...
Hi All, I have a C# project that I have created in Visual Studio Express 2010. This program uses a 3rd party C# class that relies on/calls a C++ dll. I just copied the filename.dll into the bin/debug and bin/release folders of the project folder, and the application ran fine.
I am under the assumption that I can copy the release execut...
After reading this paragraph in GPL FAQ I feel confused. That paragraph says that a proprietary program can use a GPL-licensed program via aggregation - as a separate program.
Now consider an out-proc COM server. It is a separate program that is used by another program via a well-known interface. Looks pretty much like aggregation.
Can...
I have a Range object and I want to use it to extract information from the page where the Range reside in. The information is in the headers and the footers inside a table, I want to read the text from the table.
I tried: word.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Shapes.Range(ref pageNumber).TextFrame.TextRange...
I am in the process of learning Scala and today I felt confident to introduce it to one of our projects.
The application does a lot of JPA / Hibernate stuff and I started implementing one of the Java interfaces in Scala. All went well, until I tried to translate some unittest-code to Scala.
I make a lot of use of Easymock, the code is ...
I have a super high-performance C/C++ data structure (see here!) that I'd like to access and use in my C# program.
Imagine the C/C++ data structure has a public API (get, add, delete, etc). How can I call these methods lots of times within C# in a high-performance way?
P.S. Before you criticize my use of the phrase "C/C++"... In my vie...
Hi !
I have application which can export slides to PowerPoint. I'm using Microsoft.Office.Interop.PowerPoint.dll . This is the 11th version of assembly. I have ran application today and it seems that application throws an exception (Exception from HRESULT: 0x80070057 (E_INVALIDARG)). It only throws this exception when there is powerpoin...
How do you run another .exe from VB.NET but as another User?
I expect to launch a .exe like "Left Click -> Run As -> Enter User/Pass -> Click OK"
If I do that, my application runs as expected (I need to run it as another user to get access to some folders in the network)
But if I use this in VB.NET
System.Diagnostics.Process.Start(Syst...
I've been browsing the web for over 48 hours reading up on interoperability and playing around with Pinvoke and C++/Cli (very limited the latter). There is an unmanaged c++ api (a namespace containing a lot of exported structs which contain methods, all pure virtual and implemented across several cpp files as classes and what not) and I ...
Hello All,
We have a situation where we use a set of third-party unmanaged C++ libraries in our C# (WPF) application, but we also use a subset of their include libraries to build our own unmanaged libraries to use in our application.
These libraries produce metadata, which is stored in a database. However, we must replicate some const...
Hi,
Since GWT is cross-compiled to javascript, only a few JRE packages are emulated. What if I need to make complex computations with packages not supported by the GWT x-compiling?
Is there a way to create a separate java app that can be invoked from the client side GWT (which would of course need to be shipped with the client). I don'...