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
T

thematt

@thematt
About
Posts
17
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I want to create an ethernet frame
    T thematt

    I would like to send plain text data to a user specified ethernet address. I know how to send data to a specified hostname or ip address, but I must use the mac address for the app I am working on. Is there a .net object that ca do this or someone can point me to an example using dll import? Matt is a network administrator for an insurance company in the midwest.

    .NET (Core and Framework) tutorial csharp sysadmin question

  • Retrieve the Name of a Disk Drive
    T thematt

    WMI is available only as an add on to Win98 so this is not a good solution for you. I figured the platform would be a problem with this answer but thought I would post anyway. Matt is a network administrator for an insurance company in the midwest. He is shamelessly looking for Windows programming side work.

    C# csharp com hardware json help

  • Retrieve the Name of a Disk Drive
    T thematt

    Mark Sanders wrote: 1. Open Windows Explorer. 2. Right click on the reader (labeled "Removable Disk (F)") 3. Select Properties. 4. Select the Hardware tab from the Removable Disk Properties. 5. Under the hardware tab there will be a list of "All disk drives:". In this list the specific name of the reader is listed as "eUSB Secure Digital USB Device." I can get the same type of information using WMI about my IDE drives. I hope it works for the USB device: private void button1_Click_1(object sender, System.EventArgs e) { String scope = "\\root\\cimv2"; ManagementScope ms = new ManagementScope(scope); ObjectQuery oq = new ObjectQuery("Select * from win32_diskdrive"); ManagementObjectSearcher mos = new ManagementObjectSearcher(ms, oq); ManagementObjectCollection moc = mos.Get(); foreach(ManagementObject mo in moc) { txtOutput.AppendText(mo["caption"].ToString() + "\r\n"); } } Of course you must have WMI on the system. Matt is a network administrator for an insurance company in the midwest. He is shamelessly looking for Windows programming side work.

    C# csharp com hardware json help

  • WMI and C#
    T thematt

    I am assuming you are using WMI to get the network status. The problem you may be that certain adapters do not have an actual instance when you check the status. For example the WAN Miniport (PPTP) will not have a status all the time (if it does at all). WHen you loop through your ManagementCollection you will get a NullReferenceException - Bo Hunter wrote: object ref not set to an instance object ref not set to an instance. To get around this you should catch the error, or narrow your WQL. If there is a certain adapter you are checking for let me know. I will post some code. I hope this is along the lines of what you are after. Matt is a network administrator for an insurance company in the midwest. He is shamelessly looking for Windows programming side work.

    C# question csharp sysadmin

  • Eliza
    T thematt

    Desktop Bob told me to start fires. Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    The Lounge csharp c++

  • Anyone know about SYN flood attacks
    T thematt

    The SYN attacks probably have spoofed source ip addresses. You should be blocking these (private addresses) if you are not already. Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    The Lounge com windows-admin tutorial question

  • Get system information
    T thematt

    Try this out: private void btnComPorts_Click(object sender, System.EventArgs e) { txtOutput.Clear(); string server = @"\\" + txtServer.Text; ManagementScope ms = new ManagementScope(server + @"\root\cimv2"); ObjectQuery oq = new ObjectQuery("select deviceID from win32_SerialPort"); ManagementObjectSearcher mos = new ManagementObjectSearcher(ms, oq); ManagementObjectCollection moc = mos.Get(); foreach(ManagementObject mo in moc) { txtOutput.AppendText(mo["DeviceID"].ToString()); txtOutput.AppendText("\r\n"); } } Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    C# com tutorial

  • Guinea pigs needed for CodeProject
    T thematt

    SIgn me up. Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    The Lounge

  • CodeProject
    T thematt

    Thanks a million Daniel. Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    IT & Infrastructure sysadmin tutorial question

  • CodeProject
    T thematt

    I saw a project in the last few months that downloads the latest posting on CodeProject. I cannot fing it. Does anyone have a link? Also how to I subscribe to have new postings emailed to me on a forum? Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    IT & Infrastructure sysadmin tutorial question

  • SNMP Provider for WMI
    T thematt

    Thank you for the links, but I have been to them. I have visited a lot of sites and the best I can get are vb scripts. I think I know in general what I need to do, but I really need a couple of specific examples. Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side work.

    C# question sysadmin tutorial

  • Reboot a Server with C#
    T thematt

    Here is an example: string server = @"\\" + txtServer.Text; ManagementScope ms = new ManagementScope(server + @"\root\cimv2"); ObjectQuery oq = new ObjectQuery("select * from win32_OperatingSystem"); ManagementObjectSearcher mos = new ManagementObjectSearcher(ms, oq); ManagementObjectCollection moc = mos.Get(); foreach(ManagementObject mo in moc) { string[] ss = {""}; mo.InvokeMethod("Reboot", ss); MessageBox.Show("The reboot command has been sent."); } The only difference between local and remote reboots is the ManagementScope and the optional ConnectionOptions. Matt is a network administrator for an auditing company in the midwest. He is shamelessly looking for Windows programming side jobs.

    C# csharp tutorial sysadmin help question

  • SNMP Provider for WMI
    T thematt

    How do I connect to a remote SNMP device using the WMI SNMP provider using System.Management objects? Can someone provide an example for me? Matt is a network administrator for an auditing company in the midwest.

    C# question sysadmin tutorial

  • COM+ Windows API
    T thematt

    Thank you again. The MSDN link is just what I am looking for! Matt is a network administrator for an auditing company in the midwest.

    C# learning csharp com sysadmin json

  • Binding Collection to Datagrid
    T thematt

    Thanks for the tip.:) Matt is a network administrator for an auditing company in the midwest.

    C# wpf wcf sysadmin question

  • COM+ Windows API
    T thematt

    I wanted a "folder browser" control for my application. I found several examples based on the BrowseForFolder class out there and I am able to to use them in my app. The problem I have is that I do not know how to create something like this. I understand the concept but that is about it. I am interested in COM+/Windows API programming with C#. Can someone recommend a good book or article that explains these subjects to a COM+/Windows API beginner? I feel like a turtle flipped on its back when I run into this topic. Matt is a network administrator for an auditing company in the midwest.

    C# learning csharp com sysadmin json

  • Binding Collection to Datagrid
    T thematt

    :)I have an arraylist (arrList) that has contains objects (obj). I would like to bind arrList to a datagrid with each column of the datagrid shows a member of the obj. Anyone know a 'good' way to do this aside from iterating through arrList and creating a dataset to bind to the datagrid? Matt is a network administrator for an auditing company in the midwest.

    C# wpf wcf sysadmin 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