What does this c++ class declaration mean? -


i saw piece of code in article reading.

class exampleunmanageddll_api cunmanagedtestclass { public:     cunmanagedtestclass();     virtual ~cunmanagedtestclass(); };  

what exampleunmanageddll_api do?

thanks in advance

this purpose of exporting or importing functions of class dll.

read article on msdn additional information: using dllimport , dllexport in c++ classes

the common practice use conditional compilation in headers of class, same header can used producing dll or consuming dll:

#ifdef exampleunmanageddll_exports      #define exampleunmanageddll_api __declspec(dllexport)  #else      #define exampleunmanageddll_api __declspec(dllimport)  #endif  

in example, code or buildscripts of library define symbol exampleunmanageddll_exports.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -