projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Windows PSCP now links against winsftp.c, and scp.c is now a
[u/mdw/putty]
/
winmisc.c
diff --git
a/winmisc.c
b/winmisc.c
index
10c9fe3
..
a524b96
100644
(file)
--- a/
winmisc.c
+++ b/
winmisc.c
@@
-39,6
+39,21
@@
int filename_is_null(Filename fn)
return !*fn.path;
}
return !*fn.path;
}
+char *get_username(void)
+{
+ DWORD namelen;
+ char *user;
+
+ namelen = 0;
+ if (GetUserName(NULL, &namelen) == FALSE)
+ return NULL;
+
+ user = snewn(namelen, char);
+ GetUserName(user, &namelen);
+
+ return user;
+}
+
int SaneDialogBox(HINSTANCE hinst,
LPCTSTR tmpl,
HWND hwndparent,
int SaneDialogBox(HINSTANCE hinst,
LPCTSTR tmpl,
HWND hwndparent,