Click here to Skip to main content
15,916,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to call default text editor Pin
Mohamad Al Husseiny16-Aug-05 14:46
Mohamad Al Husseiny16-Aug-05 14:46 
AnswerRe: How to call default text editor Pin
therealmccoy16-Aug-05 19:16
therealmccoy16-Aug-05 19:16 
GeneralButton control and images Pin
Liunardu16-Aug-05 9:39
Liunardu16-Aug-05 9:39 
GeneralRe: Button control and images Pin
Mohamad Al Husseiny16-Aug-05 9:55
Mohamad Al Husseiny16-Aug-05 9:55 
GeneralSum of each column in a datagrid Pin
Srinivas Jonnalagadda16-Aug-05 8:21
Srinivas Jonnalagadda16-Aug-05 8:21 
GeneralTeam programming Pin
Genbox16-Aug-05 7:36
Genbox16-Aug-05 7:36 
GeneralRe: Team programming Pin
Colin Angus Mackay16-Aug-05 11:37
Colin Angus Mackay16-Aug-05 11:37 
GeneralRe: Team programming Pin
Anonymous16-Aug-05 20:16
Anonymous16-Aug-05 20:16 
We Are under education in Denmark and have an aggreement with MS Academic.
We can download every Microsoft product with valid license as long we are under education.

We just want to taste team programming, so that we are prepared when we finish the education.

And yes, it confirmed my guesses. thanks for the help.

I have another problem now:
Error 2 'Arp.CollectList()': not all code paths return a value

This is the code:

using System;<br />
using System.Runtime.InteropServices;<br />
using System.Net;<br />
<br />
/// <summary><br />
/// ARP scanner version 0.1<br />
/// </summary><br />
public class Arp<br />
{<br />
    [DllImport("iphlpapi.dll", ExactSpelling = true)]<br />
    public static extern int SendARP(<br />
        int DestIP,<br />
        int SrcIP,<br />
        [Out] byte[] pMacAddr,<br />
        ref int PhyAddrLen);<br />
    public string CollectList()<br />
    {<br />
        for (int i = 20; i < 70; i++)<br />
        {<br />
            String sStatus;<br />
            String IPString = "192.168.0." + i;<br />
            string[] _splitString = IPString.Split(new char[] { '.' });<br />
<br />
            int _retVal = 0;<br />
            _retVal += (int)(int.Parse(_splitString[3]) * Math.Pow(256, 0));<br />
            _retVal += (int)(int.Parse(_splitString[2]) * Math.Pow(256, 1));<br />
            _retVal += (int)(int.Parse(_splitString[1]) * Math.Pow(256, 2));<br />
            _retVal += (int)(int.Parse(_splitString[0]) * Math.Pow(256, 3));<br />
            _retVal = (int)(((_retVal & 0x000000ff) << 24) +<br />
            ((_retVal & 0x0000ff00) << 8) +<br />
            ((_retVal & 0x00ff0000) >> 8) +<br />
            ((_retVal & 0xff000000) >> 24));<br />
<br />
            byte[] ab = new byte[6];<br />
            int len = ab.Length;<br />
            int r = SendARP((int)_retVal, 0, ab, ref len);<br />
            string sMac = BitConverter.ToString(ab, 0, 6);<br />
<br />
            if (sMac == "00-00-00-00-00-00")<br />
            {<br />
                sStatus = "<font color = red>Offline</font>";<br />
            }<br />
            else<br />
            {<br />
                sStatus = "<font color = green>Online</font>";<br />
            }<br />
<br />
            // Response.Write("<BR>IP addresse: 192.168.0." + i + " " + sStatus);<br />
            // Response.Write("<BR>" + _retVal);<br />
            // Response.Write("<BR>Mac addresse:" + sMac);<br />
        }<br />
    }<br />
}

GeneralRe: Team programming Pin
Genbox16-Aug-05 20:42
Genbox16-Aug-05 20:42 
GeneralDataGrid Sort Pin
Alomgir Miah16-Aug-05 7:33
Alomgir Miah16-Aug-05 7:33 
Generaldisable tab control page Pin
mhmo16-Aug-05 7:19
mhmo16-Aug-05 7:19 
GeneralRe: disable tab control page Pin
Mohamad Al Husseiny16-Aug-05 7:41
Mohamad Al Husseiny16-Aug-05 7:41 
GeneralAxWebBrowser - IHTMLSelectElement problem Pin
Romb16-Aug-05 7:18
Romb16-Aug-05 7:18 
Generallogin authentication Help needed Pin
ashkitt16-Aug-05 7:09
ashkitt16-Aug-05 7:09 
GeneralRe: login authentication Help needed Pin
Mohamad Al Husseiny16-Aug-05 9:46
Mohamad Al Husseiny16-Aug-05 9:46 
GeneralRe: login authentication Help needed Pin
ashkitt16-Aug-05 19:30
ashkitt16-Aug-05 19:30 
Questionplease help! this is urgent> how to retrieve data to my tabpage without using data form wizard? Pin
nidhelp16-Aug-05 6:59
nidhelp16-Aug-05 6:59 
AnswerRe: please help! this is urgent&gt; how to retrieve data to my tabpage without using data form wizard? Pin
Mohamad Al Husseiny16-Aug-05 7:19
Mohamad Al Husseiny16-Aug-05 7:19 
GeneralRe: please help! this is urgent&gt; how to retrieve data to my tabpage without using data form wizard? Pin
nidhelp16-Aug-05 7:41
nidhelp16-Aug-05 7:41 
GeneralRe: please help! this is urgent> how to retrieve data to my tabpage without using data form wizard? Pin
Mohamad Al Husseiny16-Aug-05 9:26
Mohamad Al Husseiny16-Aug-05 9:26 
GeneralRe: please help! this is urgent&gt; how to retrieve data to my tabpage without using data form wizard? Pin
nidhelp16-Aug-05 17:43
nidhelp16-Aug-05 17:43 
GeneralDataSet Pin
samoore16-Aug-05 5:37
samoore16-Aug-05 5:37 
GeneralRe: DataSet Pin
Alomgir Miah16-Aug-05 6:11
Alomgir Miah16-Aug-05 6:11 
GeneralRe: DataSet Pin
Mohamad Al Husseiny16-Aug-05 7:06
Mohamad Al Husseiny16-Aug-05 7:06 
GeneralSerialization Help Pin
comingsoon16-Aug-05 5:21
comingsoon16-Aug-05 5:21 

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.