[WINESYNC] msi: Generate unique names for 32- and 64-bit custom action server pipes.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 6925846988fb78a2dd217d2b837e59ec53234f87 by Zebediah Figura <zfigura@codeweavers.com>
This commit is contained in:
winesync 2022-03-12 23:50:38 +01:00 committed by Mark Jansen
parent fd8b07bdfc
commit ac9d876fe9
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 6 additions and 4 deletions

View file

@ -406,7 +406,7 @@ static DWORD CALLBACK custom_action_thread(void *arg)
static int custom_action_server(const WCHAR *arg)
{
static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x',0};
static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x','_','%','d',0};
DWORD client_pid = atoiW(arg);
DWORD64 thread64;
WCHAR buffer[24];
@ -423,7 +423,7 @@ static int custom_action_server(const WCHAR *arg)
return 1;
}
sprintfW(buffer, pipe_name, client_pid);
sprintfW(buffer, pipe_name, client_pid, sizeof(void *) * 8);
pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (pipe == INVALID_HANDLE_VALUE)
{