diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-07 12:10:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-07 12:10:26 +0000 |
commit | 1d18d087d47d7a54f68950f983029642a54d6f43 (patch) | |
tree | f13ea4f54b2c576ce802388022b5c8545483bc05 /plugins/CmdLine/src/mimcmd_ipc.cpp | |
parent | 1dd4c9316543ff292ce250f7f08b25385fc8e37a (diff) |
- common.props divided into app.props & plugin.props;
- MimCmd & CmdLine converted to Unicode;
git-svn-id: http://svn.miranda-ng.org/main/trunk@14048 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CmdLine/src/mimcmd_ipc.cpp')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_ipc.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/CmdLine/src/mimcmd_ipc.cpp b/plugins/CmdLine/src/mimcmd_ipc.cpp index d16de2e7a8..6cee3de54f 100644 --- a/plugins/CmdLine/src/mimcmd_ipc.cpp +++ b/plugins/CmdLine/src/mimcmd_ipc.cpp @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "commonheaders.h"
+#include "stdafx.h"
HANDLE hsmCmdLine = NULL;
HANDLE hmClient = NULL;
@@ -33,73 +33,73 @@ PSharedData sdCmdLine = NULL; int InitClient()
{
int res = (CreateSystemEvents() || CreateMutexes() || CreateSharedMem());
-
+
return res;
}
int InitServer()
{
int res = (CreateSystemEvents() || CreateSharedMem());
-
+
return res;
}
int DestroyClient()
{
int res = (DestroySystemEvents() || DestroyMutexes() || DestroySharedMem());
-
+
return res;
}
int DestroyServer()
{
int res = (DestroySystemEvents() || DestroySharedMem());
-
+
return res;
}
int CreateSystemEvents()
{
- heServerExec = CreateEvent(NULL, FALSE, FALSE, EVENT_SERVER_EXEC);
- heServerDone = CreateEvent(NULL, FALSE, FALSE, EVENT_SERVER_DONE);
- heServerClose = CreateEvent(NULL, FALSE, FALSE, EVENT_SERVER_CLOSE);
- heServerBufferFull = CreateEvent(NULL, FALSE, FALSE, EVENT_SERVER_BUFFERFULL);
-
+ heServerExec = CreateEventA(NULL, FALSE, FALSE, EVENT_SERVER_EXEC);
+ heServerDone = CreateEventA(NULL, FALSE, FALSE, EVENT_SERVER_DONE);
+ heServerClose = CreateEventA(NULL, FALSE, FALSE, EVENT_SERVER_CLOSE);
+ heServerBufferFull = CreateEventA(NULL, FALSE, FALSE, EVENT_SERVER_BUFFERFULL);
+
return ((heServerExec == NULL) || (heServerDone == NULL) || (heServerClose == NULL) || (heServerBufferFull == NULL));
}
int CreateMutexes()
{
- hmClient = CreateMutex(NULL, FALSE, MUTEX_CLIENT_NAME);
-
+ hmClient = CreateMutexA(NULL, FALSE, MUTEX_CLIENT_NAME);
+
return (hmClient == NULL);
}
int CreateSharedMem()
{
- hsmCmdLine = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(TSharedData), SHAREDMEM_NAME);
+ hsmCmdLine = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(TSharedData), SHAREDMEM_NAME);
sdCmdLine = (PSharedData) MapViewOfFile(hsmCmdLine, FILE_MAP_WRITE, 0, 0, sizeof(TSharedData));
-
+
return ((hsmCmdLine == NULL) || (sdCmdLine == NULL));
}
int DestroySystemEvents()
{
int res = (!CloseHandle(heServerExec)) || (!CloseHandle(heServerDone)) || (!CloseHandle(heServerClose) || (!CloseHandle(heServerBufferFull)));
-
+
return res;
}
int DestroyMutexes()
{
int res = !CloseHandle(hmClient);
-
+
return res;
}
int DestroySharedMem()
{
int res = (!UnmapViewOfFile(sdCmdLine)) || (!CloseHandle(hsmCmdLine));
-
+
return res;
}
\ No newline at end of file |