Форум: "Сети";
Поиск по всему сайту: delphimaster.net;
Текущий архив: 2002.04.22;
Скачать: [xml.tar.bz2];




Вниз

Работа с реестром. 


Garmahis   (2002-02-07 23:59) [0]

Подскажите, пожалуйста, как в шестой Дельфе можно редактировать реестр на другом компьютере по сети?



VuDZ   (2002-02-08 01:59) [1]

RegConnectRegistry()



Garmahis   (2002-02-09 00:29) [2]

А можно подробнее, а то я не нашёл описания этой функции.



VuDZ   (2002-02-09 01:13) [3]

RegConnectRegistry
The RegConnectRegistry function establishes a connection to a predefined registry handle on another computer.

LONG RegConnectRegistry(
LPCTSTR lpMachineName, // computer name
HKEY hKey, // predefined registry handle
PHKEY phkResult // buffer for remote key handle
);

Parameters
lpMachineName
[in] Pointer to a null-terminated string specifying the name of the remote computer. The string has the following form:
\\computername

If lpMachineName is NULL, the local computer name is used.

hKey
[in] Specifies the one of the following predefined registry handles on the remote computer.
HKEY_LOCAL_MACHINE
HKEY_USERS

Windows NT/2000 or later: HKEY_PERFORMANCE_DATA, if the remote computer is running Windows NT/Windows 2000

Windows 95/98/Me: HKEY_DYN_DATA, if the remote computer is running Windows 95 or Windows 98.HKEY_CURRENT_CONFIG, if the remote computer is running Windows 95 or Windows 98.

You cannot specify the HKEY_CLASSES_ROOT or HKEY_CURRENT_USER value for this parameter.

phkResult
[out] Pointer to a variable that receives a key handle identifying the predefined handle on the remote computer.
Return Values
If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.

Remarks
When a handle returned by RegConnectRegistry is no longer needed, it should be closed by calling RegCloseKey.

Windows 95/98/Me: No registry subkey or value name may exceed 255 characters.

Windows 95/98/Me: To use RegConnectRegistry, you must install the Microsoft Remote Registry service. If you don"t do this, calls to RegConnectRegistry return ERROR_DLL_INIT_FAILED. Perform the following steps to install the Microsoft Remote Registry service.

To install the Microsoft Remote Registry service

In the Network option in Control Panel, click Add.
In the Select Network Component Type dialog box, double-click Service.
In the Select Network Service dialog box, click the Have Disk button.
In the Install From Disk dialog box, type the path to the ADMIN\NETTOOLS\REMOTREG directory on the Windows 95 compact disc, and then click OK.
In the Install From Disk dialog box, click OK.
In the Select Network Service dialog box, click Microsoft Remote Registry, and then click OK.
If you are prompted to specify the location of additional files, specify the path to the files on a shared network directory or on the compact disc.

Requirements
Windows NT/2000 or later: Requires Windows NT 3.1 or later.
Windows 95/98/Me: Requires Windows 95 or later.
Header: Declared in Winreg.h; include Windows.h.
Library: Use Advapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

знающие люди говорят, что почти весь API описан тут - msdn.microsoft.com :>



drpass   (2002-02-09 16:21) [4]

Чуть проще:
var reg:TRegistry

reg:=TRegistry.Create;
reg.RegistryConnect("\\RemoteMachineName");



bw3d   (2002-02-13 08:02) [5]

а может тебя хелпом пользоваться научить ?




Форум: "Сети";
Поиск по всему сайту: delphimaster.net;
Текущий архив: 2002.04.22;
Скачать: [xml.tar.bz2];




Наверх





Память: 0.72 MB
Время: 0.041 c
7-70051           Asker                 2001-10-02 07:09  2002.04.22  
Autorun


14-70009          lipskiy               2002-03-16 03:06  2002.04.22  
Где Кулиба живая есть?


3-69662           Zombie                2002-04-03 07:11  2002.04.22  
Как избавиться от временных файлов Query???


1-69873           ymin                  2002-04-09 11:21  2002.04.22  
Как проще всего распечатать StringGrid? Кстати она помещается на.


1-69853           SkySat                2002-04-08 14:53  2002.04.22  
ALt+Ctrl+Del