542 |
} |
} |
543 |
|
|
544 |
|
|
545 |
|
/* Generate a temporary file name by using the users |
546 |
|
temp path and optionally a name @name provided by the caller. |
547 |
|
Return value: 0 on success. */ |
548 |
|
int |
549 |
|
get_temp_name (char *buf, DWORD buflen, const char *name) |
550 |
|
{ |
551 |
|
char tmp[32]; |
552 |
|
|
553 |
|
if (!name) { |
554 |
|
sprintf (tmp, "%08lX", GetTickCount ()); |
555 |
|
name = tmp; |
556 |
|
} |
557 |
|
if (!GetTempPath (buflen - strlen (name) -2, buf)) { |
558 |
|
log_debug ("GetTempPath() failed ec=%d\n", (int)GetLastError ()); |
559 |
|
return -1; |
560 |
|
} |
561 |
|
strcat (buf, name); |
562 |
|
return 0; |
563 |
|
} |
564 |
|
|
565 |
|
|
566 |
struct reminder_hd_s { |
struct reminder_hd_s { |
567 |
int msecs; |
int msecs; |
568 |
HWND dlg; |
HWND dlg; |