From 3b0f426b1616755e00a9b3e01e407bd7d826ddee Mon Sep 17 00:00:00 2001 From: anderson.peterle@previdencia.gov.br Date: Mon, 3 Aug 2009 14:54:48 +0000 Subject: [PATCH] Modulo MapaCACIC: Correcao de gravacao de valores-chave no registry para consulta posterior. --- mapa/main_mapa.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mapa/main_mapa.pas b/mapa/main_mapa.pas index 5af412b..56a6091 100755 --- a/mapa/main_mapa.pas +++ b/mapa/main_mapa.pas @@ -727,17 +727,23 @@ var RegEditSet: TRegistry; begin ListaAuxSet := g_oCacic.explode(Chave, '\'); strRootKey := ListaAuxSet[0]; - For I := 1 To ListaAuxSet.Count - 2 Do strKey := strKey + ListaAuxSet[I] + '\'; + For I := 1 To ListaAuxSet.Count - 2 Do + strKey := strKey + ListaAuxSet[I] + '\'; strValue := ListaAuxSet[ListaAuxSet.Count - 1]; RegEditSet := TRegistry.Create; try + log_DEBUG('Em TfrmMapaCacic.SetValorChaveRegEdit: Abrindo Registry para Escrita => Root: "'+strRootKey+ '" Key: "'+strKey+'"'); RegEditSet.Access := KEY_WRITE; RegEditSet.Rootkey := GetRootKey(strRootKey); if RegEditSet.OpenKey(strKey, True) then Begin RegDataType := RegEditSet.GetDataType(strValue); + + // Sempre será String + RegDataType := rdString; + if RegDataType = rdString then begin RegEditSet.WriteString(strValue, Dado); -- libgit2 0.21.2