The BOM doesn't need a DWORD sized variable, only a WCHAR one.
[wine] / dlls / shfolder / shfolder.spec
1 @ stdcall SHGetFolderPathA(long long long long ptr) shell32.SHGetFolderPathA
2 @ stdcall SHGetFolderPathW(long long long long ptr) shell32.SHGetFolderPathW