P
PeterWokke
Guest
The comdlg32.dll does not work to open dialog boxes when we moved from 32bit to 64bit client. From the internet I have found to replace the defined parameter LONG to INT64. But this not enough to get tget the dialog box working. The mempointer for the import parameter I define as follow: SET-SIZE(lpOfn) = 76. /* size */ PUT-LONG (lpOfn, 1) = GET-SIZE(lpOfn). /* hwndOwner */ PUT-LONG (lpOfn, 5) = QCurrentHWND. /* hInstance */ PUT-LONG (lpOfn, 9) = 0. /* lpstrFilter */ PUT-LONG (lpOfn,13) = GET-POINTER-VALUE(lpstrFilter). /* lpstrCustomFilter */ PUT-LONG (lpOfn,17) = 0. /* nMaxCustFilter */ PUT-LONG (lpOfn,21) = 0. /* nFilterIndex */ PUT-LONG (lpOfn,25) = 0. /* lpstrFile */ PUT-LONG (lpOfn,29) = GET-POINTER-VALUE(lpstrFile). /* nMaxFile */ PUT-LONG (lpOfn,33) = GET-SIZE(lpstrFile). /* lpstrFileTitle */ PUT-LONG (lpOfn,37) = 0. /* nMaxFileTitle */ PUT-LONG (lpOfn,41) = 0. /* lpstrInitialDir */ PUT-LONG (lpOfn,45) = IF (GET-SIZE(lpstrInitialDir) 0) THEN GET-POINTER-VALUE(lpstrInitialDir) ELSE 0. /* lpstrTitle */ PUT-LONG (lpOfn,49) = GET-POINTER-VALUE(lpstrTitle). /* flags */ PUT-LONG (lpOfn,53) = Flags. /* nFileOffset */ PUT-SHORT(lpOfn,57) = 0. /* nFileExtension */ PUT-SHORT(lpOfn,59) = 0. /* lpstrDefExt */ PUT-LONG (lpOfn,61) = 0. /* lCustData */ PUT-LONG (lpOfn,65) = 0. /* lpfnHook */ PUT-LONG (lpOfn,69) = 0. /* lpTemplateName */ PUT-LONG (lpOfn,73) = 0. RUN GetOpenFileNameA (GET-POINTER-VALUE(lpOfn), OUTPUT c-OK). The external procedure: PROCEDURE GetOpenFileNameA EXTERNAL "comdlg32.dll":U : DEFINE INPUT PARAMETER lpOfn AS {&POINTERTYPE}. DEFINE RETURN PARAMETER pReturn AS {&POINTERTYPE}. END PROCEDURE.
Continue reading...
Continue reading...