hi,<br><br>Writing dlls are very simple,<br><br>In VC create a Win32 application, go to setting and in the linker options add "/dll" (without quotes) and your file will get linked as a dll not an exe. <br><br>now include a new file with an .c or .cpp extension and add it to the project. also add a .def file.<br><br>Theory says you need to have a DllMain like WinMain but you don't need one. Dll is a binary file with functions. so add your functions in a dll. open the .def file and you need to set up the exports section.<br><br>This is how you will do it.<br>in .def file<br><br>Exports <br> FunctionOne<br> FunctionTwo<br><br><br>that's all. Click on Build all , you will be able to create a dll. remember "/dll" option in link setting. <br><br>Now you need to call the dll in a client.(exe file)<br><br>this is a sample code, so change it to suit your needs.<br><br>HANDLE hMod ;<br>hMod = LoadLibrary("path of your dll(including filename)"

;<br><br>// Assuming signature of your FunctionOne(in dll) is like //this<br>// int FunctionOne(char *,char *) , it can be any way !!<br>// create a typedef for your function pointer<br><br>typedef int (FunctionOne *)(char *,char *) ;<br><br>// create an object of type FunctionOne to hold the address <br>// of your function in the dll<br><br>FunctionOne a ;<br><br>// Now load that pointer with the actual address of the //function<br>a = (FunctionOne)GetProcAddress(hMod,"FunctionOne"

;<br><br>// now a is loaded with the address of the dll<br>// call a<br><br>// remember FunctionOne takes two char pointers<br>int nRet = a("hello","World"

;<br><br><br> <p>GuruPrasad Belthur<br><a href=mailto:belthurgp@yahoo.com>belthurgp@yahoo.com</a><br><a href=
Personal Page</a><br>Commerce Graduate, but have lived purely on computers. All the work i have done till now is only with computers and I love it.