Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   Creating dll and including "winsock.dll" in the Network application (http://www.go4expert.com/forums/creating-dll-including-winsockdll-t12515/)

codename47 28Jul2008 11:55

Creating dll and including "winsock.dll" in the Network application
Hi,I was trying to create a simple dll file.Here is what I did .
First I created dll.h file which looked like this

#ifndef "dll.h"
#define "dll.h"
/*function prototype*/
void intsum(int);
then I saved it as dll.h .
Secondly I created a dllmain.cpp
#include "dll.h"
using namespace std;
class dll
void intsum(int a)

I compiled it and I got a dll called by the of the project which was "Project1.dll"
from here
I include it in the application like this

#include "Project1.dll"
using namespace std;
int main()
int number;
printf("Enter Number :");
/*Here comes the function defined from the dll*/
return 0;

But nothing worked,And one the Errors was
"Project1.dll" no such file or directory After this Error I tried to replace the second line with
#include "dll.h" still I got the Error said "function()" is undeclared (first use of this function) From there I didn't have anymore try and Everything stacked just like that.
This code above I was Just a trial Because I was developing a Network Application And I was supposed to include the "winsock.dll" in my application I don't know what to do right now.Any help please on how I going to get away with this. Also any tutorials on how to include the dll's in the application will be helpful.Thanks

Cosmic_egg 24Sep2008 20:35

Re: Creating dll and including "winsock.dll" in the Network application
Please understand what is a dll, the approach you take is completely wrong.
Include dll winsock.dll means you should try to get the file from somewhere, usually you will get winsock.dll with the installation of the compiler.
and The above mentioned method is not a way to create a DLL file.

All times are GMT +5.5. The time now is 02:24.