MadExcept Viewer Not Displaying Files.

delphi package - automated exception handling
Post Reply
SteveG
Posts: 15
Joined: Sat Sep 23, 2017 12:53 am

MadExcept Viewer Not Displaying Files.

Post by SteveG »

All of a sudden the MadExcept Viewer has stopped accepting exception reports. When I try to drag and drop an exception report onto the viewer, it won't accept it.

= Steve
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept Viewer Not Displaying Files.

Post by madshi »

That seems strange. Not sure what it could be. Have you tried rebooting the OS? Sometimes drag & drop stops working for me, as well (not even with madExcept, but with any app) and a reboot fixes it.
iconic
Site Admin
Posts: 1068
Joined: Wed Jun 08, 2005 5:08 am

Re: MadExcept Viewer Not Displaying Files.

Post by iconic »

SteveG,

Are you by chance running MadExcept Viewer with elevated rights (administrative rights)? If so, drag and drop support in the app would require a modified window filter due to UIPI from Vista up. I checked the viewer code and it does not add the necessary window messages to support such a case.

The MadExcept Viewer code can be updated with my code below which works w/ and w/o admin rights. Hopefully that's all your problem is?

Code: Select all

var
    ChangeWindowMessageFilter: function(msg: DWORD; dwFlag: DWORD): BOOL; stdcall;
const
    MSGFLT_ADD = 1;
    WM_COPYGLOBALDATA = $0049;
    FUNC_CWMF = 'ChangeWindowMessageFilter';

   // Vista+ UIPI access when running as Admin, otherwise not needed
   @ChangeWindowMessageFilter := GetProcAddress(GetModuleHandle(user32), FUNC_CWMF);
   if (@ChangeWindowMessageFilter <> nil) then
   begin
   ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);
   ChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD);
   ChangeWindowMessageFilter(WM_COPYGLOBALDATA, MSGFLT_ADD);
   end;
   
   DragAcceptFiles(hWindow, True);
  
--Iconic
SteveG
Posts: 15
Joined: Sat Sep 23, 2017 12:53 am

Re: MadExcept Viewer Not Displaying Files.

Post by SteveG »

madshi wrote: Tue Jun 27, 2023 9:05 am That seems strange. Not sure what it could be. Have you tried rebooting the OS? Sometimes drag & drop stops working for me, as well (not even with madExcept, but with any app) and a reboot fixes it.
Hi Madshi,

You were right. A simple reboot fixed the problem. :-)

Thank you.

= Steve
SteveG
Posts: 15
Joined: Sat Sep 23, 2017 12:53 am

Re: MadExcept Viewer Not Displaying Files.

Post by SteveG »

Hi Iconic,

Thank you for the code. Very nice!

= Steve
iconic
Site Admin
Posts: 1068
Joined: Wed Jun 08, 2005 5:08 am

Re: MadExcept Viewer Not Displaying Files.

Post by iconic »

A simple reboot fixed the problem
Great! :D In looking into drag and drop we now can add support for instances that can be elevated so it will also work properly, otherwise I'd have not looked at the D'nD code to begin with.

--Iconic
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept Viewer Not Displaying Files.

Post by madshi »

Great stuff, thanks! I'll add it to the madExcept code base. :D
Post Reply