mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 09:17:57 +08:00
win: Make CreatePipe compatible with UWP apps
See the documentation of CreateNamedPipeA() Change-Id: Icc82b2ea7baf2c6d46947053d8d6dec817bced1f Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2207325 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
a8ff626764
commit
4b5a5bac26
@ -274,8 +274,13 @@ void AddUint64(std::vector<unsigned char>* data_vector, uint64_t data) {
|
||||
//! \param[out] pipe_handle The first pipe instance corresponding for the pipe.
|
||||
void CreatePipe(std::wstring* pipe_name, ScopedFileHANDLE* pipe_instance) {
|
||||
int tries = 5;
|
||||
std::string pipe_name_base =
|
||||
base::StringPrintf("\\\\.\\pipe\\crashpad_%lu_", GetCurrentProcessId());
|
||||
std::string pipe_name_base = base::StringPrintf(
|
||||
#if defined(WINDOWS_UWP)
|
||||
"\\\\.\\pipe\\LOCAL\\crashpad_%lu_",
|
||||
#else
|
||||
"\\\\.\\pipe\\crashpad_%lu_",
|
||||
#endif
|
||||
GetCurrentProcessId());
|
||||
do {
|
||||
*pipe_name = base::UTF8ToUTF16(pipe_name_base + RandomString());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user