/* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Hyperion Pattern. Hyperion Pattern is a part of the Hyperion Project. ---------------------------------------------------------- Copyright (c) 2001 Pierre Rebours. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See hyp.license.txt file for more information about the license. Web: http://lagrandeporte.multimania.com/hyperion Email: pierre_rebours@yahoo.com ---------------------------------------------------------- CVS $Log$ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */ #include"hyp.ker.ex.h" #include"../hyp.initguid.h" // {FB954D60-05D0-11d5-A083-0080AD97951B} hyp_DEFINE_GUID(CLSID_Test, 0xfb954d60, 0x5d0, 0x11d5, 0xa0, 0x83, 0x0, 0x80, 0xad, 0x97, 0x95, 0x1b); void RegistryTest(void) { for(int i=0;i<2;i++) { hyp_ker::CRegistryUtility::ERegistryType mode; i==0 ? mode=hyp_ker::CRegistryUtility::reg_win32 : mode=hyp_ker::CRegistryUtility::reg_std; hyp_ker::CRegistryUtility reg_util(mode); reg_util.RegisterServer("Path of the registered component",CLSID_Test,"ProgId of the registered component"); g_OutStream<<"InProcess path"<<reg_util.GetPathInprocessServer(CLSID_Test)<<'\n'; g_OutStream<<"CLSID :"<<reg_util.GetCLSIDFromProgID("ProgId of the registered component")<<'\n'; } hyp_ker::CStdRegistry reg("test\\prov"); reg.CreateRegistryFile("key"); reg.GetRegistryFile()->SetKey("value_name_1"); reg.GetRegistryFile()->SetValue("value_name_1","value_1"); reg.GetRegistryFile()->SetKey("value_name_2"); reg.GetRegistryFile()->SetValue("value_name_2","value_2"); }
|
|