delphi - WMDropFiles problem on win7 -


I have implemented the following procedure and it works properly when I run Vista Vista, Computer # Compiling on 1. If I share the .exe file I created on win7, computer # 2, then it runs just like that. The problem is that when I compile the computer # 2 it just does not accept it That has dropped anything on the application. There is absolutely no answer in this code. It has been created and compiled without errors or warnings. I have been searching for a while for some time, which explains why this happens or someone else with this problem.

The use of both the computers Delphi 2010 is installed with the same component.

  1. Is this the way that users allow files to be left on the file? If not, how should it be done nowadays?
  2. Why does any idea work on computer compiled on computer, but computer not # 2? (The program works properly on both computers when compiled on the computer) #

    Any help or comment is highly appreciated.

      Process TfMainForm.WMDROPFILES (var Msg: TWMDropFiles); Const Maxlegram = 255; Var nFiles: integer; I: integer; FileName: Sir's [0..max lamp] sir; Filename: TStringArray; Get started / Get the number of files nFiles: DragQueryFile (msg.Drop, $ FFFFFFFF, Filename, MaxLenth); // file name setlist (filename, nffile); I: = 0 to nFiles - 1 start DragQueryFile (msg.Drop, i, FileName, MaxLength); Filename [i]: = fileName; End; // Add File ProjectHandler.addFiles (fileNames); // Release Memory Dragfish (msg.Drop); End;  

    I'm going to make a wild guess that if you have IDE # 2 on the computer It is sure that if you compile on computer # 2 but begin executable from IDE with Explorer, then it works. The last piece of the puzzle is that I bet you as an administrator on your IDE Are running

    On Vista and Windows 7, you can not send messages in a process with a high integrity level. If your process is being run as an administrator, then it will have a higher level of integrity than Explorer and therefore the discarded files will not be accepted.

    If my guess is correct then I would recommend that you stop running Delphi as an administrator, this is not needed for it. For

    or not WM_DROPFILES is a reasonable perspective, I do not see any problem in using it.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Client template not working with custom helper action methods -