gibaf Posted January 5, 2023 Report Share Posted January 5, 2023 ola a todos uma coisa simples (uso muito isso) mas esta tomando um tempo, pois nessa rotina em especifico, nao esta funcionado vejam.... o que esta errado nesse codigo ? If File("arquivo.Ini") oIni := TIni():New( "arquivo.Ini" ) cNome := oIni:Get( "LOCAL" , "Computador" , , ) cUnidade := oIni:Get( "LOCAL" , "Unidade" , , ) oIni := Nil Endif o conteudo do arquivo INI eh esse: [LOCAL] Computador=DESKTOP Unidade=D: mas o GET nao esta trazendo o conteudo do arquivo ini, vindo vazio e quando veio (uma vez), trouxe a unidade sem os dois pontos, somente a letra e agora ? Desde ja agradeco a todos: MUITO OBRIGADO Quote Link to comment Share on other sites More sharing options...
HERGON Posted January 5, 2023 Report Share Posted January 5, 2023 Boa tarde Tente fazer assim: cNome:=GetPvProfString( "LOCAL", "Computador", " ", "arquivo.ini") Herberson Gontijo Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 5, 2023 Report Share Posted January 5, 2023 Veja se ajuda: http://forums.fivetechsupport.com/viewtopic.php?f=3&t=42408&p=254993&hilit=.ini&sid=d1953ab5355f7931941cd46a3a9d29f3#p254993 Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Ladinilson Posted January 6, 2023 Report Share Posted January 6, 2023 Como sou das antigas que se tem o ditado "esta funcionando então não muda"... INI oIni FILE (fdefa+"\PARAM.INI") GET vNomeBingo SECTION "GERAL" ENTRY "Nome" OF oIni GET vDriveRaiDarive SECTION "GERAL" ENTRY "DriveRD" OF oIni ENDINI Abraços Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.