🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.programmeren
Article #565

Re: [vb] Hoe binary file inlezen in variabele

#565
From: Pieter Philippaerts
Date: Sun, 28 Apr 2002 20:56
38 lines
2383 bytes
Je moet je string eerst initialiseren. Bijvoorbeeld, als je het zoals dit
initialiseerd:
   Test = Space$(500)
dan gaat die 500 bytes inlezen.

Mvg,
Pieter Philippaerts

"Pieter Huygens" <usenet@phuygens.be> wrote in message
news:m7bocu08ot95c6ur92c8lc8soq2qdskrtn@4ax.com...
> Beste,
>
> Ik heb hier een file op mijn harde schijf staan, die ik in een
> variabele zou moeten krijgen, het betreft een EXE file.
> Ik probeer de content van die file in een variabele te krijgen op
> volgende manier:
>
> <quote>
> Private Sub Command1_Click()
> Open "c:\Docsis32.exe" For Binary Access Read As #1
> Get #1, , Test
> Close #1
> End Sub
>
> Private Sub Command2_Click()
> Open "c:\Docsis32.exe" For Binary Access Write As #1
> Put #1, , Test
> Close #1
> End Sub
> </quote>
>
> De variabele Test is hierin gedeclareerd als een string, en die is
> public gedeclareerd.
> Toch blijft bij het aanroepen van Command1_Click de variabele Test
> leeg. Iemand een idee?
>
> Alvast bedankt!
> Pieter Huygens
Technical Details
Message-ID: <1020027260.545591@seven.kulnet.kuleuven.ac.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!feed1.news.be.easynet.net!newsfeeds.belnet.be!newsfeed.belnet.be!naxos.belnet.be!news.belnet.be!not-for-mail
References: <m7bocu08ot95c6ur92c8lc8soq2qdskrtn@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,d84b52263474c4c7,start
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,647ae919ba7243ca
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-04-28 13:54:37 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!feed1.news.be.easynet.net!newsfeeds.belnet.be!newsfeed.belnet.be!naxos.belnet.be!news.belnet.be!not-for-mail
From: "Pieter Philippaerts" <Pieter@mentalis.org>
Newsgroups: nl.comp.programmeren,be.comp.programming
Subject: Re: [vb] Hoe binary file inlezen in variabele
Date: Sun, 28 Apr 2002 22:56:00 +0200
Organization: KULeuvenNet
Lines: 40
Message-ID: <1020027260.545591@seven.kulnet.kuleuven.ac.be>
References: <m7bocu08ot95c6ur92c8lc8soq2qdskrtn@4ax.com>
NNTP-Posting-Host: seven.kulnet.kuleuven.ac.be
X-Trace: naxos.belnet.be 1020027275 22486 134.58.127.12 (28 Apr 2002 20:54:35 GMT)
X-Complaints-To: abuse@belnet.be
NNTP-Posting-Date: Sun, 28 Apr 2002 20:54:35 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Cache-Post-Path: seven.kulnet.kuleuven.ac.be!unknown@localhost
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)