-
Tracy Lamb
- PowerBuilder
- Friday, 7 March 2025 01:28 PM UTC
Hi all,
I have a couple of windows with a datawindow that is supposed to respond to the pbm_dropfiles event.
I have defined a global external function:
FUNCTION int DragQueryFileW (long hDrop, int iFile, ref string szFileName, int cb) LIBRARY "shell32.dll"
The first call to DragQueryFileW gets the number of files dropped, subsequent calls get the file name(s).
ll_numFiles = DragQueryFileW (handle, 4294967295, ls_File, 1023)
MessageBox("ue_drop_files", ll_numfiles)
FOR ll_i = 1 to ll_numFiles
ls_File = Space(1024)
//Subsequent calls get the file names from dragged object
DragQueryFileW (handle, ll_i - 1, ls_File, 1023)
this.Event ue_add_dropfile(ls_file)
NEXT
This works fine in the 32-bit version of my app, but not in the 64-bit version. In the 64-bit version, DragQueryFileW always returns 0, regardless of how many files I drag over. I am testing both the 32-bit and 64-bit versions on a Windows 64 system. Shell32.dll is in C:\Windows\System32 .
I am using PB2022 R3 build 3397. Is there maybe a Win64 library that should be used instead of shell32.dll?
~~~Tracy
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.