GetSaveFileNameW return structures path name lack of suffix
Time:11-21
In a recent work on a project, a specific software is hook save as operation, for the rest of the file, save as processing The idea is to use a hook hook software save too use GetSaveFileNameW API GetSaveFileNameW prototype below BOOL GetSaveFileName (LPOPENFILENAME Ipofn)
Hooked the GetSaveFileName in our success, and then read the inside of the lpofn content, strange things happened, Lpofn lpstrFile stored inside the file path, but only to the name of the file, no suffix, For example, save as file is F: \ Doc \ test Doc, but lpofn - & gt; LpstrFile content only F: \ Doc \ test this part, no suffix,
Arguably GetSaveFileName is to write a good API, even different applications, but after using this API, return should be the same, why this application will be quality,
Then we hooked NtCreateFile again, and generated files and become a complete path with suffix, mystery, still hope you glad indeed
CodePudding user response:
The lpstrFileTitle members containing the file suffix?