Ver Mensaje Individual
  #2  
Antiguo 15-01-2007
markdelphi markdelphi is offline
Miembro
 
Registrado: jul 2006
Posts: 14
Reputación: 0
markdelphi Va por buen camino
El siguiente fragmento de codigo sirve para modificar un valor entero del registro de Windows CE

Código Delphi [-]
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
Responder Con Cita