Page 1 of 1

Dropping files into AS PB103 x64 not working

Posted: 21 Aug 2013, 14:22
by Thunesier
In previous versions of Salamander, up to and includiung 3.0 beta 2, I used to be able to drop files into a folder, e.g. by dragging file attachments with the mouse from Outlook to Salamander. In beta 3 PB103 x64 that does not work anymore. :(

Re: Dropping files into AS PB103 x64 not working

Posted: 21 Aug 2013, 15:53
by therube
What OS?
Are Outlook & Salamander running at different privilege levels?

Re: Dropping files into AS PB103 x64 not working

Posted: 21 Aug 2013, 16:47
by Thunesier
Windows 8.
Correct. Salamander was running with admin privileges, Outlook not. When I change Salamander to run without admin privileges, dropping files into Salamander works.
Is this behaviour by design?

Re: Dropping files into AS PB103 x64 not working

Posted: 21 Aug 2013, 17:17
by Jan Rysavy
Yes, it is by Windows design.

We will implement the UAC support so you will not need to run Salamander as Administrator.

Re: Dropping files into AS PB103 x64 not working

Posted: 23 Aug 2013, 09:06
by Andre.Ziegler
Thunesier wrote:Windows 8.
Correct. Salamander was running with admin privileges, Outlook not.
Is this behaviour by design?
yes this is by design, this is how UAC works. read here about User Interface Privilege Isolation
UIPI prevents a lower privilege application from using Windows messages to send input from one process to a higher privilege process. Sending input from one process to another allows a process to inject input into another process without the user providing keyboard or mouse actions.
http://msdn.microsoft.com/en-us/library/bb530410.aspx

otherwise you can attack admin processes and execute bad code.

Re: Dropping files into AS PB103 x64 not working

Posted: 27 Aug 2013, 19:55
by crystalidea
void EnableDragAndDropForElevatedProcess()
{
typedef BOOL (WINAPI *LPFN_CHANGEWINDOWMESSAGEFILTER) (UINT, DWORD);

#define MSGFLT_ADD 1

LPFN_CHANGEWINDOWMESSAGEFILTER fnChangeWindowMessageFilter =
(LPFN_CHANGEWINDOWMESSAGEFILTER)GetProcAddress(GetModuleHandle(TEXT("user32")),"ChangeWindowMessageFilter");

if (NULL != fnChangeWindowMessageFilter)
{
fnChangeWindowMessageFilter (WM_DROPFILES, MSGFLT_ADD);
fnChangeWindowMessageFilter (WM_COPYDATA, MSGFLT_ADD);
fnChangeWindowMessageFilter (0x0049, MSGFLT_ADD);
}
}

Re: Dropping files into AS PB103 x64 not working

Posted: 27 Aug 2013, 20:33
by Jan Rysavy
Doesn't look like solution for our problem: http://stackoverflow.com/questions/3794 ... pplication

Re: Dropping files into AS PB103 x64 not working

Posted: 27 Aug 2013, 23:57
by crystalidea
Actually this function worked for me.