21 #ifdef GPR_WINDOWS_TMPFILE
37 LPTSTR template_string = NULL;
38 TCHAR tmp_path[MAX_PATH];
39 TCHAR tmp_filename[MAX_PATH];
43 if (tmp_filename_out != NULL) *tmp_filename_out = NULL;
46 template_string = gpr_char_to_tchar(
prefix);
50 status = GetTempPath(MAX_PATH, tmp_path);
55 if (!success)
goto end;
58 if (_tfopen_s(&
result, tmp_filename,
TEXT(
"wb+")) != 0)
goto end;
61 if (
result && tmp_filename_out) {
62 *tmp_filename_out = gpr_tchar_to_char(tmp_filename);