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;
LPWSADATA wsaData;
int err, clean;
wVersionRequested = 0x101;
err = WSAStartup(wVersionRequested, wsaData);
if ( err != 0 ) printf("Error Returned");
else printf("No Error Found");
clean = WSACleanup();
return;
I've properly installed the winsock.dll and I'm using the header fileQuote:}
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,
thanks.
Jeff Kehres