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


Reply via email to