|
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.
|
|
|
|
|
Hi all,
I'm using the WebBrowser control. When I'd like to page down if I write something like;
webBrowser1.Document.Window.ScrollTo(0, y) ; // it is ok no problem
and also I can get easily ScrollBar lenght like;
scrolHeight= webBrowser.Document.Body.ScrollRectangle.Height // it is ok.
But I'm using the AxWebBrowser object which helps me much more than Default webBrowser control in C#.
So How can I do those.
Thanks.
|
|
|
|
|
Member 4651729 wrote: I'm using the WebBrowser control
Member 4651729 wrote: But I'm using the AxWebBrowser object
So which is it?
|
|
|
|
|
I'm sorry about that.
I'd like to learn how can I do these using AxWebBrower.
1-) webBrowser1.Document.Window.ScrollTo(0, y);
2-) scrolHeight= webBrowser.Document.Body.ScrollRectangle.Height;
Thanks.
|
|
|
|
|
Member 4651729 wrote: I'd like to learn how can I do these using AxWebBrower.
Well I can tell you the way I learned was to read the documentation[^]
|
|
|
|
|
how i can get system information like : computer name,processor and language in c#
|
|
|
|
|
Take a look at the System.Environment class
I are troll
|
|
|
|