DLL and Object oriented programming

Hi all , as I heard C++ is a programming language that supports Object oriented programming.

well I have did several object oriented examples and the write many applications.
But the problem is how can I write the classes inside the dll file and use those classes outside the dll file ?

is creating an OCX file for this is a must ????
or how can I do this only using the dll files ? Please give me some dll basics tutorial to study.

--thanks in advance.
You don't need to use COM or OCX or any such interface technology to create a DLL that contains a C++ class.

If you're using Microsoft's C++ compiler, you simply add __declspec(dllexport) to your class' definition, and you can use it from another DLL or program.
http://msdn.microsoft.com/en-us/library/a90k134d(VS.80).aspx

You can check what's exported from a DLL using depends.
http://www.dependencywalker.com/
Last edited on
closed account (z05DSL3A)
It is not a tutorial on DLLs but the following may be an interesting read as it dose use implement DLLs and talks about there short comings and how to work around them.
http://www.ddj.com/cpp/204202899
Thanks kbw and thanks Grey Wolf ,
I think I got it .
again thanks in advance !


I have write a sample program to demostrate that ,

I likes to upload and post the links of those projects for the help for a person
who will dig this thread in the future.

http://rapidshare.com/files/199369341/delspec_dllexport_.rar.html
Topic archived. No new replies allowed.