"Eric Pouech" pouech-eric@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.