Re: [PATCH 1 of 2] start.exe: add /Unix switch for starting files from unix file managers
6 Apr
2008
6 Apr
'08
9:41 a.m.
On Sunday 06 April 2008 05:46:49 Vincent Povirk wrote:
-IMPORTS = shell32 user32 kernel32 +IMPORTS = shell32 user32 kernel32 shlwapi
If it's just StrCpyNW you need from shlwapi you might as well use an alternative like memcpy and avoid importing this dll.
+ char multibyte_dospath[MAX_PATH];
That's a misnomer, you're storing a Unix path in the buffer. Dynamic allocation would make the code a bit more robust.
+ WideCharToMultiByte(CP_ACP, 0, sei.lpFile, -1, multibyte_dospath, sizeof(multibyte_dospath)/sizeof(char), NULL, NULL);
Should be CP_UNIXCP. -Hans
6462
Age (days ago)
6462
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hans Leidekker