Var
Key : PHKey;
rrc : LongInt;
n : LongInt;
Tam : Word;
Valor : Integer;
begin
n := CeRapiInit;
If n <> 0 then
Application.MessageBox('Unable to load and initialize RAPI','ERROR', MB_ICONERROR OR MB_OK)
Else
Begin
New(Key);
rrc:=CeRegOpenKeyEx(HKEY_LOCAL_MACHINE,'Software\\SADI',0,0,Key);
If rrc <> ERROR_SUCCESS Then
ShowMessage('No se puede abrir ')
Else
Begin
Valor:=58;
Tam:=SizeOf(Valor);
CeRegSetValueEx(Key^,'ID_DIVI',0,REG_DWORD,@Valor,Tam);
CeRegCloseKey(Key^);
ShowMessage('Valor cambiado');
End;
End