I moved from my earlier post because the story has changed.
am trying to catch dragged files to DBpro window Using the Styx library functions call back. now looking at my earlier post, I can easily catch those files using "message call back" from Matrix Utility plugin but, unfortunately, this command can cause crash on some systems and not on the others. ehile the styx does not cause any crash.
however, I tried plenty of ways but couldn't catch any dragged file.
please look at the code and correct it if you can.
register function : GetDraggedFilePointer() : CALLBACK 1, 2
ActionPtr = CALLBACK PTR(1)
#constant WM_DROPFILES 0x233
global DBproWin as dword
DBproWin = get dbpro window()
global FilePtr as dword
global FileNamePtr as dword
FileNamePtr = alloc(0xff)
load dll "shell32", 1
call dll 1, "DragAcceptFiles", DBproWin, 1
call dll 1,"DragQueryFileA",ActionPtr,1
do
if FilePtr <> 0
fileName$ = peek string(FileNamePtr)
print filename$
call dll 1, "DragFinish", FilePtr
FilePtr = 0
endif
loop
function GetDraggedFilePointer()
IF REGISTER CALL() then ExitFunction
FilePtr = CALLBACK ARG(1)
FileNamePtr = CALLBACK ARG(2)
CALLBACK RESULT 1
endfunction
Thanks