diff options
Diffstat (limited to 'registry/workben/regtest.cxx')
-rw-r--r-- | registry/workben/regtest.cxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/registry/workben/regtest.cxx b/registry/workben/regtest.cxx index b3b2f5004755..b2ed50070d72 100644 --- a/registry/workben/regtest.cxx +++ b/registry/workben/regtest.cxx @@ -50,7 +50,7 @@ int _cdecl main() cout << "\n Simple Registry Test !!! \n\n"; - if (reg_createRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg)) + if (reg_createRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg)) cout << "\t0. creating registry \"test4.rdb\" failed\n"; else cout << "0. registry test4.rdb is created\n"; @@ -60,23 +60,23 @@ int _cdecl main() else cout << "1. root key of \"test4.rdb\" is opened\n"; - if (reg_createKey(hRootKey, OUString::createFromAscii("myFirstKey").pData, &hKey1)) + if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData, &hKey1)) cout << "\t2. creating key \"myFirstKey\" failed\n"; else cout << "2. key \"myFirstKey\" is created\n"; - if (reg_createKey(hRootKey, OUString::createFromAscii("mySecondKey").pData, &hKey2)) + if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &hKey2)) cout << "\t3. creating key \"mySecondKey\" failed\n"; else cout << "3. key \"mySecondKey\" is created\n"; - if (reg_createKey(hKey1, OUString::createFromAscii("myFirstSubKey").pData, &hKey3)) + if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstSubKey")).pData, &hKey3)) cout << "\t4. creating subkey \"myFirstSubKey\" failed\n"; else cout << "4. subkey \"myFirstSubKey\" is created\n"; - if (reg_createKey(hKey1, OUString::createFromAscii("mySecondSubKey").pData, &hKey4)) + if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondSubKey")).pData, &hKey4)) cout << "\t5. creating subkey \"mySecondSubKey\" failed\n"; else cout << "5. subkey \"mySecondSubKey\" is created\n"; - if (reg_createKey(hRootKey, OUString::createFromAscii("myThirdKey").pData, &hKey5)) + if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData, &hKey5)) cout << "\t6. creating key \"myThirdKey\" is created\n\n"; else cout << "6. key \"myThirdKey\" is created\n\n"; @@ -84,7 +84,7 @@ int _cdecl main() RegKeyHandle* phSubKeys; sal_uInt32 nSubKeys; - if (reg_openSubKeys(hRootKey, OUString::createFromAscii("myFirstKey").pData, &phSubKeys, &nSubKeys)) + if (reg_openSubKeys(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData, &phSubKeys, &nSubKeys)) cout << "\t7. open subkeys of \"myfirstKey\" failed\n"; else cout << "7. open " << nSubKeys << "subkeys of \"myfirstKey\"\n"; @@ -102,7 +102,7 @@ int _cdecl main() char* Value=(char*)"Mein erster Value"; - if (reg_setValue(hRootKey, OUString::createFromAscii("mySecondKey").pData, RG_VALUETYPE_STRING, Value, 18)) + if (reg_setValue(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, RG_VALUETYPE_STRING, Value, 18)) cout << "\t9. setValue of key \"mySecondKey\" failed\n"; else cout << "9. setValue (string Value) of key \"mySecondKey\"\n"; @@ -110,7 +110,7 @@ int _cdecl main() RegValueType valueType; sal_uInt32 valueSize; sal_Char* readValue; - if (reg_getValueInfo(hRootKey, OUString::createFromAscii("mySecondKey").pData, &valueType, &valueSize)) + if (reg_getValueInfo(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &valueType, &valueSize)) cout << "\t10. getValueInfo of key \"mySecondKey\" failed\n"; else cout << "10. getValueInfo of key \"mySecondKey\"\n"; @@ -135,7 +135,7 @@ int _cdecl main() else cout << "12. keys \"myFirstKey\" \"myfistSubKey\" \"mySecondSubKey\" are closed\n"; - if (reg_deleteKey(hRootKey, OUString::createFromAscii("myFirstKey").pData)) + if (reg_deleteKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey")).pData)) cout << "13.\t delete key \"myFirstKey\" failed\n"; else cout << "13. key \"myFirstKey\" is deleted\n"; @@ -145,7 +145,7 @@ int _cdecl main() else cout << "14. key \"mySecondKey\" is closed\n"; - if (reg_openKey(hRootKey, OUString::createFromAscii("mySecondKey").pData, &hKey2)) + if (reg_openKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey")).pData, &hKey2)) cout << "\n15. open key \"mySecondKey\" failed\n"; else cout << "15. key \"mySecondKey\" is opended\n"; @@ -154,12 +154,12 @@ int _cdecl main() cout << "\t15. closing key \"myThirdSubKey\" failed\n"; else cout << "15. key \"myThirdSubKey\" is closed\n"; - if (reg_deleteKey(hRootKey, OUString::createFromAscii("myThirdKey").pData)) + if (reg_deleteKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData)) cout << "\t16. delete key \"myThirdKey\" failed\n"; else cout << "16. key \"myThirdKey\" is deleted\n"; - if (reg_openKey(hRootKey, OUString::createFromAscii("myThirdKey").pData, &hKey5)) + if (reg_openKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdKey")).pData, &hKey5)) cout << "\t17. open key \"myThirdKey\" failed\n"; else cout << "17. key \"myThirdKey\" is opened\n"; @@ -187,7 +187,7 @@ int _cdecl main() RegHandle hReg2; RegKeyHandle hRootKey2, h2Key1, h2Key2, h2Key3, h2Key4, h2Key5; - if (reg_createRegistry(OUString::createFromAscii("test5.rdb").pData, &hReg2)) + if (reg_createRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test5.rdb")).pData, &hReg2)) cout << "\t21. creating registry \"test5.rdb\" failed\n"; else cout << "21. registry \"test5.rdb\" is created\n"; @@ -197,23 +197,23 @@ int _cdecl main() else cout << "22. root key of \"test5.rdb\" is opened\n"; - if (reg_createKey(hRootKey2, OUString::createFromAscii("reg2FirstKey").pData, &h2Key1)) + if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstKey")).pData, &h2Key1)) cout << "\t23. creating key \"reg2FirstKey\" failed\n"; else cout << "23. key \"reg2FirstKey\" is created\n"; - if (reg_createKey(hRootKey2, OUString::createFromAscii("reg2SecondKey").pData, &h2Key2)) + if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondKey")).pData, &h2Key2)) cout << "\t24. creating key \"reg2SecondKey\" failed\n"; else cout << "24. key \"reg2SecondKey\" is created\n"; - if (reg_createKey(h2Key1, OUString::createFromAscii("reg2FirstSubKey").pData, &h2Key3)) + if (reg_createKey(h2Key1, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2FirstSubKey")).pData, &h2Key3)) cout << "\t25. creating key \"reg2FirstSubKey\" failed\n"; else cout << "25. key \"reg2FirstSubKey\" is created\n"; - if (reg_createKey(h2Key1, OUString::createFromAscii("reg2SecondSubKey").pData, &h2Key4)) + if (reg_createKey(h2Key1, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2SecondSubKey")).pData, &h2Key4)) cout << "\26. creating key \"reg2SecondSubKey\" failed\n"; else cout << "26. key \"reg2SecondSubKey\" is created\n"; - if (reg_createKey(hRootKey2, OUString::createFromAscii("reg2ThirdKey").pData, &h2Key5)) + if (reg_createKey(hRootKey2, OUString(RTL_CONSTASCII_USTRINGPARAM("reg2ThirdKey")).pData, &h2Key5)) cout << "\n27. creating key \"reg2ThirdKey\" failed\n"; else cout << "27. key \"reg2ThirdKey\" is created\n"; @@ -243,7 +243,7 @@ int _cdecl main() else cout << "30. registry test5.rdb is closed\n"; - if (reg_openRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg, REG_READWRITE)) + if (reg_openRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg, REG_READWRITE)) cout << "\t31. registry test4.rdb is opened\n"; else cout << "31. registry test4.rdb is opened\n"; @@ -253,34 +253,34 @@ int _cdecl main() else cout << "32. root key of \"test4.rdb\" is opened\n"; - if (reg_loadKey(hRootKey, OUString::createFromAscii("allFromTest2").pData, - OUString::createFromAscii("test5.rdb").pData)) + if (reg_loadKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")).pData, + OUString(RTL_CONSTASCII_USTRINGPARAM("test5.rdb")).pData)) cout << "\n\t33. load all keys from \"test5.rdb\" under key \"allFromTest2\" failed\n"; else cout << "\n33. load all keys from test5.rdb under key \"allFromTest2\"\n"; - if (reg_saveKey(hRootKey, OUString::createFromAscii("allFromTest2").pData, - OUString::createFromAscii("test6.rdb").pData)) + if (reg_saveKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest2")).pData, + OUString(RTL_CONSTASCII_USTRINGPARAM("test6.rdb")).pData)) cout << "\n\t34. save all keys under \"allFromTest2\" in test6.rdb\n"; else cout << "\n34. save all keys under \"allFromTest2\" in test6.rdb\n"; - if (reg_createKey(hRootKey, OUString::createFromAscii("allFromTest3").pData, &hKey1)) + if (reg_createKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")).pData, &hKey1)) cout << "\t35. creating key \"allFromTest3\" failed\n"; else cout << "36. key \"allFromTest3\" is created\n"; - if (reg_createKey(hKey1, OUString::createFromAscii("myFirstKey2").pData, &hKey2)) + if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstKey2")).pData, &hKey2)) cout << "\t37. creating key \"myFirstKey2\" failed\n"; else cout << "37. key \"myFirstKey2\" is created\n"; - if (reg_createKey(hKey1, OUString::createFromAscii("mySecondKey2").pData, &hKey3)) + if (reg_createKey(hKey1, OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondKey2")).pData, &hKey3)) cout << "\t38. creating key \"mySecondKey2\" failed\n"; else cout << "38. key \"mySecondKey2\" is created\n"; - if (reg_mergeKey(hRootKey, OUString::createFromAscii("allFromTest3").pData, - OUString::createFromAscii("test6.rdb").pData, sal_False, sal_False)) + if (reg_mergeKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("allFromTest3")).pData, + OUString(RTL_CONSTASCII_USTRINGPARAM("test6.rdb")).pData, sal_False, sal_False)) cout << "\n\t39. merge all keys under \"allFromTest2\" with all in test6.rdb\n"; else cout << "\n39. merge all keys under \"allFromTest2\" with all in test6.rdb\n"; @@ -299,18 +299,18 @@ int _cdecl main() cout << "\n42. closing key \"mySecondKey2\" of \"test5.rdb\"\n"; - if (reg_deleteKey(hRootKey, OUString::createFromAscii("/allFromTest3/reg2FirstKey/reg2FirstSubKey").pData)) + if (reg_deleteKey(hRootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("/allFromTest3/reg2FirstKey/reg2FirstSubKey")).pData)) cout << "\n\t43. delete key \"/allFromTest3/reg2FirstKey/reg2FirstSubKey\" failed\n"; else cout << "\n43. key \"/allFromTest3/reg2FirstKey/reg2FirstSubKey\" is deleted\n"; - if (reg_openRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg2, REG_READONLY)) + if (reg_openRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg2, REG_READONLY)) cout << "\n\t44. registry test4.rdb is opened for read only\n"; else cout << "\n44. registry test4.rdb is opened for read only\n"; RegHandle hReg3; - if (reg_openRegistry(OUString::createFromAscii("test4.rdb").pData, &hReg3, REG_READONLY)) + if (reg_openRegistry(OUString(RTL_CONSTASCII_USTRINGPARAM("test4.rdb")).pData, &hReg3, REG_READONLY)) cout << "\n\t44.a). registry test4.rdb is opened for read only\n"; else cout << "\n44.a). registry test4.rdb is opened for read only\n"; |