wine/dlls/advapi32/tests registry.c
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Nov 4 05:15:59 CST 2005
ChangeSet ID: 21109
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/04 05:15:59
Modified files:
dlls/advapi32/tests: registry.c
Log message:
Saulius Krasuckas <saulius.krasuckas at ieee.org>
- RegConnectRegistryA fails on Win9x when Remote Registry Service is
not installed (WinReg.DLL is missing).
- Test "\\" prefixed computer names too.
Patch: http://cvs.winehq.org/patch.py?id=21109
Old revision New revision Changes Path
1.33 1.34 +19 -2 wine/dlls/advapi32/tests/registry.c
Index: wine/dlls/advapi32/tests/registry.c
diff -u -p wine/dlls/advapi32/tests/registry.c:1.33 wine/dlls/advapi32/tests/registry.c:1.34
--- wine/dlls/advapi32/tests/registry.c:1.33 4 Nov 2005 11:15:59 -0000
+++ wine/dlls/advapi32/tests/registry.c 4 Nov 2005 11:15:59 -0000
@@ -601,22 +601,39 @@ static BOOL set_privileges(LPCSTR privil
static void test_regconnectregistry( void)
{
CHAR compName[MAX_COMPUTERNAME_LENGTH + 1];
+ CHAR netwName[MAX_COMPUTERNAME_LENGTH + 3]; /* 2 chars for double backslash */
DWORD len = sizeof(compName) ;
BOOL ret;
LONG retl;
HKEY hkey;
SC_HANDLE schnd;
+ DWORD GLE;
ret = GetComputerNameA(compName, &len);
ok( ret, "GetComputerName failed err = %ld\n", GetLastError());
if( !ret) return;
+ lstrcpyA(netwName, "\\\\");
+ lstrcpynA(netwName+2, compName, MAX_COMPUTERNAME_LENGTH + 1);
+
retl = RegConnectRegistryA( compName, HKEY_LOCAL_MACHINE, &hkey);
- ok( !retl, "RegConnectRegistryA failed err = %ld\n", retl);
+ ok( !retl || retl == ERROR_DLL_INIT_FAILED, "RegConnectRegistryA failed err = %ld\n", retl);
+ if( !retl) RegCloseKey( hkey);
+
+ retl = RegConnectRegistryA( netwName, HKEY_LOCAL_MACHINE, &hkey);
+ ok( !retl || retl == ERROR_DLL_INIT_FAILED, "RegConnectRegistryA failed err = %ld\n", retl);
if( !retl) RegCloseKey( hkey);
schnd = OpenSCManagerA( compName, NULL, GENERIC_READ);
- ok( schnd != NULL, "OpenSCManagerA failed err = %ld\n", GetLastError());
+ GLE = GetLastError();
+ ok( schnd != NULL || GLE==ERROR_CALL_NOT_IMPLEMENTED,
+ "OpenSCManagerA failed err = %ld\n", GLE);
+ CloseServiceHandle( schnd);
+
+ schnd = OpenSCManagerA( netwName, NULL, GENERIC_READ);
+ GLE = GetLastError();
+ ok( schnd != NULL || GLE==ERROR_CALL_NOT_IMPLEMENTED,
+ "OpenSCManagerA failed err = %ld\n", GLE);
CloseServiceHandle( schnd);
}
More information about the wine-cvs
mailing list