Click here to Skip to main content
15,911,785 members
Home / Discussions / C#
   

C#

 
AnswerRe: MultiThreading - Synchronization issues Pin
Nader Elshehabi27-Aug-06 11:07
Nader Elshehabi27-Aug-06 11:07 
QuestionEnumerate local pcs , workgroups etc...(PLEASE HELP) Pin
giddy_guitarist25-Aug-06 21:06
giddy_guitarist25-Aug-06 21:06 
AnswerRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
Nader Elshehabi26-Aug-06 3:08
Nader Elshehabi26-Aug-06 3:08 
GeneralRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
giddy_guitarist26-Aug-06 8:11
giddy_guitarist26-Aug-06 8:11 
GeneralRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
giddy_guitarist31-Aug-06 9:00
giddy_guitarist31-Aug-06 9:00 
GeneralRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
Nader Elshehabi31-Aug-06 10:29
Nader Elshehabi31-Aug-06 10:29 
GeneralRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
giddy_guitarist31-Aug-06 19:46
giddy_guitarist31-Aug-06 19:46 
AnswerRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
Nader Elshehabi1-Sep-06 5:05
Nader Elshehabi1-Sep-06 5:05 
Hello

giddy_guitarist wrote:
i got an offer to make booking application

Congratulations!

giddy_guitarist wrote:
just list the full path to all availiable pcs....

All right!! Here is the code:

IPGlobalProperties MyIP = IPGlobalProperties.GetIPGlobalProperties();
string RemoteComputer  = "";
foreach(TcpConnectionInformation Con in MyIP.GetActiveTcpConnections())
{
    try { RemoteComputer = Dns.Resolve(Con.RemoteEndPoint.Address.ToString()).HostName; }
    catch { /*Handle errors here*/}
    if (RemoteComputer.Length == 0)
        continue;
    if (!listBox2.Items.Contains(RemoteComputer))
    {
            listBox2.Items.Add(RemoteComputer);
    }
}


This should enum all tcp connections -including those on your LAN-. To identify those on the lan use there IP address. They shouild be similar, first 3 numbers are usually the same eg.
178.65.32.103
178.65.32.106
178.65.32.201
178.65.32.305


giddy_guitarist wrote:
just list the full path to all availiable pcs....

Simply: @"\\" + RemoteComputer

giddy_guitarist wrote:
using simple API in C#

You are talking about P/Invoke. There are tons of articles about this topic here in CP

RegardsRose | [Rose]

GeneralRe: Enumerate local pcs , workgroups etc...(PLEASE HELP) Pin
giddy_guitarist5-Sep-06 8:19
giddy_guitarist5-Sep-06 8:19 
QuestionSending and Recieving Fax using ASP.Net, C# Pin
TestPager25-Aug-06 19:10
TestPager25-Aug-06 19:10 
QuestionHow to set the visibility of label item in StatusToolStrip control? Pin
rasper25-Aug-06 18:01
rasper25-Aug-06 18:01 
AnswerRe: How to set the visibility of label item in StatusToolStrip control? Pin
Nader Elshehabi26-Aug-06 3:17
Nader Elshehabi26-Aug-06 3:17 
Questionquestion about Timer Tick event Pin
likefood25-Aug-06 12:30
likefood25-Aug-06 12:30 
AnswerRe: question about Timer Tick event Pin
Nader Elshehabi25-Aug-06 14:28
Nader Elshehabi25-Aug-06 14:28 
GeneralRe: question about Timer Tick event Pin
likefood25-Aug-06 14:47
likefood25-Aug-06 14:47 
GeneralRe: question about Timer Tick event Pin
Subby Dev25-Aug-06 14:39
Subby Dev25-Aug-06 14:39 
GeneralRe: question about Timer Tick event [modified] Pin
likefood25-Aug-06 14:48
likefood25-Aug-06 14:48 
AnswerIt is probably hardware specific Pin
Ennis Ray Lynch, Jr.25-Aug-06 17:29
Ennis Ray Lynch, Jr.25-Aug-06 17:29 
GeneralRe: It is probably hardware specific Pin
likefood25-Aug-06 17:47
likefood25-Aug-06 17:47 
AnswerRe: question about Timer Tick event Pin
Robert Rohde25-Aug-06 21:30
Robert Rohde25-Aug-06 21:30 
GeneralRe: question about Timer Tick event Pin
likefood26-Aug-06 13:31
likefood26-Aug-06 13:31 
AnswerRe: question about Timer Tick event Pin
Mike Dimmick26-Aug-06 2:34
Mike Dimmick26-Aug-06 2:34 
GeneralRe: question about Timer Tick event Pin
likefood26-Aug-06 13:47
likefood26-Aug-06 13:47 
GeneralRe: question about Timer Tick event Pin
Mike Dimmick26-Aug-06 14:32
Mike Dimmick26-Aug-06 14:32 
GeneralRe: question about Timer Tick event [modified] Pin
Mike Dimmick27-Aug-06 11:00
Mike Dimmick27-Aug-06 11:00 

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.