Need help using winsock and Borland C++

Need help using winsock and Borland C++

Post by rkeh.. » Wed, 10 Sep 1997 04:00:00

I've been trying to use the winsock.dll used by Windows 95 in a simple
application that I'm writing, but I've never used a dll before and
needed some help.

So far here is my source code:

#include <stdio.h>
#include "winsock.h"
#include <windows.h>

void main ()
WORD wVersionRequested;
int err, clean;

wVersionRequested = 0x101;

err = WSAStartup(wVersionRequested, wsaData);

if ( err != 0 ) printf("Error Returned");
else printf("No Error Found");

clean = WSACleanup();



I've properly installed the winsock.dll and I'm using the header file
included with Borland v4.5 (winsock.h).  In the header file the
function is declared, but I know I need to link to the DLL somehow.
So far I've tried making a DEF and LIB file from the winsock.dll and
linking it with my OBJ file, but I still get the same error (undefined
function) when linking.  I've also tried including these files in a
project, but nothing works.  I guess I need to know how to import
functions from a DLL or more specificly how do I do that considering
my situation with the winsock.dll.  I would appreciate any help,

Jeff Kehres


1. Need help using ImageKnife control with Borland C/C++ OWL

I've been trying for several weeks now to use the function imkOptimizePal
in the ImageKnife control.  Has anybody had any luck using this part of
the Borland Visual Solutions Pack?  I've talked with Borland 'til I'm blue
in the face, and NOBODY THERE HAS BEEN ABLE TO HELP!  I've tried 4 times, and
each time I get the same answer, "I've never used that control, I'll find
someone who has and call you back."  Yeah, right.

If there is any kind soul out there who has successfully used this feature of
this control, I would greatly appreciate any help you can give me.  I don't
really relish the idea of having to rewrite my entire application in Visual




3. need help compiling (linking) Borland C++ programs using templates

4. Half a Bootlog???

5. I Need a comparison of Borland C/C++ and Borland C++ Builder...

6. Sozobon-C

7. Help needed in Scottsdale - Mac help needed using C++

8. Gold? Silver? Dow? NASDAQ?

9. Problems with winsock Bind call using Borland C++

10. HELP : Borland C++ winsock.h Compile Error

11. Need help using VB with WinSock

12. Need Help with TELNET app using Winsock (Please!!!)

13. Help needed with Borland C++ 3.1