What is the equivalent of fread in VB.net

  • Thread starter Thread starter John Lucas
  • Start date Start date
J

John Lucas

Anyone know the equivalent of this in VB.net or c#?

dwRead=fread(pWAVBuffer,sizeof(SHORT),dwSamples,pFileIn)



i.e.
dim dwRead as ?
dim pWavBuffer as ?
dim dwSamples as ?

const itemlen = sizeof(SHORT)=16 ?
 
* (e-mail address removed) (John Lucas) scripsit:
Anyone know the equivalent of this in VB.net or c#?

dwRead=fread(pWAVBuffer,sizeof(SHORT),dwSamples,pFileIn)



i.e.
dim dwRead as ?
dim pWavBuffer as ?
dim dwSamples as ?

const itemlen = sizeof(SHORT)=16 ?

You may want to use 'FileOpen', 'FileGet', ... or the
'System.IO.BinaryReader' class to read some binary data from a file.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
John,
In addition to Herfried's comments, there are a number of classes in the
System.IO namespace that could be considered the 'equivalent' to fread. It
really depends on what you are really attempting to do (right tool for the
job sort of thing).

In addition to the BinaryReader class you may want to look at the Stream
family of classes, specifically the Read methods.

Hope this helps
Jay
 
Back
Top