Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
B

b_girl

@b_girl
About
Posts
102
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CreateIPForwardEntry() returning ERROR_INVALID_PARAMETER... please help!!
    B b_girl

    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.. [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PMIB_IPFORWARDROW { public UInt32 dwForwardDest; public UInt32 dwForwardMask; public UInt32 dwForwardPolicy; public UInt32 dwForwardNextHop; public UInt32 dwForwardIfIndex; public UInt32 dwForwardType; public UInt32 dwForwardProto; public UInt32 dwForwardAge; public UInt32 dwForwardNextHopAS; public UInt32 dwForwardMetric1; public UInt32 dwForwardMetric2; public UInt32 dwForwardMetric3; public UInt32 dwForwardMetric4; public UInt32 dwForwardMetric5; } ... UInt32 uintO1, uintO2, uintO3, uintO4, dwForwardDest, dwForwardNextHop; uintO1 = Convert.ToUInt32("10"); uintO2 = Convert.ToUInt32("30"); uintO3 = Convert.ToUInt32("0"); uintO4 = Convert.ToUInt32("0"); dwForwardDest = (uintO1 << 24) + (uintO2 << 16) + (uintO3 << 8) + uintO4; uintO3 = Convert.ToUInt32("79"); uintO4 = Convert.ToUInt32("5"); dwForwardNextHop = (uintO1 << 24) + (uintO2 << 16) + (uintO3 << 8) + uintO4; PMIB_IPFORWARDROW pmibip = new PMIB_IPFORWARDROW(); pmibip.dwForwardDest = dwForwardDest; unchecked { pmibip.dwForwardMask = (UInt32)((255 << 24) + (255 << 16) + (0 << 8) + 0); //pmibip.dwForwardMask = 24; //pmibip.dwForwardMask = (uint)0x00255255; } pmibip.dwForwardPolicy = Convert.ToUInt32("0"); pmibip.dwForwardIfIndex = dwForwardNextHop; //index of adaptor when doing route print displays as being same as gateway pmibip.dwForwardNextHop = dwForwardNextHop; pmibip.dwForwardType = 4; pmibip.dwForwardProto = PROTO_IP_NETMGMT; pmibip.dwForwardAge = 43200; //12 hours

    C# database help question

  • format of MIB_IPFORWARDROW structure?
    B b_girl

    Thanks... I'll keep that in mind :)

    C# sysadmin help question

  • format of MIB_IPFORWARDROW structure?
    B b_girl

    OOOhhhhh that makes sense! Thanks a ton. Should I be using uint instead of uint32? Not 100% sure what the difference is, will look it up a little later...

    C# sysadmin help question

  • format of MIB_IPFORWARDROW structure?
    B b_girl

    I apologize, but I don't really understand what you're instructing me to do, what does (10 << 24) + ... mean? Does anyone maybe have a bit of example code I could use as a guideline? I've found minimal assistance online so far..

    C# sysadmin help question

  • format of MIB_IPFORWARDROW structure?
    B b_girl

    I did see that earlier but it doesn't show the format I need to put the IP addresses in so that they are accepted. For example dwForwardDest = 10.11.0.0 would obviously not be correct.

    C# sysadmin help question

  • format of MIB_IPFORWARDROW structure?
    B b_girl

    Hey, I'm making use of Iphlpapi.dll, particularily CreateIpForwardEntry(ref PMIB_IPFORWARDROW pRoute) I'm a little unclear as to what format I need to be using for the MIB_IPFORWARDROW structure This is my declaration (?) of the structure: [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct PMIB_IPFORWARDROW { public UInt32 dwForwardDest; public UInt32 dwForwardMask; public UInt32 dwForwardPolicy; public UInt32 dwForwardNextHop; public UInt32 dwForwardIfIndex; public UInt32 dwForwardType; public UInt32 dwForwardProto; public UInt32 dwForwardAge; public UInt32 dwForwardNextHopAS; public UInt32 dwForwardMetric1; public UInt32 dwForwardMetric2; public UInt32 dwForwardMetric3; public UInt32 dwForwardMetric4; public UInt32 dwForwardMetric5; } The ones I'm most confused about are dwForwardDest, dwForwardMask and dwForwardNextHop. If I had a destination network of 10.11.0.0, mask 255.255.0.0 and the 'next hop' would be say... 10.11.7.3. The corresponding 'route add' command that I normally run from the command line is: route add 10.11.0.0 mask 255.255.0.0 10.11.7.3 I get the feeling that I need to convert each octet to hex, but what do I do from there? Any help would be greatly appreciated...

    C# sysadmin help question

  • Problems using RegistryKey.OpenRemoteBaseKey()
    B b_girl

    I am authenticating with the server and the account I'm authenticating with has permission to read/edit the registry. I'm doing the authentication when I connect - I'm using the Ras API to establish a VPN connection to the server. Do I have to authenticate again after the connection is established?

    C# sysadmin windows-admin security help question

  • Problems using RegistryKey.OpenRemoteBaseKey()
    B b_girl

    Hey, I keep getting the UnauthorisedAccessException from the following code - the user account I'm using to connect to the server in question does have permission to read/edit the registry. I have also modified the my routing table so I can access the server resources by name. If anyone could help me out I'd greatly appreciate it. using System; using System.Security; using System.Security.Permissions; using Microsoft.Win32; [assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, Read = @"HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx")] [assembly: SecurityPermissionAttribute(SecurityAction.RequestMinimum, UnmanagedCode = true)] String KEY = "SOFTWARE\\Network Associates\\TVD\\Shared Components\\VirusScan Engine\\4.0.xx"; try { RegistryHive hKey = RegistryHive.LocalMachine; RegistryKey DATKey = RegistryKey.OpenRemoteBaseKey(hKey, _ServerName).OpenSubKey(KEY); } ... It seems to get past the RegistryHive.LocalMachine part, but throws the exception when it gets to the open remote base key call. I tried separating the OpenRemoteBaseKey() and OpenSubKey() calls into 2 separate lines, to see if it was maybe OpenSubKey() that was throwing it, but the same exception was thrown on the OpenRemoteBaseKey() call. Thanks.

    C# sysadmin windows-admin security help question

  • Back To The Future
    B b_girl

    oooo giving another animal a chance at global domination... Good idea... Never thought of that one... I like it! What kind of animal do you think it would be? If humans weren't in the picture that is.

    The Lounge csharp wpf com question

  • Back To The Future
    B b_girl

    First of all, who's to say that the planet would end up having humans on it? Even if the planet itself (and all it's atmospheric gases) was exactly the same as Earth was - it doesn't mean that evolution would occur in the exact same manner... But anyway, that aside... If it had to be a piece of our modern technology - I'd send them my phone (Sony Ericsson K750i) because it's cool and they can take pictures of one another with it so that the humans around 10,000 years after them can save themselves the trouble of trying to figure out what their primitive ancestors looked like and such. But, if it were for a bit of fun - I'd send them a roll of duct tape and possibly some bubble wrap. I'm sure they'd find a good use for the tape (I always do, it always seems to come in handy!) and the bubble wrap can give them hours of entertanment... Come on... admit it... we ALL love popping bubble wrap every now and again! :)

    The Lounge csharp wpf com question

  • VS2005 ROTD (Rant of the day!)
    B b_girl

    that would be great - would love to see that. hehehe. :)

    The Lounge visual-studio question

  • Assistance with converting application to library
    B b_girl

    Just thought I'd let you all know that I managed to get the library working successfully. Thank you for all your help :-D

    C# csharp dotnet visual-studio com help

  • Assistance with converting application to library
    B b_girl

    Thank you both for your help - I'm going to give this a try tomorrow :) Now that I know a dll doesn't have to be registered, it should all be ok!

    C# csharp dotnet visual-studio com help

  • Assistance with converting application to library
    B b_girl

    Hello, I've found an article on here that describes how to mask keyed in characters for inputting passwords: ConsolePasswordInput[^] At the bottom of this article it states that it's an application (obviously) but it can be easily converted into a library. I'd love to convert it into a library but I have no idea how to do this. I'm relatively new to C#. I'm currently running MS Visual Studio 2005 with .Net Framework 2.0 I was thinking I could start a new Class Library project and just paste in the required code, but I believe that will create a .dll file. I believe that once my application makes use of this library it will have to register itself, and I was trying to avoid having my application register anything. If anyone is able to help or even just point me in the right direction, I would greatly appreciate it. Please let me know if you need anymore information!

    C# csharp dotnet visual-studio com help

  • HELP! Errors while attempting to import a DLL
    B b_girl

    Ahhh yes! That has gotten rid of that error... many thanks! Now just to figure the rest out... Thanks so much. :-D

    Visual Basic help csharp dotnet visual-studio

  • HELP! Errors while attempting to import a DLL
    B b_girl

    Hey, I'm new to VB.NET (and have no experience programming in VB) - I tried to post earlier but for some reason it didn't work, and the second attempt is never as good as the first! I'm using Visual Studio 2005 with .NET Framework 2.0. Anyway, in my project I have a need to call rasapi32.dll, from what I understand I need to use an unmanaged code block in order to make use of this DLL. This is what I have so far: Imports System.Runtime.InteropServices Public Class TestRASDial <DllImport("rasapi32.dll", CharSet:=CharSet.Auto)> _ Public Function RasDial(ByVal LPRASDIALEXTENSIONS, _ ByVal LPCTSTR, _ ByVal LPRASDIALPARAMS, _ ByVal DWORD, _ ByVal LPVOID, ByVal LPHRASCONN) As Long End Function End Class Now, I realize this doesn't actually do anything just yet, but I need to get the basics working first. So, the above bit of code gives me the following error: "System.Runtime.InteropServices.DllImportAttribute' cannot be applied to instance method." The word "RasDial" is underlined so I'm assuming that's the problem, however, I don't know how else to do this. I've tried searching online but can't seem to find much on the topic for some reason. I would really appreciate it if any of you are able to help me out and point out what I've done wrong! You'd be a lifesaver... Thanks a million...

    Visual Basic help csharp dotnet visual-studio

  • Need Help on dialup programming
    B b_girl

    I was wondering if you ever heard back from anyone about this? I'm looking to do a similar thing in VB.NET and can't find any help online at all. I've never coded in VB.NET before so I'm a little confused as to the format everything is meant to be in... If you know how to do it now and are able to help me that would be great! If you don't know how to do it yet, let me know, then if I find anything else out, I can share it with you. Thanks

    Visual Basic csharp json help tutorial

  • Use of rasdial in VB.NET??
    B b_girl

    Thanks Richard - I've emailed you :)

    Visual Basic tutorial csharp sysadmin help

  • Use of rasdial in VB.NET??
    B b_girl

    Hey... I have experience programming in quite a few other languages, but recently my work has asked me to write something for them in VB.NET - this will be my first VB application. I need a bit of guidance... I have a series of vpn connections configured in my network connections. My application needs to be able to connect to each of these in turn, with a given username & password. I believe what I want to use is RasDial(), but I'm not completely sure how to use it. I have found information on the msdn site with regards to the parameters it takes, but have not been able to find anything with regards to it's actual use. I have searched a series of forums and have only managed to find a bunch of people who say I should be using RasDial but nobody ever gives an example I can follow. If anyone could help me out, I would greatly appreciate it! :rose:

    Visual Basic tutorial csharp sysadmin help

  • a CArray of structures containing other CArrays?
    B b_girl

    i seem to have fixed it now. i'm not sure if it's the correct solution, but it seems to work. all i did was move the INV constructor, copy constructor and operator= implementation into CMainFrame. if that's not the right way to fix this problem, someone please let me know!

    C / C++ / MFC data-structures help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups