display workgroup/domain name

svn path=/trunk/; revision=21898
This commit is contained in:
Christoph von Wittich 2006-05-12 20:05:19 +00:00
parent 34e230693a
commit a9680a89a6
2 changed files with 8 additions and 1 deletions

View file

@ -27,6 +27,7 @@
*/ */
#include <windows.h> #include <windows.h>
#include <stdlib.h> #include <stdlib.h>
#include <lm.h>
#include "resource.h" #include "resource.h"
#include "sysdm.h" #include "sysdm.h"
@ -50,7 +51,12 @@ ComputerPageProc(
{ {
SendDlgItemMessage(hwndDlg,IDC_COMPUTERNAME,WM_SETTEXT,0,(LPARAM)ComputerName); SendDlgItemMessage(hwndDlg,IDC_COMPUTERNAME,WM_SETTEXT,0,(LPARAM)ComputerName);
} }
/* FIXME: get the workgroup */ LPWKSTA_INFO_101 wki;
if (NetWkstaGetInfo(NULL,101,(LPBYTE*)&wki) == NERR_Success)
{
SendDlgItemMessage(hwndDlg,IDC_WORKGROUPDOMAIN_NAME,WM_SETTEXT,0,(LPARAM)wki->wki101_langroup);
NetApiBufferFree(&wki);
}
break; break;
} }
} }

View file

@ -10,6 +10,7 @@
<library>kernel32</library> <library>kernel32</library>
<library>user32</library> <library>user32</library>
<library>comctl32</library> <library>comctl32</library>
<library>netapi32</library>
<file>advanced.c</file> <file>advanced.c</file>
<file>computer.c</file> <file>computer.c</file>
<file>environment.c</file> <file>environment.c</file>