Hi,

There appears to be a little bug in DragQueryFileW. According to MSDN pFiles is
the offset in bytes.
Did somebody make a mistake or was the LPWSTR cast added on purpose?

Sander

Changelog:
- Fixed wrong cast; MSDN says lpDropFileStruct->pFiles is offset in bytes (regardless 
of
  ascii/unicode)

Author:
Sander van Leeuwen ([EMAIL PROTECTED])

--- shellole.co Sun Mar 17 11:20:10 2002
+++ shellole.c  Sun Jun  2 13:15:54 2002
@@ -627,7 +627,7 @@
     
        if(!lpDropFileStruct) goto end;
 
-       lpwDrop = (LPWSTR) lpDropFileStruct + lpDropFileStruct->pFiles;
+       lpwDrop = (LPWSTR) ((LPSTR)lpDropFileStruct + lpDropFileStruct->pFiles);
 
        i = 0;
        while (i++ < lFile)



Reply via email to