|
Yes, the messages are queued.
If the program crashes, there is something else that causes that.
---
b { font-weight: normal; }
|
|
|
|
|
How do i get information about all installed .net framework version? And On what framework my application is running?
Say I have application config file saying
<startup>
<supportedRuntime version="v1.0.3705" />
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v2.0.50727" />
</startup>
So It will run on all the platform. Now, I want to check on which version its running and what all versions are installed on the system.
|
|
|
|
|
use
System.Environment.Version
Srini
|
|
|
|
|
it doesn't giv me what all versions are installed
|
|
|
|
|
|
nice article but Can i do it through managed code? that is in c# ..?? even its Okei if i hav to read from registry. Where i can get these info ?
Thanks for help.
|
|
|
|
|
Well, you could always wrap the unmanaged code in a C++/CLI class and use it from C#.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
It does not work because it just reads from sys parameter. It gives me info about where i am currently executing not about what all versions are installeed
|
|
|
|
|
i need a complete example on RowFilter property of DataView Object in C#
|
|
|
|
|
|
how can i use RowFilter property of DataView object in C# to search a specific row?
|
|
|
|
|
Hi all,
I'm relatively new to C# and now i would like to have the best of both worlds, Java and C#. I would like to know how is it possible for a Java program to call a function, for e.g. helloWorld() in a c# program.
Appreciate any simple examples or links to demonstrate the use.
Thanks
|
|
|
|
|
ahjiang wrote: is it possible for a Java program to call a function, for e.g. helloWorld() in a c# program?
No.
Currently Java just support to call C/C++ native function through JNI(Java Native Interface). See this[^].
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
I think you are in the wrong forum. Try to post your question in Java Forum. Because the code what you want is a java code.
|
|
|
|
|
I have a c++ code including a method as
parsefile( FILE * pfile);
I have exported this method in c++ in a dll. But In my c# code I want to use this method.
Thus, I have written the below code in the cs file.
[DllImport("main.dll")]
public extern static void parseFile( File pfiOriginal );
static void Main(string[] args)
{
/**** I don't know how to handle FILE * here because there is no FILE *
in c#. deneme.pqd is my file to be used by parsefile method.The
compiler gives error that File constructor takes no arguments.
*****/
File a = new File("deneme.pqd");
parseFile(a);
Console.WriteLine("Press any key to continue...");
Console.ReadLine();
}
Please can you help me urgently about a method doing this.
|
|
|
|
|
I think the structure FILE and class File is complete different.
If you have a structure called FILE, then copy it to C#.
struct FILE
{
...
}
then try to use this code:
[DllImport("main.dll")]
public extern static void parseFile([MarshalAs(UnmanagedType.Struct)]FILE pfiOriginal );
|
|
|
|
|
I have no structure called FILE. It is a C File I/O. So it is a a FILE pointer such as FILE *fp.
What should I do then????
|
|
|
|
|
Just use the C# function to open file.
FileStream fileStream = new FileStream("myfile.bin", FileMode.Open);
BinaryReader binaryReader = new BinaryReader(fileStream);
int a = binaryReader.ReadInt32();
float b = binaryReader.ReadSingle();
...
binaryReader.Close();
fileStream.Close();
I'm not a fan of DLLImport. It is not so easy. It is easier to write the function again in C#.
|
|
|
|
|
But I have to use Dllimport (((
|
|
|
|
|
Try using IntPtr:
[DllImport("testcpp2.dll"]
private static extern void parseFile(IntPtr pFile);
using(FileStream fStream = new FileStream("test.bin", FileMode.Open))
{
parseFile(fStream.Handle);
}
and if it still not working, try to write a extra function for bridging between parseFile(FILE* file) and parseFile(string filename).
Something like this:
void parseFileWithFilename(string filename)
{
}
Then in C# you can give only the filename in string. It is easier.
|
|
|
|
|
by Luking @ the funtion name, i concluded that you are trying to parse the file. for that you can write your own funtion in C# right? Lot of samples are there in google.
|
|
|
|
|
dear friends,
please send me code to create a program which can display dynamic IP's of all the running client.
regards.
Pawan Mishra
MCA, MCP.NET, MCAD.NET
|
|
|
|
|
Is this the same question as in your thread in the .NET Framework board?
---
b { font-weight: normal; }
|
|
|
|
|
How do I create a DataSet from an XSD file. I’ve read about some “Generate DataSet” option in Visual Studio but I cant find it.
Does it exist external tools for this too?
_____________________________
...and justice for all
APe
|
|
|
|
|
See if this helps..
http://hacks.oreilly.com/pub/h/5157
http://aspnet.4guysfromrolla.com/articles/020806-1.aspx
|
|
|
|