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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -