Menu

#1 About instances.

open
nobody
None
5
2010-09-02
2010-09-02
No

Using QSharedMemory in the program is better for detect when a instance of program is executed, and need less code. This is the way:

#define EXIT_INSTANCE 2
QSharedMemory mem("QEVEN_SHARED");
if ( !mem.create(1) )
{
QMessageBos::critical(0, "QEVEN", "Ya se encuentra una instancia ejecutándose");
return EXIT_INSTANCE;
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.