CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2001
    Posts
    2

    Winsock.dll Question

    Hi,

    I am doing some socket programming in VB using the 'winsock.dll' library. I have declared my all my API functions and such, but I get a run-time error #48 of "File not found: winsock.dll". I have ensured that there is an uncorrupted version of this file in my system directory (\WINNT\System32\) and that my environment variable 'path' in NT includes this directory. What could possibly be wrong??? I can't see why Visual Basic can't find this file. If anyone else has had this trouble, please let me know how you fixed it.

    ThanX much,
    Campbell


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Winsock.dll Question

    Try registering the dll using regsvr32.exe

    Why don't you do it using the WinScok control that comes with Visual Basic?


  3. #3
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: Winsock.dll Question

    Are you importing the functions from Winsock Library? If so I do remember that some of the functions need ws2_32.dll instead of winsock.dll.

    Anyhow, you should still be able to find the winsock.dll if it is in your ..\SYSTEM32\ directory.

    Maybe you declarations portion is not correctly done?

    -Cool Bizs

    Good Luck,
    -Cool Bizs

  4. #4
    Join Date
    Apr 2000
    Posts
    737

    Re: Winsock.dll Question

    maybe it's some other files. Maybe you can use the Depends utility to check it out, it come with visual studio.


    cksiow
    http://vblib.virtualave.net - share our codes



  5. #5
    Join Date
    Apr 2001
    Posts
    2

    Re: Here was the problem

    I do thank you all very much; I have just made that huge step into the Windows API where I'm realizing that a lot of libraries were created on 16-bit OS's (and in VB4 =). This is no good. I simply used the 'wsock32.dll' instead of 'winsock.dll'. I found a 'wsock32.lib' file, yet no 'winsock.lib'. This was my whole problem. I really had trouble with realizing this -- Microsoft should have had mo' documentation. Hope this helps someone else as well,

    Peace.


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