http://bugs.winehq.org/show_bug.cgi?id=7690
------- Additional Comments From focht@gmx.net 2007-19-03 06:45 ------- Hello
--- snip --- fixme:mpr:WNetGetUniversalNameA ("C:\PROGRAM FILES\KOBOLD\SHOAI.80\KLM\KLM.mdb", 0x00000001, 0x34f82c, 0x34fc38): stub --- snip ---
This fixme could probably solved by deferring work to WNetGetUniversalNameW(). You just need to convert input ansi params to unicode, pass it to "W" version and convert back to ansi after WNetGetUniversalNameW() returns successfully.
Implementation is easy: you can copy the code from dlls/mpr/wnet.c :WNetGetConnectionA() for this (same mechanism).
When working on it, fix some buggy code parts in WNetGetConnectionA() before "reusing" the code:
--- snip dlls/mpr/wnet.c ----
DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName, LPSTR lpRemoteName, LPDWORD lpBufferSize ) { ...
else if (ret == WN_MORE_DATA) { PWSTR wideRemote = HeapAlloc(GetProcessHeap(), 0, wideRemoteSize * sizeof(WCHAR));
if (wideRemote) { ret = WNetGetConnectionW(wideLocalName, wideRemote, &wideRemoteSize); if (ret == WN_SUCCESS) { // *** BUG: following call was missing before "len" check int len = WideCharToMultiByte(CP_ACP, 0, wideRemote, -1, NULL, 0, NULL, NULL); if (len <= *lpBufferSize) { // *** BUG: "wideRemoteStatic" should be "wideRemote" WideCharToMultiByte(CP_ACP, 0, wideRemoteStatic, -1, lpRemoteName, *lpBufferSize, NULL, NULL); ret = WN_SUCCESS; } else { *lpBufferSize = len; ret = WN_MORE_DATA; } } ... --- snip dlls/mpr/wnet.c ----
Regards