So, this way, when the library is being built (via simple_dll.pro), then class is dllexport'ed. But when other code uses that same header (in doesn't define SIMPLEDLL_MAKEDLL) then that same class is dllimport'ed instead.
Typically, you end up doing this sort of thing to many classes in a single library, so rather than having the #ifdef ... #define ... etc in each header file, it often ends up being written once in a "global" project header of some kind. For example, Q_CORE_EXPORT gets defined in qglobal.h, then used throughout all of the exported core Qt class headers.
Why not to use: QSharedMemory and You don't need to worry about message formatting.
Because I run process with different account.
First process run from System account and second from local account
When I read SharedMemory in another process I have error "QSharedMemory handle doesn't exist"