|
see system.runtime.serialization[^]
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
modified on Tuesday, March 17, 2009 3:27 PM
|
|
|
|
|
Dhaim, we are implemented ISerializable in our classed and handling serialization ourself. I am looking more optimized code for serializing objects on ourown.
|
|
|
|
|
If you are looking for a faster way and less space, serialize the bytes your self using BitConverter class (static methods). The downside is that you need to hand code all of this unless you build a little SW that will do it for you.
Natza Mitzi
|
|
|
|
|
Hi!
I have build C# DLL with few function and Registered it successfully
and also consuming it through Javascript ActiveXObject.
So far All is good.
Now I want to raise one Event in C# Dll and want that event to be handled by Javascript
Is that possible to catch event in Javascript which is thrown by C# DLL, If yes can you please help me.
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
You mean Ajax?[^]
Have a look at this article[^] and how it gets the data from the server side using the Ajax.Net framework.
hmmm pie
modified on Tuesday, March 17, 2009 12:29 PM
|
|
|
|
|
Thanks for your reply, But no this is not what I mean
I want to raise an Event in C# DLL class and this should be Caught in Javascript Code
<script language="javascript">
var myObj
myObj = new ActiveXObject("myDLL.myClass");
myObj.myPropertyOne="value1";
myObj.processValue();
</script>
Now if I through Event with value 0 Then how can I get the Event in
Javascript.
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
Look, I just gave you an example of how to communicate between the C# and JavaScript. If you can't figure out how to do it then I suggest you do something else!
Loop {
response = checkValue();
if (response != 0)
Do Event
wait(2 seconds).
}
hmmm pie
|
|
|
|
|
Thanks for your efforts, I will try other resources!
Develop2Program & Program2Develop
|
|
|
|
|
how can i send data by using connection of another program?
the programs do not co-operate
|
|
|
|
|
Imagine me catching the connections of your Internet Explorer, when you're doing your banking
I doubt that this is possible.
I are troll
|
|
|
|
|
what program is it? and what exactly do you want to do with the connection?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
this is a game and i want to send and receive packets
|
|
|
|
|
your app is a game? if so then why do you not do the connection within your own app?
Unless of course your just trying to capture packets and manipulate them from some other game, i.e. some sort of hacking ability...
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
i need to create ingame app. for working with incoming and outcoming packets
|
|
|
|
|
i suppose, that i need a system language for this purpose
|
|
|
|
|
Last time I did anything like this I had to create an NDIS driver and capture the traffic at the network card. This is not for the faint of heart and if you mess it up you are likely to pull down the entire operating system.
|
|
|
|
|
What about DLL injection?
|
|
|
|
|
Hi
I have used multithreading for udp client/server communication.When i run the server both the threads are executing at the same time.So i used a Thread.Sleep() after the 1st thread.So the 1st thread works properly.When it comes to the 2nd thread it gives"the existing connection was forcibly closed by the remote host".Can you please give me your suggestion
|
|
|
|
|
is it because thread 2 is being called from in thread 1? it would be better if you could post some example code
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Please give me your suggestion asap
public UdpServer()
{
try
{
startServer = new Thread(new ThreadStart(start_server));
startServer.Start();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Thread.Sleep(20000);
try
{
startServer2 = new Thread(new ThreadStart(start_server2));
startServer2.Start();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
} public static void start_server()
{
IPEndPoint ipep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 10001);
try
{
Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
newsock.Bind(ipep);
Console.WriteLine("Waiting for a client...");
while (true)
{
EndPoint tmpRemote = (EndPoint)ipep;
byte[] data = new byte[1024];
Console.WriteLine("hai");
int recv = newsock.ReceiveFrom(data, 0, data.Length, SocketFlags.None, ref tmpRemote);
Console.WriteLine("Message received from {0}:", tmpRemote.ToString());
Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
data = new byte[1024];
string ss = "Welcome to the Server";
data = Encoding.ASCII.GetBytes(ss);
newsock.SendTo(data, 0, data.Length, SocketFlags.None, tmpRemote);
Console.WriteLine("\nSent Acknowledgement");
}
}
catch (SocketException e)
{
Console.WriteLine(e.Message);
}
}
public static void start_server2()
{
}
|
|
|
|
|
mrithula8 wrote: Please give me your suggestion asap
This is not the way people communicate here. No one gets paid to help anyone, they do it because they wish to.
जय हिंद
|
|
|
|
|
Sorry i didnt read the exception in your OP. That exception says that there is a problem with the host you are connected to. i.e. the server. This means the server is cancelling the connection for one reason or another, it could be your server is limiting connections to just one (your first thread) and thats why the second fails. I cant help much with this kind of thing, but you basically need to look at settings on your server somewhere.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hello,
I try for an exemple witch convert PDF file to text file, in : http://www.codeproject.com/KB/string/pdf2text.aspx[^]
<br />
using System;<br />
using System.IO;<br />
using org.pdfbox.pdmodel;<br />
using org.pdfbox.util;<br />
<br />
namespace Pdf2Text<br />
{<br />
class Program<br />
{<br />
[STAThread]<br />
static void Main(string[] args)<br />
{<br />
PDDocument doc = PDDocument.load(@"C:\Documents and Settings\abbd\Bureau\1.pdf");<br />
PDFTextStripper stripper = new PDFTextStripper();<br />
Console.Write(pdfStripper.getText(doc));<br />
<br />
}<br />
<br />
<br />
<br />
<br />
}<br />
}<br />
I have add : PDFBox-0.7.2.dll and IKVM.GNU.Classpath.dll
But i have this exception on line PDDocument doc = PDDocument.load(@"C:\Documents and Settings\abbd\Bureau\1.pdf"); :
An exception has been thrown by the type initializers for 'java.io.File'.
Help me please to resolve this problem, thank you verry mutch.
|
|
|
|
|
abbd wrote: Help me please to resolve this problem
No. Thank you verry mutch
|
|
|
|
|
I think your problem may be that you do not know that difference between C# and Java. more specifically on the level of how they are spelt differently.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|