diff options
Diffstat (limited to 'src/win32-mailslot.c')
-rw-r--r-- | src/win32-mailslot.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/win32-mailslot.c b/src/win32-mailslot.c index 274aa6f..d000281 100644 --- a/src/win32-mailslot.c +++ b/src/win32-mailslot.c @@ -141,13 +141,13 @@ void mailslot_start_background_listener(TrgMainWindow * win) gboolean mailslot_send_message(gchar ** args) { - HANDLE hMailSlot = CreateFile(TRG_MAILSLOT_NAME, // mailslot name - GENERIC_WRITE, // mailslot write only - FILE_SHARE_READ, // required for mailslots - NULL, // default security attributes - OPEN_EXISTING, // opens existing mailslot - FILE_ATTRIBUTE_NORMAL, // normal attributes - NULL); // no template file + HANDLE hMailSlot = CreateFile(TRG_MAILSLOT_NAME, // mailslot name + GENERIC_WRITE, // mailslot write only + FILE_SHARE_READ, // required for mailslots + NULL, // default security attributes + OPEN_EXISTING, // opens existing mailslot + FILE_ATTRIBUTE_NORMAL, // normal attributes + NULL); // no template file if (hMailSlot != INVALID_HANDLE_VALUE) { DWORD cbBytes; @@ -178,7 +178,7 @@ gboolean mailslot_send_message(gchar ** args) json_node_free(node); g_object_unref(generator); - WriteFile(hMailSlot, // handle to mailslot + WriteFile(hMailSlot, // handle to mailslot msg, // buffer to write from strlen(msg) + 1, // number of bytes to write, include the NULL &cbBytes, // number of bytes written |