Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to dispose all resources after closing the application ? Pin
Dave Kreskowiak16-Jul-13 9:28
mveDave Kreskowiak16-Jul-13 9:28 
GeneralRe: How to dispose all resources after closing the application ? Pin
jschell17-Jul-13 8:37
jschell17-Jul-13 8:37 
GeneralRe: How to dispose all resources after closing the application ? Pin
Dave Kreskowiak17-Jul-13 9:27
mveDave Kreskowiak17-Jul-13 9:27 
GeneralRe: How to dispose all resources after closing the application ? Pin
jschell18-Jul-13 9:17
jschell18-Jul-13 9:17 
GeneralRe: How to dispose all resources after closing the application ? Pin
Dave Kreskowiak18-Jul-13 9:35
mveDave Kreskowiak18-Jul-13 9:35 
GeneralRe: How to dispose all resources after closing the application ? Pin
Eddy Vluggen15-Jul-13 0:30
professionalEddy Vluggen15-Jul-13 0:30 
AnswerRe: How to dispose all resources after closing the application ? Pin
jschell15-Jul-13 8:45
jschell15-Jul-13 8:45 
QuestionMessage Transfer from Pc to micro controller Pin
Member 402509113-Jul-13 21:41
Member 402509113-Jul-13 21:41 
Hello Everybody,

i am struck with a project where i have to pass a message from pc to micro controller device (Ethernet to serial converter interfaced to micro controller).
cable which i use is straight pair. Ethernet serial converter has a ip address. using this ip address i need to trasfer the message. port number i am using is 23.

the microcontroller works fine because we have tested it in hyperterminal(os-windows 7) and microcontroller is able to sends & receive the messge and in hyperterminal it sends & recieve succcesfully .



i used the following code (windows application, c# language, .Net Framework 4.0) to implement it. but it is not working. can i get any sugession or sample code where i will know what is the mistake



private void Form_Load(object sender, EventArgs e)
{
try
{
// Check the port value
if (textBoxPort.Text == "")
{
MessageBox.Show("Please enter a Port Number");
return;
}
string portStr = "23";
int port = System.Convert.ToInt32(portStr);
// Create the listening socket...
m_mainSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
IPAddress address = IPAddress.Parse("192.168.0.50");
IPEndPoint ipLocal = new IPEndPoint(address, port);





// Bind to local IP Address...
m_mainSocket.Bind(ipLocal);
// Start listening...
m_mainSocket.Listen(4);
// Create the call back for any client connections...
m_mainSocket.BeginAccept(new AsyncCallback(OnClientConnect), null);

UpdateControls(true);

}
catch (SocketException se)
{
MessageBox.Show(se.Message);
}
}
AnswerRe: Message Transfer from Pc to micro controller Pin
David Knechtges15-Jul-13 3:03
David Knechtges15-Jul-13 3:03 
QuestionGC and memory Pin
Mehdi Gholam13-Jul-13 20:19
Mehdi Gholam13-Jul-13 20:19 
AnswerRe: GC and memory Pin
AlphaDeltaTheta13-Jul-13 21:16
AlphaDeltaTheta13-Jul-13 21:16 
AnswerRe: GC and memory Pin
Dave Kreskowiak14-Jul-13 3:37
mveDave Kreskowiak14-Jul-13 3:37 
GeneralRe: GC and memory Pin
Mehdi Gholam14-Jul-13 21:44
Mehdi Gholam14-Jul-13 21:44 
GeneralRe: GC and memory Pin
BillWoodruff25-Jul-13 1:20
professionalBillWoodruff25-Jul-13 1:20 
GeneralRe: GC and memory Pin
Dave Kreskowiak25-Jul-13 1:23
mveDave Kreskowiak25-Jul-13 1:23 
AnswerRe: GC and memory Pin
Bernhard Hiller14-Jul-13 21:35
Bernhard Hiller14-Jul-13 21:35 
AnswerRe: GC and memory Pin
Thomas Haller15-Jul-13 3:03
Thomas Haller15-Jul-13 3:03 
QuestionGUI and database synchronization Pin
leone13-Jul-13 9:28
leone13-Jul-13 9:28 
AnswerRe: GUI and database synchronization Pin
Eddy Vluggen14-Jul-13 2:53
professionalEddy Vluggen14-Jul-13 2:53 
GeneralRe: GUI and database synchronization Pin
leone14-Jul-13 22:06
leone14-Jul-13 22:06 
GeneralRe: GUI and database synchronization Pin
Eddy Vluggen15-Jul-13 0:30
professionalEddy Vluggen15-Jul-13 0:30 
AnswerRe: GUI and database synchronization Pin
Nicolás Marzoni16-Jul-13 9:44
Nicolás Marzoni16-Jul-13 9:44 
QuestionC# Using random Function Pin
Pintu Saw13-Jul-13 4:39
Pintu Saw13-Jul-13 4:39 
AnswerRe: C# Using random Function Pin
Dave Kreskowiak13-Jul-13 4:53
mveDave Kreskowiak13-Jul-13 4:53 
AnswerRe: C# Using random Function Pin
NotPolitcallyCorrect13-Jul-13 5:15
NotPolitcallyCorrect13-Jul-13 5:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.