Changelog: dlls/netapi32/access.c: NetUserGetInfo Implement Level 1 Altera quartus.exe gets further with this. -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ---------- Index: wine/dlls/netapi32/access.c =================================================================== RCS file: /home/wine/wine/dlls/netapi32/access.c,v retrieving revision 1.2 diff -u -w -r1.2 access.c --- wine/dlls/netapi32/access.c 24 Sep 2002 18:29:39 -0000 1.2 +++ wine/dlls/netapi32/access.c 13 Dec 2002 11:37:31 -0000 @@ -171,6 +171,60 @@ } case 1: + { + + static const WCHAR homedirW[] = {'H','O','M','E',0}; + PUSER_INFO_1 ui; + PUSER_INFO_0 ui0; + NET_API_STATUS status; + /* sizes of the field buffers in WCHARS */ + int name_sz, password_sz, home_dir_sz, comment_sz, script_path_sz; + + password_sz = 1; /* not filled out for security reasons for NetUserGetInfo*/ + comment_sz = 1; + script_path_sz = 1; + + /* get data */ + status = NetUserGetInfo(servername, username, 0, (LPBYTE *) &ui0); + if (status != NERR_Success) + { + NetApiBufferFree(ui0); + return status; + } + name_sz = lstrlenW(ui0->usri0_name) + 1; + home_dir_sz = GetEnvironmentVariableW(homedirW, NULL,0); + /* set up buffer */ + NetApiBufferAllocate(sizeof(USER_INFO_1) + + (name_sz + password_sz + home_dir_sz + + comment_sz + script_path_sz) * sizeof(WCHAR), + (LPVOID *) bufptr); + ui = (PUSER_INFO_1) *bufptr; + ui->usri1_name = (LPWSTR) (*bufptr + sizeof(USER_INFO_1)); + ui->usri1_password = (LPWSTR) ( + ((PBYTE) ui->usri1_name) + name_sz * sizeof(WCHAR)); + ui->usri1_password_age =(DWORD) ( + ((PBYTE) ui->usri1_password) + password_sz * sizeof(WCHAR)); + ui->usri1_priv =(DWORD) ( + ((PBYTE) ui->usri1_password_age) + sizeof(DWORD)); + ui->usri1_home_dir =(LPWSTR) ( + ((PBYTE) ui->usri1_priv) + sizeof(DWORD)); + ui->usri1_comment =(LPWSTR) ( + ((PBYTE) ui->usri1_home_dir) + home_dir_sz* sizeof(WCHAR)); + ui->usri1_flags =(DWORD) ( + ((PBYTE) ui->usri1_comment) + comment_sz* sizeof(WCHAR)); + ui->usri1_script_path =(LPWSTR) ( + ((PBYTE) ui->usri1_flags) + sizeof(DWORD)); + /* set data */ + lstrcpyW(ui->usri1_name, ui0->usri0_name); + NetApiBufferFree(ui0); + ui->usri1_password = 0; + ui->usri1_priv = 0; + GetEnvironmentVariableW(homedirW, ui->usri1_home_dir,home_dir_sz); + ui->usri1_comment[0] =0; + ui->usri1_flags = 0; + ui->usri1_script_path[0] =0; + break; + } case 2: case 3: case 4: