Re: [delphi-br] arquivo ini com delphi 6
eu já tive problemas parecidos com algumas funções... mas o problema era a segurança do Windows7... achei ele meio chatinho pra setar as permissões de rede com sistemas mais antigos, mas depois de tudo configurados (permissões, firewall) não tive mais problema... Em 07/05/2010 16:10, wdidi2003 escreveu: Boa tarde a todos. Tenho um programa que lê um arquivo ini em uma pasta compartilhda no servidor (win-2003-sever). O programa executavel compilado em delphi 6 funciona muito bem em winxp. No win7 a função do Fileexists não consegue ver este arquivo INI em uma pasta mapeada. Mas consegue verificar se um arquivo INI existe em uma pasta local do win7. Aparentemente isto não deva ser do Delphi e sim algum truque do Win7. Gostaria de saber se alguem já se deparou com este problema? Didi. Sp-SP !-- #ygrp-mkp { border: 1px solid #d8d8d8; font-family: Arial; margin: 10px 0; padding: 0 10px; } #ygrp-mkp hr { border: 1px solid #d8d8d8; } #ygrp-mkp #hd { color: #628c2a; font-size: 85%; font-weight: 700; line-height: 122%; margin: 10px 0; } #ygrp-mkp #ads { margin-bottom: 10px; } #ygrp-mkp .ad { padding: 0 0; } #ygrp-mkp .ad a { color: #ff; text-decoration: none; } #ygrp-sponsor #ygrp-lc { font-family: Arial; } #ygrp-sponsor #ygrp-lc #hd { margin: 10px 0px; font-weight: 700; font-size: 78%; line-height: 122%; } #ygrp-sponsor #ygrp-lc .ad { margin-bottom: 10px; padding: 0 0; } a { color: #1e66ae; } #actions { font-family: Verdana; font-size: 11px; padding: 10px 0; } #activity { background-color: #e0ecee; float: left; font-family: Verdana; font-size: 10px; padding: 10px; } #activity span { font-weight: 700; } #activity span:first-child { text-transform: uppercase; } #activity span a { color: #5085b6; text-decoration: none; } #activity span span { color: #ff7900; } #activity span .underline { text-decoration: underline; } .attach { clear: both; display: table; font-family: Arial; font-size: 12px; padding: 10px 0; width: 400px; } .attach div a { text-decoration: none; } .attach img { border: none; padding-right: 5px; } .attach label { display: block; margin-bottom: 5px; } .attach label a { text-decoration: none; } blockquote { margin: 0 0 0 4px; } .bold { font-family: Arial; font-size: 13px; font-weight: 700; } .bold a { text-decoration: none; } dd.last p a { font-family: Verdana; font-weight: 700; } dd.last p span { margin-right: 10px; font-family: Verdana; font-weight: 700; } dd.last p span.yshortcuts { margin-right: 0; } div.attach-table div div a { text-decoration: none; } div.attach-table { width: 400px; } div.file-title a, div.file-title a:active, div.file-title a:hover, div.file-title a:visited { text-decoration: none; } div.photo-title a, div.photo-title a:active, div.photo-title a:hover, div.photo-title a:visited { text-decoration: none; } div#ygrp-mlmsg #ygrp-msg p a span.yshortcuts { font-family: Verdana; font-size: 10px; font-weight: normal; } .green { color: #628c2a; } .MsoNormal { margin: 0 0 0 0; } o { font-size: 0; } #photos div { float: left; width: 72px; } #photos div div { border: 1px solid #66; height: 62px; overflow: hidden; width: 62px; } #photos div label { color: #66; font-size: 10px; overflow: hidden; text-align: center; white-space: nowrap; width: 64px; } #reco-category { font-size: 77%; } #reco-desc { font-size: 77%; } .replbq { margin: 4px; } #ygrp-actbar div a:first-child { /* border-right: 0px solid #000;*/ margin-right: 2px; padding-right: 5px; } #ygrp-mlmsg { font-size: 13px; font-family: Arial, helvetica,clean, sans-serif; *font-size: small; *font: x-small; } #ygrp-mlmsg table { font-size: inherit; font: 100%; } #ygrp-mlmsg select, input, textarea { font: 99% Arial, Helvetica, clean, sans-serif; } #ygrp-mlmsg pre, code { font:115% monospace; *font-size:100%; } #ygrp-mlmsg * { line-height: 1.22em; } #ygrp-mlmsg #logo { padding-bottom: 10px; } #ygrp-mlmsg a { color: #1E66AE; } #ygrp-msg p a { font-family: Verdana; } #ygrp-msg p#attach-count span { color: #1E66AE; font-weight: 700; } #ygrp-reco #reco-head { color: #ff7900; font-weight: 700; } #ygrp-reco { margin-bottom: 20px; padding: 0px; } #ygrp-sponsor #ov li a { font-size: 130%; text-decoration: none; } #ygrp-sponsor #ov li { font-size: 77%; list-style-type: square; padding: 6px 0; } #ygrp-sponsor #ov ul { margin: 0; padding: 0 0 0 8px; } #ygrp-text { font-family: Georgia; } #ygrp-text p { margin: 0 0 1em 0; } #ygrp-text tt { font-size: 120%; } #ygrp-vital ul li:last-child { border-right: none !important; } -- [As partes desta mensagem que não continham texto foram removidas]
[delphi-br] arquivo ini com delphi 6
Boa tarde a todos. Tenho um programa que lê um arquivo ini em uma pasta compartilhda no servidor (win-2003-sever). O programa executavel compilado em delphi 6 funciona muito bem em winxp. No win7 a função do Fileexists não consegue ver este arquivo INI em uma pasta mapeada. Mas consegue verificar se um arquivo INI existe em uma pasta local do win7. Aparentemente isto não deva ser do Delphi e sim algum truque do Win7. Gostaria de saber se alguem já se deparou com este problema? Didi. Sp-SP
Re: [delphi-br] Arquivo Ini no Delphi
Coloque na clausula uses o seguinte. Inifiles; var Arq:Tinifile; begin Arq:= TiniFile.Create ( Arquivo que vc quer ler ) try { lembrando que o TESTE é a Chave que fica emtre [] e o CAMPO é no nome do campo que esta o valor } Arq.ReadString ( 'TESTE','CAMPO',valor Default caso ele não ache nada); finally Arq.Free; end; end; Wesley From: Cleber Edson Lino Sent: Wednesday, December 17, 2008 11:57 AM To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Arquivo Ini no Delphi Olá pessoal... bom dia... Olha só, preciso pegar conteúdo de arquivo .ini, alguém tem um exemplo aí que possa me ajudar. E tem que ter alguma coisa que pega a variável de sessão aquela que fica entre [Teste] ok? Obrigado a todos. __ Information from ESET NOD32 Antivirus, version of virus signature database 3698 (20081217) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com [As partes desta mensagem que não continham texto foram removidas]
Re: [delphi-br] Arquivo Ini no Delphi
Inclua a unit IniFiles na clausula uses do seu form. Procedure TForm1.GravaIni( Numero : Longint ; Texto : String ; Condicao : Boolean); var ArqIni : TIniFile; begin ArqIni := TIniFile.Create('c:\windows\temp\Teste.Ini'); Try ArqIni.WriteInteger('Dados', 'Numero', Numero); ArqIni.WriteString('Dados', 'Texto', Texto); ArqIni.WriteBool('Dados', 'Condição', Condicao); Finally ArqIni.Free; end; end; Procedure TForm1.LeIni( Var Numero : Longint ; Var Texto : String ; Var Condicao : Boolean); var ArqIni : tIniFile; begin ArqIni := tIniFile.Create('c:\windows\temp\Teste.Ini'); Try Numero := ArqIni.ReadInteger('Dados', 'Numero', Numero ); Texto := ArqIni.ReadString('Dados', 'Texto', Texto ); Condicao := ArqIni.ReadBool('Dados', 'Condição', Condicao ); Finally ArqIni.Free; end; end; Utilize as procedures assim: procedure TForm1.Button1Click(Sender: TObject); begin GravaIni(1234,'TESTE',True); end; procedure TForm1.Button2Click(Sender: TObject); var N: Integer; T: String; C: Boolean; begin LeIni(N,T,C); Showmessage(IntToStr(N)+' '+T); end; Atenciosamente, Reginaldo Buscai ao SENHOR enquanto se pode achar, invocai-o enquanto está perto. Isaías 55:6 - Original Message - From: Cleber Edson Lino To: delphi-br@yahoogrupos.com.br Sent: Wednesday, December 17, 2008 10:57 AM Subject: [delphi-br] Arquivo Ini no Delphi Olá pessoal... bom dia... Olha só, preciso pegar conteúdo de arquivo .ini, alguém tem um exemplo aí que possa me ajudar. E tem que ter alguma coisa que pega a variável de sessão aquela que fica entre [Teste] ok? Obrigado a todos. [As partes desta mensagem que não continham texto foram removidas]
[delphi-br] Arquivo Ini no Delphi
Olá pessoal... bom dia... Olha só, preciso pegar conteúdo de arquivo .ini, alguém tem um exemplo aí que possa me ajudar. E tem que ter alguma coisa que pega a variável de sessão aquela que fica entre [Teste] ok? Obrigado a todos.