18 Jan
2004
18 Jan
'04
2:51 a.m.
"Eric Pouech" <pouech-eric(a)wanadoo.fr> wrote:
+DWORD WINAPI GetFullPathNameW( LPCWSTR name, DWORD len, LPWSTR buffer, + LPWSTR *lastpart ) +{ + LPWSTR dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(buffer)); + DWORD ret; + + if (!dst) return 0; + ret = RtlGetFullPathName_U(name, len * sizeof(WCHAR), dst, lastpart) / sizeof(WCHAR);
I don't quite understand the above bit of code: 1. HeapAlloc(GetProcessHeap(), 0, len * sizeof(buffer)) when buffer is a pointer 2. Why you don't pass buffer directly to RtlGetFullPathName_U without allocating an intermediate storage. -- Dmitry.