[netapi32] Add minimal NetUserModalsGet test.
Robert Reif
reif at earthlink.net
Sat Apr 22 09:22:48 CDT 2006
Add minimal NetUserModalsGet test.
-------------- next part --------------
Index: dlls/netapi32/tests/access.c
===================================================================
RCS file: /home/wine/wine/dlls/netapi32/tests/access.c,v
retrieving revision 1.10
diff -p -u -r1.10 access.c
--- dlls/netapi32/tests/access.c 20 Jun 2005 15:35:54 -0000 1.10
+++ dlls/netapi32/tests/access.c 22 Apr 2006 14:18:36 -0000
@@ -45,6 +45,7 @@ static NET_API_STATUS (WINAPI *pNetApiBu
static NET_API_STATUS (WINAPI *pNetApiBufferSize)(LPVOID,LPDWORD)=NULL;
static NET_API_STATUS (WINAPI *pNetQueryDisplayInformation)(LPWSTR,DWORD,DWORD,DWORD,DWORD,LPDWORD,PVOID*)=NULL;
static NET_API_STATUS (WINAPI *pNetUserGetInfo)(LPCWSTR,LPCWSTR,DWORD,LPBYTE*)=NULL;
+static NET_API_STATUS (WINAPI *pNetUserModalsGet)(LPCWSTR,DWORD,LPBYTE*)=NULL;
static int init_access_tests(void)
{
@@ -170,6 +171,18 @@ static void run_querydisplayinformation1
ok(hasAdmin, "Has Administrator account\n");
}
+void run_usermodalsget_tests()
+{
+ NET_API_STATUS rc;
+ USER_MODALS_INFO_2 * umi2 = NULL;
+
+ rc = pNetUserModalsGet(NULL, 2, (LPBYTE *)&umi2);
+ ok(rc == ERROR_SUCCESS, "NetUserModalsGet failed, rc = %ld\n", rc);
+
+ if (umi2)
+ pNetApiBufferFree(umi2);
+}
+
START_TEST(access)
{
HMODULE hnetapi32=LoadLibraryA("netapi32.dll");
@@ -177,11 +190,14 @@ START_TEST(access)
pNetApiBufferSize=(void*)GetProcAddress(hnetapi32,"NetApiBufferSize");
pNetQueryDisplayInformation=(void*)GetProcAddress(hnetapi32,"NetQueryDisplayInformation");
pNetUserGetInfo=(void*)GetProcAddress(hnetapi32,"NetUserGetInfo");
+ pNetUserModalsGet=(void*)GetProcAddress(hnetapi32,"NetUserModalsGet");
+
if (!pNetApiBufferSize)
trace("It appears there is no netapi32 functionality on this platform\n");
if (init_access_tests()) {
run_usergetinfo_tests();
run_querydisplayinformation1_tests();
+ run_usermodalsget_tests();
}
}
More information about the wine-patches
mailing list