If in the end we are still not able to cope with the WM_DROPFILES issue, I think it will be reasonable to at least add a small notification for the user who might be attempting to launch it As Admin, with the help of this simple check function suggested by MSDN:
/*++
Routine Description: This routine returns TRUE if the caller's
process is a member of the Administrators local group. Caller is NOT
expected to be impersonating anyone and is expected to be able to
open its own process and process token.
Arguments: None.
Return Value:
TRUE - Caller has Administrators local group.
FALSE - Caller does not have Administrators local group. --
*/
BOOL IsUserAdmin(VOID)
{
BOOL b;
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
b = AllocateAndInitializeSid(
&NtAuthority,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&AdministratorsGroup);
if (b) {
if (!CheckTokenMembership(NULL, AdministratorsGroup, &b)) {
b = FALSE;
}
FreeSid(AdministratorsGroup);
}
return b;
}
used somewhere at the app initialization stage e.g. like this:
if (IsUserAdmin())
MessageBox(NULL, L"As Administrator mode disables drag-and-drop.",
L"Functionality Reduced:", MB_ICONASTERISK);