Click here to Skip to main content
15,919,434 members
Home / Discussions / C#
   

C#

 
Questionnamespaces in VS 2005 Pin
Christopher Duncan29-Sep-06 10:26
Christopher Duncan29-Sep-06 10:26 
AnswerRe: namespaces in VS 2005 Pin
Jim Conigliaro29-Sep-06 10:39
Jim Conigliaro29-Sep-06 10:39 
GeneralRe: namespaces in VS 2005 Pin
Christopher Duncan30-Sep-06 1:30
Christopher Duncan30-Sep-06 1:30 
QuestionGrouping in Dataview Pin
Mr.Sam29-Sep-06 9:59
Mr.Sam29-Sep-06 9:59 
AnswerRe: Grouping in Dataview Pin
umseker29-Sep-06 11:54
umseker29-Sep-06 11:54 
QuestionHow do I Create a Type-Ahead Control Using DART PowerWeb Live Controls???? [modified] Pin
ebonaba29-Sep-06 9:47
ebonaba29-Sep-06 9:47 
AnswerRe: How do I Create a Type-Ahead Control Using DART PowerWeb Live Controls???? Pin
LongRange.Shooter3-Oct-06 8:27
LongRange.Shooter3-Oct-06 8:27 
QuestionCreateIPForwardEntry() returning ERROR_INVALID_PARAMETER... please help!! Pin
b_girl29-Sep-06 9:30
b_girl29-Sep-06 9:30 
Hello, I am currently needing to use CreateIPForwardEntry() to add an entry into the routing table. I have created a PMIB_IPFORWARDROW structure and I know that I've assigned something incorrectly but am not sure what it is. Can someone please take a look at this to see if you notice anything incorrect? I have a feeling it might be dwForwardMask - which I want to be 255.255.0.0

Thanks..

<br />
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]<br />
    public struct PMIB_IPFORWARDROW<br />
    {<br />
        public UInt32 dwForwardDest;         <br />
        public UInt32 dwForwardMask;        <br />
        public UInt32 dwForwardPolicy;      <br />
        public UInt32 dwForwardNextHop;     <br />
        public UInt32 dwForwardIfIndex;     <br />
        public UInt32 dwForwardType;        <br />
        public UInt32 dwForwardProto;       <br />
        public UInt32 dwForwardAge;         <br />
        public UInt32 dwForwardNextHopAS;<br />
        public UInt32 dwForwardMetric1;     <br />
        public UInt32 dwForwardMetric2;     <br />
        public UInt32 dwForwardMetric3;<br />
        public UInt32 dwForwardMetric4;<br />
        public UInt32 dwForwardMetric5;<br />
    }<br />
...<br />
                UInt32 uintO1, uintO2, uintO3, uintO4, dwForwardDest, dwForwardNextHop;<br />
<br />
                uintO1 = Convert.ToUInt32("10");<br />
                uintO2 = Convert.ToUInt32("30");<br />
                uintO3 = Convert.ToUInt32("0");<br />
                uintO4 = Convert.ToUInt32("0");<br />
                dwForwardDest = (uintO1 << 24) + (uintO2 << 16) + (uintO3 << 8) + uintO4;<br />
<br />
                uintO3 = Convert.ToUInt32("79");<br />
                uintO4 = Convert.ToUInt32("5");<br />
                dwForwardNextHop = (uintO1 << 24) + (uintO2 << 16) + (uintO3 << 8) + uintO4;<br />
<br />
                PMIB_IPFORWARDROW pmibip = new PMIB_IPFORWARDROW();<br />
                pmibip.dwForwardDest = dwForwardDest;<br />
                unchecked<br />
                {<br />
                    pmibip.dwForwardMask = (UInt32)((255 << 24) + (255 << 16) + (0 << 8) + 0);<br />
                    //pmibip.dwForwardMask = 24;<br />
                    //pmibip.dwForwardMask = (uint)0x00255255;<br />
                }<br />
                pmibip.dwForwardPolicy = Convert.ToUInt32("0");<br />
                pmibip.dwForwardIfIndex = dwForwardNextHop;     //index of adaptor when doing route print displays as being same as gateway<br />
                pmibip.dwForwardNextHop = dwForwardNextHop;<br />
                pmibip.dwForwardType = 4;<br />
                pmibip.dwForwardProto = PROTO_IP_NETMGMT;<br />
                pmibip.dwForwardAge = 43200;    //12 hours<br />
                pmibip.dwForwardNextHopAS = 0;<br />
                pmibip.dwForwardMetric1 = 1;<br />
<br />
                int routeAddResult = IPHelper.CreateIpForwardEntry(ref pmibip);<br />
<br />
                if (routeAddResult != (int)NO_ERROR)<br />
                {<br />
                    if (routeAddResult == (int)ERROR_INVALID_PARAMETER)<br />
                        Console.WriteLine("An input parameter is invalid, no action was taken.");<br />
                    else if (routeAddResult == (int)ERROR_NOT_SUPPORTED)<br />
                        Console.WriteLine("The IPv4 transport is not configured on the local computer.");<br />
                    else<br />
                        Console.WriteLine("Error occcurred while creating new entry in routing table");<br />
                }<br />

QuestionHow to recursively search directories Pin
iamnew2C#29-Sep-06 9:24
iamnew2C#29-Sep-06 9:24 
AnswerRe: How to recursively search directories Pin
led mike29-Sep-06 9:30
led mike29-Sep-06 9:30 
AnswerRe: How to recursively search directories Pin
mejojo29-Sep-06 11:26
mejojo29-Sep-06 11:26 
GeneralRe: How to recursively search directories Pin
iamnew2C#2-Oct-06 10:52
iamnew2C#2-Oct-06 10:52 
QuestionSelf Updating Application Pin
wasife29-Sep-06 9:05
wasife29-Sep-06 9:05 
QuestionRemove an attribute from a property at runtime Pin
Ista29-Sep-06 8:36
Ista29-Sep-06 8:36 
QuestionHelp with DES encryption & decryption Pin
Sreerag Gopinath29-Sep-06 8:16
Sreerag Gopinath29-Sep-06 8:16 
AnswerRe: Help with DES encryption & decryption Pin
geo_m29-Sep-06 21:54
geo_m29-Sep-06 21:54 
Questionquestion regarding BufferedStream Pin
Green Fuze29-Sep-06 8:10
Green Fuze29-Sep-06 8:10 
QuestionIs it possible to store an encrypted files other than .txt in sql server using AES encryption(C#). Pin
TechnoDev29-Sep-06 7:15
TechnoDev29-Sep-06 7:15 
QuestionP2P messaging and file sharing over HTTP Pin
asamay29-Sep-06 6:44
asamay29-Sep-06 6:44 
Questionget Path from running instance of word ? Pin
sundar15629-Sep-06 6:38
sundar15629-Sep-06 6:38 
AnswerRe: get Path from running instance of word ? Pin
umseker29-Sep-06 7:58
umseker29-Sep-06 7:58 
GeneralRe: get Path from running instance of word ? Pin
sundar15629-Sep-06 10:42
sundar15629-Sep-06 10:42 
QuestionDrawing Connectors C# 2.0 Pin
robert11029-Sep-06 6:07
robert11029-Sep-06 6:07 
AnswerRe: Drawing Connectors C# 2.0 Pin
umseker29-Sep-06 8:36
umseker29-Sep-06 8:36 
QuestionIs it possible to store an encrypted txt file in sql server using AES encryption. Pin
TechnoDev29-Sep-06 4:52
TechnoDev29-Sep-06 4:52 

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.