Windows API

This is a discussion on Windows API within the Windows Programming forums, part of the Platform Specific Boards category; Ok, I'll do my best to explain the problem as concisely as possible. I have an application which I wrote, ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Windows API

    Ok, I'll do my best to explain the problem as concisely as possible. I have an application which I wrote, that when certain circumstances are set, it goes through all the ports on the local machine, and binds them to my application socket. The problem is when I run across an application that is bound to a port using the SO_EXCLUSIVEADDRUSE socket option.

    The option is specifically to prevent other applications from multiplexing with the port in question. Barring being able to multiplex with the port, I need to find some other way to terminate that applications connection to the port (or at the very least terminate the application). (I know multiplexing does not terminate the other applications connection with the port, but once multiplexing is initiated there are ways to do it).

    What I thought is that I could find the application handle associated with the application using the port, and then follow it to the parent handle, and terminate the application there. (One problem with this is when a port that is bound with the socket option SO_EXCLUSIVEADDRUSE and it is closed improperly then the port is not always free to use immediatedly, and sometimes requires a reboot to free.) There are some dangers associated with this approach, I know, but if I am careful and make proper allowances it should work.

    Anyway, the problem here is that while I am very proficient with C/C++ and sockets, my OS specific code (aside from socket modifications) is weak at best. What I am asking for is any advice/pointers/links/etc... that you good people may have from your experience dealing with the windows API. Also, just for the record, I am not writing any "hacks" or malicious code of any kind. I keep getting accused of that when asking questions about this online, so I wanted to get that cleared up at the get go. Anyway, thanks for reading this, and I hope to hear from you all soon

    Krellor

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,607
    >> so I wanted to get that cleared up at the get go
    Then tell us exactly why you want to do this.

    gg

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    3
    http://caheinfo.wsu.edu/

    that is where I work. I am a CS student with an emphasis on Penetration testing and network security, and am desinging an application that will be distributed through our domain controllers to monitor and help decrease the spread of worms on our netowork.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    3
    or is that not specific enough for you...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. win32 api MDI windows
    By TheNewOne in forum Windows Programming
    Replies: 5
    Last Post: 03-20-2009, 09:11 PM
  2. Use windows API functions in a GTK+ program?
    By Jake.c in forum Windows Programming
    Replies: 19
    Last Post: 01-23-2009, 05:40 AM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09:00 AM
  4. Windows messenger API
    By GanglyLamb in forum Windows Programming
    Replies: 0
    Last Post: 07-10-2005, 02:52 AM
  5. Future of Windows API programming ?
    By Dev in forum Windows Programming
    Replies: 7
    Last Post: 04-22-2003, 11:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21