Microsoft Word opening wrong file when double clicking on a .docx file in a Dokan mounted drive #332
-
Hello, i have a drive mounted on the R: letter that i created with Dokan, the same piece of software also communicate with a distant server asking for files, and i use Dokan to represent these files on the R: drive. I have no problem opening any of these files but one, a docx file. When i double click it it will always open MS Word asking me to choose an encoding method for another file, "mail.MSG", which is also on my dokan mounted drive. I seem to have no problem opening the docx file through other means like opening it through Word's interface or even online with Office 365. I have tried a lot of things and looked for similar issue but didn't find anything that could help me. Here is a gist containing the most important pieces of code in my dokan-dotnet based software, let me know if you need anything else : https://gist.github.com/Thomas-Giaroli/e446313ca234a6e00376de507908477d Thanks already for any help you might be able to provide me, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @Thomas-Giaroli , this is really weird. I looked at the gist but could not see anything special. |
Beta Was this translation helpful? Give feedback.
-
There seems to be nothing in that log that indicates that Word actually asks for any .MSG file. My best guess for now is that you might have an issue in your Dokan implementation that returns data for another file than the file that Word requests and that it causes Word to get file data in a format that it does not know and therefore asks for encoding options. Are you really sure about what file names your Dokan service receives requests for? There are several different possible behaviours, such as file name supplied in CreateFile method and otherwise file name supplied directly in ReadFile etc methods but instead no open file handle at that point. |
Beta Was this translation helpful? Give feedback.
You should filter out what files you return in the file listing by the search pattern that the function is called with. Otherwise you will get exactly this problem.