Clarify GetUserName failure on Win9x
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7132 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
52cd125973
commit
932ad7d85b
2 changed files with 11 additions and 7 deletions
|
@ -23,7 +23,10 @@ void __declspec(dllexport) GetName(HWND hwndParent, int string_size,
|
|||
stack_t *th;
|
||||
if (!g_stacktop) return;
|
||||
th = (stack_t*) GlobalAlloc(GPTR, sizeof(stack_t) + g_stringsize*sizeof(TCHAR));
|
||||
GetUserName(th->text, &dwStringSize);
|
||||
if (!GetUserName(th->text, &dwStringSize)) // Fails with ERROR_NOT_LOGGED_ON on Win9x if you cancel the logon dialog.
|
||||
{
|
||||
*th->text = _T('\0');
|
||||
}
|
||||
th->next = *g_stacktop;
|
||||
*g_stacktop = th;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue