Commit 3b0f426b1616755e00a9b3e01e407bd7d826ddee
1 parent
44be9973
Exists in
master
Modulo MapaCACIC: Correcao de gravacao de valores-chave no registry para consulta posterior.
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@821 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
mapa/main_mapa.pas
| @@ -727,17 +727,23 @@ var RegEditSet: TRegistry; | @@ -727,17 +727,23 @@ var RegEditSet: TRegistry; | ||
| 727 | begin | 727 | begin |
| 728 | ListaAuxSet := g_oCacic.explode(Chave, '\'); | 728 | ListaAuxSet := g_oCacic.explode(Chave, '\'); |
| 729 | strRootKey := ListaAuxSet[0]; | 729 | strRootKey := ListaAuxSet[0]; |
| 730 | - For I := 1 To ListaAuxSet.Count - 2 Do strKey := strKey + ListaAuxSet[I] + '\'; | 730 | + For I := 1 To ListaAuxSet.Count - 2 Do |
| 731 | + strKey := strKey + ListaAuxSet[I] + '\'; | ||
| 731 | strValue := ListaAuxSet[ListaAuxSet.Count - 1]; | 732 | strValue := ListaAuxSet[ListaAuxSet.Count - 1]; |
| 732 | 733 | ||
| 733 | RegEditSet := TRegistry.Create; | 734 | RegEditSet := TRegistry.Create; |
| 734 | try | 735 | try |
| 736 | + log_DEBUG('Em TfrmMapaCacic.SetValorChaveRegEdit: Abrindo Registry para Escrita => Root: "'+strRootKey+ '" Key: "'+strKey+'"'); | ||
| 735 | RegEditSet.Access := KEY_WRITE; | 737 | RegEditSet.Access := KEY_WRITE; |
| 736 | RegEditSet.Rootkey := GetRootKey(strRootKey); | 738 | RegEditSet.Rootkey := GetRootKey(strRootKey); |
| 737 | 739 | ||
| 738 | if RegEditSet.OpenKey(strKey, True) then | 740 | if RegEditSet.OpenKey(strKey, True) then |
| 739 | Begin | 741 | Begin |
| 740 | RegDataType := RegEditSet.GetDataType(strValue); | 742 | RegDataType := RegEditSet.GetDataType(strValue); |
| 743 | + | ||
| 744 | + // Sempre será String | ||
| 745 | + RegDataType := rdString; | ||
| 746 | + | ||
| 741 | if RegDataType = rdString then | 747 | if RegDataType = rdString then |
| 742 | begin | 748 | begin |
| 743 | RegEditSet.WriteString(strValue, Dado); | 749 | RegEditSet.WriteString(strValue, Dado); |