Ian Pilcher wrote:
>
> First the disclaimer: I am not an experienced WINE developer, or even
> a frequent coder; call me a motivated power user.
>
> I use WINE to run one application, Lotus Notes 4.6.7, and I must say
> that the job that the WINE team has done is absolutely remarkable. Well
> done!
>
> Attaching files to Notes has always been somewhat problematic. Until
> recently it required the use of native DLLs, but WINE 20001002 seemed to
> remove this dependency. WINE 20001026, on the other hand, seemed to
> break it entirely. The symptom is that after the user selects a file,
> "foo", for attachment an error dialog pops up, stating that
> "foo<garbage characters>" does not exist.
>
> Some further experimentation revealed that 20001002 didn't really work
> either. A user can successfully attach a file immediately after
> starting Notes, but if the user first detaches a file the "garbage"
> problem appears. Interestingly, the "garbage" characters in this case
> are sometimes part of of the Notes user ID of the sender of the note
> from which the file was detached previously. (Got that?) This led me
> to suspect that either:
>
> - a buffer is not being properly cleared (by Notes or WINE), or
>
> - the file name string is not being properly terminated (by Notes
> or WINE).
>
> After much perusal of dlls/commdlg/filedlg95.c, I was able to locate the
> point at which FILEDLG95_OnOpen returns the filename in fodInfos->
> ofnInfos->lpstrFile. I created a quick hack (patch attached) which adds
> an additional '\0' to the end of the string. Much to my surprise, it
> seems to actually work.
>
> I have no idea what the correct behavior of FILEDLG95_OnOpen should be.
> If it is supposed to return a doubly terminated string (a la FILEDLG95_
> FILENAME_GetFileNames), then I guess I've found a bug. If the double-
> termination simply works around a Notes bug (or an unknown bug somewhere
> else in WINE), then the issues are stickier.
>
> I hope this helps!
sounds like an old bug I fixed years ago in filedlg.c
when called with OFN_ALLOWMULTISELECT, the returned string shall be a list
of null terminated LPSTR, followed by a last '\0' to terminate the list
can you check that you dialog box is opened with OFN_EXPLORER|OFN_ALLOWMULTISELECT
combination in the Flags member of the OPENFILENAME structure ?
A+
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle