Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.visual-basic > #19506

Re: URLDownloadToFile

Subject Re: URLDownloadToFile
Newsgroups it.comp.lang.visual-basic
References <q14s0t$9hu$1@solani.org> <q15bmv$4er$1@gioia.aioe.org> <q17bfb$u22$1@solani.org> <gmIZD.1425$lb.741@tornado.fastwebnet.it> <q184va$hcf$1@solani.org>
From Gio <doc_tmn@yahoo.it>
Message-ID <aq3_D.1440$lb.831@tornado.fastwebnet.it> (permalink)
Date 2019-01-11 17:23 +0100

Show all headers | View raw


Il 10/01/2019 20:04, Greg ha scritto:
> Il 10/01/19 15:09:11 Gio ha scritto:
> 
>> Gli editor complessi intervengono nel rendering dei dati; le prove 
>> empiriche servono a poco.
>>
>> Dovresti aprire il file di testo con un editor esadecimale e vedere se 
>> le linee finiscono con 0D o con 0D0A. In tutti i casi utilizzando la 
>> WritePrivateProfileString non puoi farci nulla.
> 
> la riga finisce con 0A
> 
>> Piuttosto... Perché la WritePrivateProfileString. Una open > write > 
>> close non bastava?
> 
> Ai tempi per scrivere un file di configurazione con delle chiavi 
> prestabilite era comodo usare quell'api
> 

Ho appena provato la WritePrivateProfileString e le righe sono terminate 
con 0D 0A (usata millemila volte per file ini e simili).

Non so cosa dire se non che non credo che il problema sia quella stupida 
API.


Option Explicit

Private Declare Function WritePrivateProfileString Lib "kernel32" Alias 
"WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal 
lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long

Private peRC As String

Private Sub Form_Load()

     peRC = App.Path
     If Right(peRC, 1) <> "\" Then peRC = peRC & "\"

     Dim x As Long

     '-------------
     x = WritePrivateProfileString("TEST1", "Test Param1", "pippo 
pippo", peRC & "test.ini")
     x = WritePrivateProfileString("TEST1", "Test Param2", "peppo 
peppo", peRC & "test.ini")
     x = WritePrivateProfileString("TEST2", "Test Param1", "pappo 
pappo", peRC & "test.ini")

     MsgBox "done!"
     Unload Me

End Sub





-- 
gio

Back to it.comp.lang.visual-basic | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

URLDownloadToFile Greg <greg@alicie.com> - 2019-01-09 14:12 +0100
  Re: URLDownloadToFile Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2019-01-09 18:42 +0100
    Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-10 12:48 +0100
      Re: URLDownloadToFile Gio <doc_tmn@yahoo.it> - 2019-01-10 15:09 +0100
        Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-10 20:04 +0100
          Re: URLDownloadToFile Gio <doc_tmn@yahoo.it> - 2019-01-11 17:23 +0100
            Re: URLDownloadToFile Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2019-01-11 18:09 +0100
              Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-11 22:07 +0100
                Re: URLDownloadToFile Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2019-01-11 22:34 +0100
                Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-12 18:09 +0100
                Re: URLDownloadToFile Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2019-01-12 20:39 +0100
                Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-13 10:25 +0100
                Re: URLDownloadToFile Gulp® <gulp@hotmail.it> - 2019-01-16 13:20 +0100
                Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-18 18:34 +0100
      Re: URLDownloadToFile Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2019-01-10 16:00 +0100
        Re: URLDownloadToFile Greg <greg@alicie.com> - 2019-01-10 19:39 +0100

csiph-web