Jim Park's Unicode NSIS merging - Step 4 : merging more TCHAR stuff that shouldn't have any impact
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6041 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8ab72b9ece
commit
acf9a8c21f
41 changed files with 937 additions and 586 deletions
|
@ -21,16 +21,18 @@ void __declspec(dllexport) GetName(HWND hwndParent, int string_size,
|
|||
}
|
||||
}
|
||||
|
||||
TCHAR* GetAccountTypeHelper(BOOL CheckTokenForGroupDeny)
|
||||
{
|
||||
TCHAR *group = NULL;
|
||||
HANDLE hToken = NULL;
|
||||
struct group
|
||||
{
|
||||
DWORD auth_id;
|
||||
TCHAR *name;
|
||||
};
|
||||
|
||||
// Jim Park: Moved this array from inside the func to the outside. While it
|
||||
// was probably "safe" for this array to be inside because the strings are in
|
||||
// the .data section and so the pointer to the string returned is probably
|
||||
// safe, this is a bad practice to have as that's making an assumption on what
|
||||
// the compiler will do. Besides which, other types of data returned would
|
||||
// actually fail as the local vars would be popped off the stack.
|
||||
struct group groups[] =
|
||||
{
|
||||
{DOMAIN_ALIAS_RID_USERS, _T("User")},
|
||||
|
@ -40,6 +42,12 @@ struct group groups[] =
|
|||
{DOMAIN_ALIAS_RID_ADMINS, _T("Admin")}
|
||||
};
|
||||
|
||||
TCHAR* GetAccountTypeHelper(BOOL CheckTokenForGroupDeny)
|
||||
{
|
||||
TCHAR *group = NULL;
|
||||
HANDLE hToken = NULL;
|
||||
|
||||
|
||||
if (GetVersion() & 0x80000000) // Not NT
|
||||
{
|
||||
return _T("Admin");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue