i basically want to take int name and string age from user in c# and send it to dll method written in c which take int and char[50] arguments in it and return string .i created following scenario but i am failed ,any body has the code
i have a dll developed in c which ahas a structure
struct Argument
{
int age;
char name[50];
} ;
...
Is there an equivalent for Java AWT that works on .NET?
I usually use IKVM for Java bytecode translation, but IKVM AWT support is fairly limited.
...
So I'm architecting an application that does necessarily C++ work, but MFC/ATL is too messy for my liking, so I had this brilliant idea of doing all the "thinking" code in native C++ and all the pretty UI code in C#. The problem, though, is interoperability between the two of them. Before I get too carried away with this, I was wondering...
Hi,
I have some code in VB6 which imports a function from a dll, it uses the byVal and byRef keywords, I want to convert that code into C# 3.5.
Is there going to be a problem with unicode encoding of the strings?
Do I declare the varibles that are "byRef" in vb6 into "ref" varibles in the C# code?
It seams that return value is entered...
Hi to everyone.
I've got a tiny (I hope) problem again, and I don't know how to obtain access to some presentation properties provided by PowerPoint (however I don't even know how to google it or search it at the site :( ) from C#. Let me explain. We can access a TextRange property both in C# and VBA, via an interop assembly and ms-offi...
I created a vb.net dll called "WSdll.dll".
I compiled it, created a type library (tlb), and registered it globally(gacutil)..
It includes a file called wsutils.vb, which includes a namespace called "wsutils".
In the namespace, there's an interface (with attribute) called "IWSconnection", and a class called "WSconnection".
The interface ...
Whats the best way to return a tabular structure from an ASP.NET (2.0) web service?
It should be inter-operable with Java, Iphone App or any other platform.
EDIT: By inter-operable I mean the other technology/client should be able to consume it or deserialize it to their native types, instead of parsing response XML.
...
Using this as reference, I'm trying to create an asynchronous pluggable protocol that is only temporarily available to my app (and not registered systemwide). I'm using CoInternetGetSession and then calling RegisterNameSpace to do it. However, when I make the call to RegisterNameSpace I get an AccessViolation exception: Attempting to re...
Hello,
I have a DLL written in C, which I must use.
It is ok, but in one place I get an error.
int getHourTime()
{
struct tm *psttm;
time_t timet = //is initialzed correctly
psttm = localtime(&timet);
int nHour = psttm->tm_hour;
return nHour;
}
I am calling it in C# using DLLImport.
When getting to line: "psttm->t...
What tools exist in Java that are equivalent to svcutil.exe for .NET?
...
I'm trying to fill a report with empty datasource like this
JasperPrint print = JasperFillManager.fillReport(@"D:\ImagesReport.jasper", null);
Usually the program crashes without notice, but I used watch window and found that this is what I get
at net.sf.jni4net.jni.JNIEnv.CallStaticObjectMethodPtr(Class clazz, MethodId methodIdNa...
In JAVA you'd say :
JRXhtmlExporter exporter = new JRXhtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
But using jni4Net I cant find setParameter instance method (Note: It's inherited from JRAbstractExporter).
I dont...
I'm having trouble getting a string back from some c code I wrote.
First some generally unrealated background info: I'd like to receive the user readable string for a TAPI TSP from the TAPI API. I've implemented a semi workable TAPI solution relying on matching driver names to stored strings, but would like to change this to work on per...
Hello,
I'm interested in technologies(solutions) that permits Java and .NET interoperate. I have tried the following and it works but I would like to know if there are other solutions:
Sockets
Web Services (Metro)
CORBA (IIOP.NET)
Messaging (QPid)
IKVM
Does anyone know other technologies(solutions) that enable Java and .NET interope...
First part: call F# from F#
Let's say we have the following type defined in F#:
type MyClass =
static member Overload1 (x, y) = "Pim"
static member Overload1 (x : System.Tuple<_, _>) = "Pam"
static member Overload1 x = "Pum"
You are now in another module (in another file).
How can you call each of the three methods shown...
This is code example which causes MarshalDirectiveException. Good explanation of SafeHandles could be found here.
[SuppressUnmanagedCodeSecurity]
private delegate SafeHandle testDelegate();
[SuppressUnmanagedCodeSecurity]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static SafeHandle test(){
FileStre...
Hi there,
im trying to manipulate excel file XLS with C# by using Microsoft.Office.Interop.Excel
the workbook im trying to manipulate has shared protection between users
i have the file pw
and i have the pw of the cells which i want to access and edit.
if i try to do that from excel i do the following
open the file type the pw
go...
First, I want to thank Matt Davis for this post. I know the post was not chosen as the answer to that specific question, but the post was extremely helpful to me. I had a couple small issues to fix (mostly adjusting the filepaths in the code he provided), but I was easily able to create an unmanaged C++ client for a C# WCF service usin...
How do you load program resources such as icons, strings, graphical elements, scripts, and so on in a Clojure program? I am using a project layout similar to that in many Java projects where there is a "resources" directory hanging off of a "source" directory. A jar file is created from the source and includes the resources, but I can't ...
I am using C# and Microsoft.Office.Interop.Word to perform the following
Open a document
Update the contents of the document
Save and close the document
This works fine if the document is opened using this method where FileName is the filename, AddToRecentFiles is false and all else is Missing.Value
Document Open(
[In] ref object F...