tayapress.blogg.se

Dragthing 64 bit
Dragthing 64 bit










dragthing 64 bit
  1. DRAGTHING 64 BIT HOW TO
  2. DRAGTHING 64 BIT 32 BIT

if not call it, by set WS_EX_ACCEPTFILES exstyle by self - all high bits of wParam will be 0įor test can exec 32 bit notepad, open Open File Dialog and drag-drop any file to our windowĪs the question has been reopened, I can post a proper answer. Interesting that if call DragAcceptFiles (even only jump on first it instruction) high 32 bits of wParam will be all 1. UnregisterClass(wndcls.lpszClassName, 0) look for msg.wParam returned by GetMessageĭragQueryFile((HDROP)msg.wParam, 0, name, RTL_NUMBER_OF(name)) WS_OVERLAPPEDWINDOW|WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT,ĬW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, 0, 0, 0)) If (HWND hwnd = CreateWindowEx(WS_EX_ACCEPTFILES, wndcls.lpszClassName, 0, Return DefWindowProc(hwnd, uMsg, wParam, lParam) Swprintf(sz, L"%p", wParam) // look for wParam Minimal code that reproduces it LRESULT WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) I will provide no code because I assume that those who answer know something about this issue that affects a large number of softwares.

DRAGTHING 64 BIT HOW TO

So the data are here, somewhere, I just don't know how to retrieve them (at least without an ugly hack). If I replace the invalid high order by a valid one from a previous message (in this example, this would be 0x000000F2), then DragQueryFile works!.Next, without closing my application, if I drag the file from a 32-bit executable, wParam will have something like 0x0000000011C000B8 or 0xFFFFFFFF11C000B8, which means that the high order 32 bits are invalid.If I drag-and-drop a file from a 64-bit executable to my 64-bit application, wParam has a value such as 0x000000F211C000B8 (which shows that there is no cast issue).This seems to be an issue for a lot of applications but I would like to know if there is a workaround about that. I still get the WM_DROPFILES message, but DragQueryFile returns nothing (the number of files is 0). But when it compiled in 64-bit, it works only for files dragged from a 64-bit application: When it is compiled in 32-bit, it works in any case. I am writing a C program that accepts drag-and-drop of files.












Dragthing 64 bit