CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: TCP/IP Ping

  1. #1
    Join Date
    May 1999
    Posts
    2

    TCP/IP Ping

    Programmatic Ping requires Administrative Privileges:

    We implemented a programmatic ping utility inside an in-process COM server to allow client applications to see if a particular Windows station exists at a given IP Address. We used a Microsoft WinSocket sample called "ping" that showed how to use the SOCK_RAW socket type with ICMP protocol. All software is for WindowsNT 4.0 using Winsock 2.

    It works great except for the fact that we recently discovered that the SOCK_RAW socket type requires administrative privileges in the users account in order to function. This is documented in Microsoft's Winsock documentation describing raw sockets.

    We notice, however, that even without administrative privileges we can use the "ping" command from the Command Prompt in WindowsNT and it works properly. So there must be a way to ping a device even without administrative privileges.

    Can anyone recommend an approach that will work regardless of the user account privileges?

    thanks
    Lee

    Lee Reid

  2. #2
    Join Date
    Jun 1999
    Posts
    2

    Re: TCP/IP Ping

    Create the following registry variable (or ask for it to be set):

    HKLM\System\CurrentControlSet\Services\Afd\Parameters\DisableRawSecurity DWORD 1

    This will disable security check on raw sockets.

    I have posted the answer for the same question on the VCPP but just in case this question can be refrenced later on.
    HTH
    Ghazi /DUNDAS

    [email protected]
    Dundas Software


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured