I've been looking through the site for topics on how to code your own DLL's in C++ and so far i have not come up with much, I'm hoping to create a DLL in which i will code functions for using the win32 API and kinda making a small framework for it. But i was wondering if anyone knew any tutorials on DLL's and if they could give me a link to them

Thanks.

If you are using VC++ 2008 or Code::Blocks those IDEs will generate some of the DLL code for you. Then all you have to do is add the functions you want, declare then with __dllexport (or add the function name to a *.def file). You can even export entire c++ classes using __dllexport.

One thing to keep in mind -- any memory allocated in the DLL must be deallocated in the DLL. The calling application program can not deallocate it. The same with memory allocated in the applicaton can not be deallocated in the DLL.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.