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
  1. Home
  2. General Programming
  3. Visual Basic
  4. netapi32.dll and windows 98 ? (VB.NET)

netapi32.dll and windows 98 ? (VB.NET)

Scheduled Pinned Locked Moved Visual Basic
csharpjsonhelptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vipul Bhatt
    wrote on last edited by
    #1

    windows 9x/NT does not support netapi32.dll. can anyone let me know on how to use netserverenum on these OSs or should i use any other api. Kindly help. Thanks in advance. :zzz:

    I M 2 Replies Last reply
    0
    • V Vipul Bhatt

      windows 9x/NT does not support netapi32.dll. can anyone let me know on how to use netserverenum on these OSs or should i use any other api. Kindly help. Thanks in advance. :zzz:

      I Offline
      I Offline
      ian mariano
      wrote on last edited by
      #2

      NetServerEnum() is supported on NT, from 3.1 and later. Unfortunately, you cannot use it on 9x. NetServerEnum reference[^] -- ian


      http://www.ian-space.com/

      V 1 Reply Last reply
      0
      • I ian mariano

        NetServerEnum() is supported on NT, from 3.1 and later. Unfortunately, you cannot use it on 9x. NetServerEnum reference[^] -- ian


        http://www.ian-space.com/

        V Offline
        V Offline
        Vipul Bhatt
        wrote on last edited by
        #3

        well that's absolutely right. So is there anything that i can do to find the list of SQl servers in the network on these OSs. Thanks.

        I 1 Reply Last reply
        0
        • V Vipul Bhatt

          well that's absolutely right. So is there anything that i can do to find the list of SQl servers in the network on these OSs. Thanks.

          I Offline
          I Offline
          ian mariano
          wrote on last edited by
          #4

          You could try opening up a TCP/IP Socket on the standard SQL Server port (1433) on each machine you find to see if you can connect...or try to open a named pipe to the machine ("\\.\pipe\sql\query" or "\\.\pipe\MSSQL$instancename\sql\query")...if they succeed, it's probably an SQL server ;o)


          "The greatest danger to humanity is humanity without an open mind."
          - Ian Mariano
          http://www.ian-space.com/

          1 Reply Last reply
          0
          • V Vipul Bhatt

            windows 9x/NT does not support netapi32.dll. can anyone let me know on how to use netserverenum on these OSs or should i use any other api. Kindly help. Thanks in advance. :zzz:

            M Offline
            M Offline
            mikasa
            wrote on last edited by
            #5

            Yes, there is a way to Enumerate Servers on Win9x. However, I can't get the Code I have to work just right in VB.NET. If someone out there can help on this it would be great!!! The only thing it does is it keeps recusing the Top-Level Network Node (i.e. "Microsoft Windows Network" for me). Here's what I have so far: :~ 'Declarations 'API Declarations Private Declare Auto Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Integer, ByVal dwBytes As Integer) As Integer Private Declare Auto Function GlobalFree Lib "kernel32" (ByVal hMem As Integer) As Integer 'API Declarations for Win9x Private Declare Ansi Function WNetOpenEnum Lib "mpr.dll" Alias "WNetOpenEnumA" (ByVal dwScope As Integer, ByVal dwType As Integer, ByVal dwUsage As Integer, ByRef lpNetResource As IntPtr, ByRef lphEnum As Integer) As Integer Private Declare Ansi Function WNetEnumResource Lib "mpr.dll" Alias "WNetEnumResourceA" (ByVal hEnum As Integer, ByRef lpcCount As Integer, ByVal lpBuffer As Integer, ByRef lpBufferSize As Integer) As Integer Private Declare Ansi Function WNetCloseEnum Lib "mpr.dll" (ByVal hEnum As Integer) As Integer 'Structures _ Private Structure NETRESOURCE Dim Scope As Integer Dim Type As Integer Dim DisplayType As Integer Dim Usage As Integer Dim LocalName As IntPtr Dim RemoteName As IntPtr Dim Comment As IntPtr Dim Provider As IntPtr End Structure 'Constants for WNetEnum Private Enum ResourceScopes resConnected = &H1 'All currently connected resources (the dwUsage parameter is ignored) resGlobalNet = &H2 'All resources on the network. resRemembered = &H3 'All remembered (persistent) connections (dwUsage is ignored) resRecent = &H4 resContext = &H5 End Enum Private Enum ResourceTypes resAny = &H0 'All resources (this value cannot be combined with RESOURCETYPE_DISK or RESOURCETYPE_PRINT). resDisk = &H1 'All disk resources. resPrinter = &H2 'All print resources. resReserved = &H8 resUnknown = &HFFFF End Enum Private Enum ResourceUseages 'Ignored if the ResourceScope is not 'resGlobalNet' resAll = ((&H1) Or (&H2)) resConnectable = &H1 resContainer = &H2 resNoLocalDevice = &H4 resSibling = &H8 resReserved = &H80000000 End Enum Private Enum ResourceDisplayTypes 'Used to Determine the Resource Type of the NETRESOURCE Struct resGeneric = &H0 resDomain = &H1 resServer = &H2 resShare = &H3 r

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

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